Commit 4e55cc67f52d420691246dc3a20c75f6f3add912
1 parent
b7f4f67b
Exists in
master
and in
4 other branches
Issue show page restyled
Showing
2 changed files
with
28 additions
and
64 deletions
Show diff stats
app/views/issues/edit.html.haml
| @@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
| 15 | %tr | 15 | %tr |
| 16 | %td= f.label :assignee_id | 16 | %td= f.label :assignee_id |
| 17 | %td= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) | 17 | %td= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) |
| 18 | - %tr | 18 | + -#%tr |
| 19 | %td= f.label :branch_name | 19 | %td= f.label :branch_name |
| 20 | %td= f.select(:branch_name, @project.heads.map(&:name), { :include_blank => "Select git branch" }) | 20 | %td= f.select(:branch_name, @project.heads.map(&:name), { :include_blank => "Select git branch" }) |
| 21 | %tr | 21 | %tr |
app/views/issues/show.html.haml
| 1 | -%h2.icon | ||
| 2 | - %span | ||
| 3 | - %d | ||
| 4 | - = "Issue ##{@issue.id}" | ||
| 5 | - | ||
| 6 | -- unless @commits.blank? | ||
| 7 | - .right | ||
| 8 | - = link_to 'Browse Code', tree_project_ref_path(@project, @issue.branch_name), :class => "browse-code button yellow", :style => "margin-right:10px;" | ||
| 9 | - = link_to 'Commits', project_commits_path(@project, :ref => @issue.branch_name), :class => "browse-code button" | ||
| 10 | - | ||
| 11 | - | ||
| 12 | - | ||
| 13 | -.clear | ||
| 14 | - | ||
| 15 | -%h3= @issue.title | ||
| 16 | - | ||
| 17 | -%table.round-borders | ||
| 18 | - %thead | ||
| 19 | - %th Assignee | ||
| 20 | - %th Status | ||
| 21 | - %th Opened | ||
| 22 | - %th Tags | ||
| 23 | - %tr | ||
| 24 | - %td | ||
| 25 | - = image_tag gravatar_icon(@issue.assignee_email), :width => 20, :style => "padding:0 5px;" | ||
| 26 | - = @issue.assignee_name | ||
| 27 | - %td | 1 | +.issue-show-holder.ui-box |
| 2 | + %h3 | ||
| 3 | + = "Issue ##{@issue.id}" | ||
| 4 | + .right | ||
| 28 | - if @issue.closed | 5 | - if @issue.closed |
| 29 | %span.tag.high Resolved | 6 | %span.tag.high Resolved |
| 30 | - else | 7 | - else |
| 31 | %span.tag.today Open | 8 | %span.tag.today Open |
| 32 | - %td | ||
| 33 | - = @issue.created_at.stamp("21 Aug 2011, 11:15pm") | ||
| 34 | - %td | ||
| 35 | - - if @issue.critical | ||
| 36 | - %span.tag.high critical | ||
| 37 | - - else | ||
| 38 | - %span.tag.normal normal | ||
| 39 | - - if @issue.today? | ||
| 40 | - %span.tag.today today | ||
| 41 | - | ||
| 42 | 9 | ||
| 10 | + .data | ||
| 11 | + %h4= @issue.title | ||
| 43 | 12 | ||
| 44 | -.clear | ||
| 45 | - | 13 | + - if @issue.author == @issue.assignee |
| 14 | + = image_tag gravatar_icon(@issue.assignee_email), :width => 20, :style => "padding:0 5px;" | ||
| 15 | + = @issue.assignee_name | ||
| 16 | + - else | ||
| 17 | + = image_tag gravatar_icon(@issue.author_email), :width => 20, :style => "padding:0 5px;" | ||
| 18 | + = @issue.author_name | ||
| 19 | + → | ||
| 20 | + = image_tag gravatar_icon(@issue.assignee_email), :width => 20, :style => "padding:0 5px;" | ||
| 21 | + = @issue.assignee_name | ||
| 22 | + .right | ||
| 23 | + %cite.cgray= @issue.created_at.stamp("21 Aug 2011, 11:15pm") | ||
| 24 | + .clear | ||
| 46 | 25 | ||
| 47 | -- if can? current_user, :write_issue, @issue | ||
| 48 | - - if @issue.closed | ||
| 49 | - = link_to 'Reopen', project_issue_path(@project, @issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "grey-button" | ||
| 50 | - - else | ||
| 51 | - = link_to 'Resolve', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "grey-button" | ||
| 52 | - .right | ||
| 53 | - = link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "grey-button positive" | ||
| 54 | - | ||
| 55 | - = link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "grey-button delete-issue negative", :id => "destroy_issue_#{@issue.id}" | 26 | + .buttons |
| 27 | + - if can? current_user, :write_issue, @issue | ||
| 28 | + - if @issue.closed | ||
| 29 | + = link_to 'Reopen', project_issue_path(@project, @issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "grey-button" | ||
| 30 | + - else | ||
| 31 | + = link_to 'Resolve', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "grey-button" | ||
| 32 | + .right | ||
| 33 | + = link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "grey-button positive" | ||
| 56 | 34 | ||
| 35 | +.clear | ||
| 57 | %br | 36 | %br |
| 58 | %br | 37 | %br |
| 59 | -- unless @commits.blank? | ||
| 60 | - %table.round-borders | ||
| 61 | - %thead | ||
| 62 | - %th Unmerged Commits | ||
| 63 | - - @commits.each do |commit| | ||
| 64 | - %tr | ||
| 65 | - %td | ||
| 66 | - = image_tag gravatar_icon(commit.author_email), :class => "left", :width => 20, :style => "padding-right:5px;" | ||
| 67 | - = link_to commit.id.to_s, project_commit_path(@project, :id => commit.id) | ||
| 68 | - .right | ||
| 69 | - = time_ago_in_words(commit.created_at) | ||
| 70 | - ago | ||
| 71 | - | ||
| 72 | 38 | ||
| 73 | .issue_notes= render "notes/notes" | 39 | .issue_notes= render "notes/notes" |
| 74 | - | ||
| 75 | .loading{ :style => "display:none;"} | 40 | .loading{ :style => "display:none;"} |
| 76 | %center= image_tag "ajax-loader.gif" | 41 | %center= image_tag "ajax-loader.gif" |
| 77 | - | ||
| 78 | .clear | 42 | .clear |