Commit 0499759204449a78ead1950c06fbab4dacfa84f2
1 parent
31a9d653
Exists in
master
and in
4 other branches
issues & fixed layout
Showing
6 changed files
with
38 additions
and
58 deletions
Show diff stats
app/assets/stylesheets/projects.css.scss
@@ -163,10 +163,6 @@ table.round-borders { | @@ -163,10 +163,6 @@ table.round-borders { | ||
163 | padding:20px; | 163 | padding:20px; |
164 | } | 164 | } |
165 | 165 | ||
166 | -//body { | ||
167 | - //background: #eaeaea; | ||
168 | -//} | ||
169 | - | ||
170 | a { | 166 | a { |
171 | color: #111; | 167 | color: #111; |
172 | } | 168 | } |
@@ -232,43 +228,15 @@ input.ssh_project_url { | @@ -232,43 +228,15 @@ input.ssh_project_url { | ||
232 | text-align:center; | 228 | text-align:center; |
233 | } | 229 | } |
234 | 230 | ||
235 | -.day-commits-table li.commit { | ||
236 | - cursor:pointer; | ||
237 | - | ||
238 | - &:hover { | ||
239 | - @include hover-color; | ||
240 | - } | ||
241 | -} | ||
242 | - | ||
243 | -/* | ||
244 | -#FFF6BF | ||
245 | -#FFD324 | ||
246 | -*/ | ||
247 | -#tree-slider tr.tree-item { | ||
248 | - cursor:pointer; | ||
249 | - | ||
250 | - &:hover { | ||
251 | - @include hover-color; | ||
252 | - td { | ||
253 | - @include hover-color; | ||
254 | - } | ||
255 | - } | ||
256 | -} | ||
257 | #projects-list .project { | 231 | #projects-list .project { |
258 | height:50px; | 232 | height:50px; |
259 | } | 233 | } |
260 | 234 | ||
235 | +#tree-slider .tree-item, | ||
261 | #projects-list .project, | 236 | #projects-list .project, |
262 | #snippets-table .snippet, | 237 | #snippets-table .snippet, |
263 | #issues-table .issue{ | 238 | #issues-table .issue{ |
264 | cursor:pointer; | 239 | cursor:pointer; |
265 | - | ||
266 | - &:hover { | ||
267 | - @include hover-color; | ||
268 | - td { | ||
269 | - @include hover-color; | ||
270 | - } | ||
271 | - } | ||
272 | } | 240 | } |
273 | 241 | ||
274 | .clear { | 242 | .clear { |
@@ -563,6 +531,7 @@ input.ssh_project_url { | @@ -563,6 +531,7 @@ input.ssh_project_url { | ||
563 | @include round-borders-all(4px); | 531 | @include round-borders-all(4px); |
564 | padding:2px 4px; | 532 | padding:2px 4px; |
565 | border:none; | 533 | border:none; |
534 | + text-shadow:none; | ||
566 | 535 | ||
567 | &.high { | 536 | &.high { |
568 | background: #D12F19; | 537 | background: #D12F19; |
@@ -687,6 +656,13 @@ table.highlighttable pre{ | @@ -687,6 +656,13 @@ table.highlighttable pre{ | ||
687 | width:200px; | 656 | width:200px; |
688 | } | 657 | } |
689 | 658 | ||
659 | +.issues_filter { | ||
660 | + margin-top:10px; | ||
661 | + .left { | ||
662 | + margin-right:15px; | ||
663 | + } | ||
664 | +} | ||
665 | + | ||
690 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | 666 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
691 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} | 667 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
692 | body.project-page #notes-list .note img{float: left; margin-right: 10px;} | 668 | body.project-page #notes-list .note img{float: left; margin-right: 10px;} |
app/controllers/application_controller.rb
@@ -82,6 +82,12 @@ class ApplicationController < ActionController::Base | @@ -82,6 +82,12 @@ class ApplicationController < ActionController::Base | ||
82 | elsif params[:view_style] == "fluid" | 82 | elsif params[:view_style] == "fluid" |
83 | cookies[:view_style] = "" | 83 | cookies[:view_style] = "" |
84 | end | 84 | end |
85 | + | ||
86 | + @view_mode = if cookies[:view_style] == "collapsed" | ||
87 | + :fixed | ||
88 | + else | ||
89 | + :fluid | ||
90 | + end | ||
85 | end | 91 | end |
86 | 92 | ||
87 | def respond_with_notes | 93 | def respond_with_notes |
app/views/issues/_show.html.haml
@@ -4,10 +4,11 @@ | @@ -4,10 +4,11 @@ | ||
4 | = image_tag "move.png" , :class => [:handle, :left] | 4 | = image_tag "move.png" , :class => [:handle, :left] |
5 | %td | 5 | %td |
6 | = image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" | 6 | = image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" |
7 | - = truncate issue.assignee.name, :lenght => 20 | 7 | + = issue.assignee.name |
8 | %td ##{issue.id} | 8 | %td ##{issue.id} |
9 | %td | 9 | %td |
10 | - = truncate(html_escape(issue.title), :length => 60) | 10 | + = truncate(html_escape(issue.title), :length => 200) |
11 | + %br | ||
11 | %br | 12 | %br |
12 | - if issue.critical | 13 | - if issue.critical |
13 | %span.tag.high critical | 14 | %span.tag.high critical |
@@ -27,7 +28,8 @@ | @@ -27,7 +28,8 @@ | ||
27 | - else | 28 | - else |
28 | = check_box_tag "closed", 1, issue.closed, :disabled => true | 29 | = check_box_tag "closed", 1, issue.closed, :disabled => true |
29 | %td | 30 | %td |
30 | - - if can?(current_user, :admin_issue, @project) || issue.author == current_user | ||
31 | - = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "lbutton positive", :remote => true | ||
32 | - - if can?(current_user, :admin_issue, @project) || issue.author == current_user | ||
33 | - = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{issue.id}" | 31 | + - if @view_mode == :fluid |
32 | + - if can?(current_user, :admin_issue, @project) || issue.author == current_user | ||
33 | + = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "lbutton positive", :remote => true | ||
34 | + - if can?(current_user, :admin_issue, @project) || issue.author == current_user | ||
35 | + = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{issue.id}" |
app/views/issues/index.html.haml
@@ -7,18 +7,18 @@ | @@ -7,18 +7,18 @@ | ||
7 | = hidden_field_tag :project_id, @project.id, { :id => 'project_id' } | 7 | = hidden_field_tag :project_id, @project.id, { :id => 'project_id' } |
8 | = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } | 8 | = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } |
9 | 9 | ||
10 | - .right | 10 | + .right.issues_filter |
11 | = form_tag project_issues_path(@project), :method => :get do | 11 | = form_tag project_issues_path(@project), :method => :get do |
12 | - .span-2 | 12 | + .left |
13 | = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status" | 13 | = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status" |
14 | = label_tag "open_issues","Open" | 14 | = label_tag "open_issues","Open" |
15 | - .span-2 | 15 | + .left |
16 | = radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status" | 16 | = radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status" |
17 | = label_tag "closed_issues","Closed" | 17 | = label_tag "closed_issues","Closed" |
18 | - .span-2 | 18 | + .left |
19 | = radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status" | 19 | = radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status" |
20 | = label_tag "my_issues","To Me" | 20 | = label_tag "my_issues","To Me" |
21 | - .span-2 | 21 | + .left |
22 | = radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status" | 22 | = radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status" |
23 | = label_tag "all_issues","All" | 23 | = label_tag "all_issues","All" |
24 | 24 |
app/views/issues/show.html.haml
1 | %h2 | 1 | %h2 |
2 | - = "Issue ##{@issue.id} - #{html_escape(@issue.title)}" | 2 | + %strong |
3 | + Issue | ||
4 | + = "##{@issue.id}" | ||
5 | + – | ||
6 | + = html_escape(@issue.title) | ||
3 | .left.width-65p | 7 | .left.width-65p |
4 | .issue_notes= render "notes/notes" | 8 | .issue_notes= render "notes/notes" |
5 | 9 | ||
@@ -9,14 +13,6 @@ | @@ -9,14 +13,6 @@ | ||
9 | .span-8 | 13 | .span-8 |
10 | %table.round-borders | 14 | %table.round-borders |
11 | %tr | 15 | %tr |
12 | - %td Title: | ||
13 | - %td | ||
14 | - = truncate html_escape(@issue.title) | ||
15 | - %tr | ||
16 | - %td Project | ||
17 | - %td | ||
18 | - %strong= @issue.project.name | ||
19 | - %tr | ||
20 | %td Author: | 16 | %td Author: |
21 | %td | 17 | %td |
22 | = image_tag gravatar_icon(@issue.author.email), :class => "left", :width => 40, :style => "padding:0 5px;" | 18 | = image_tag gravatar_icon(@issue.author.email), :class => "left", :width => 40, :style => "padding:0 5px;" |
@@ -39,7 +35,7 @@ | @@ -39,7 +35,7 @@ | ||
39 | %tr | 35 | %tr |
40 | %td Closed? | 36 | %td Closed? |
41 | %td | 37 | %td |
42 | - - if can? current_user, :write_issue, @project | 38 | + - if can? current_user, :write_issue, @issue |
43 | = form_for([@project, @issue]) do |f| | 39 | = form_for([@project, @issue]) do |f| |
44 | = f.check_box :closed, :onclick => "$(this).parent().submit();" | 40 | = f.check_box :closed, :onclick => "$(this).parent().submit();" |
45 | = hidden_field_tag :status_only, true | 41 | = hidden_field_tag :status_only, true |
@@ -47,8 +43,9 @@ | @@ -47,8 +43,9 @@ | ||
47 | = check_box_tag "closed", 1, @issue.closed, :disabled => true | 43 | = check_box_tag "closed", 1, @issue.closed, :disabled => true |
48 | 44 | ||
49 | 45 | ||
50 | - - if can?(current_user, :admin_issue, @issue) | 46 | + - if can?(current_user, :write_issue, @issue) |
51 | .clear | 47 | .clear |
52 | - = link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true | ||
53 | - .right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}" | 48 | + %br |
49 | + = link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true | ||
50 | + .right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}" | ||
54 | .clear | 51 | .clear |
spec/requests/commits_notes_spec.rb
@@ -12,7 +12,6 @@ describe "Issues" do | @@ -12,7 +12,6 @@ describe "Issues" do | ||
12 | describe "add new note", :js => true do | 12 | describe "add new note", :js => true do |
13 | before do | 13 | before do |
14 | visit project_commit_path(project, commit) | 14 | visit project_commit_path(project, commit) |
15 | - click_link "Comments" # notes tab | ||
16 | fill_in "note_note", :with => "I commented this commit" | 15 | fill_in "note_note", :with => "I commented this commit" |
17 | click_button "Add note" | 16 | click_button "Add note" |
18 | end | 17 | end |