Commit c07d3dfc042fb795322d28523abd9628eccdf8f9
1 parent
06e91674
Exists in
master
and in
4 other branches
issue restyle example
Showing
3 changed files
with
53 additions
and
22 deletions
Show diff stats
app/assets/stylesheets/projects.css.scss
... | ... | @@ -679,6 +679,30 @@ body.project-page table .commit { |
679 | 679 | } |
680 | 680 | } |
681 | 681 | |
682 | +#notes-list .note .delete-note { display:none; } | |
683 | +#notes-list .note:hover .delete-note { display:block; } | |
684 | + | |
685 | +#issues-table-holder .issue .action-links { | |
686 | + display:none; | |
687 | + a { | |
688 | + margin-left:10px; | |
689 | + } | |
690 | +} | |
691 | + | |
692 | +.issue-number { | |
693 | + float: left; | |
694 | + border-radius: 5px; | |
695 | + text-shadow: none; | |
696 | + background: rgba(0, 0, 0, 0.12); | |
697 | + text-align: center; | |
698 | + padding: 14px 8px; | |
699 | + width: 40px; | |
700 | + margin-right: 10px; | |
701 | + color: #444; | |
702 | +} | |
703 | + | |
704 | +#issues-table-holder .issue:hover .action-links { display:block; } | |
705 | + | |
682 | 706 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
683 | 707 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
684 | 708 | body.project-page #notes-list .note img{float: left; margin-right: 10px;} | ... | ... |
app/views/issues/_issues.html.haml
1 | 1 | %table.round-borders#issues-table |
2 | 2 | %thead |
3 | - - if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0" | |
4 | - %th | |
5 | - %th Assignee | |
6 | - %th ID | |
7 | - %th Title | |
8 | - %th Closed? | |
3 | + %th Issues | |
9 | 4 | |
10 | 5 | - @issues.critical.each do |issue| |
11 | 6 | = render(:partial => 'show', :locals => {:issue => issue}) | ... | ... |
app/views/issues/_show.html.haml
1 | 1 | %tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(@project, issue) } |
2 | - - if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0") | |
2 | + -#- if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0") | |
3 | 3 | %td |
4 | 4 | = image_tag "move.png" , :class => [:handle, :left] |
5 | 5 | %td |
6 | - = image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" | |
7 | - = issue.assignee.name | |
8 | - %td ##{issue.id} | |
9 | - %td | |
6 | + %strong.issue-number= "##{issue.id}" | |
7 | + %span | |
8 | + = truncate(html_escape(issue.title), :length => fixed_mode? ? 100 : 200) | |
9 | + %br | |
10 | + %br | |
11 | + %div.note-author | |
12 | + %strong= issue.assignee.name | |
13 | + %cite.cgray | |
14 | + = time_ago_in_words(issue.updated_at) | |
15 | + ago | |
16 | + - if issue.critical | |
17 | + %span.tag.high critical | |
18 | + - if issue.today? | |
19 | + %span.tag.today today | |
20 | + .right.action-links | |
21 | + - if can? current_user, :write_issue, issue | |
22 | + - if issue.closed | |
23 | + = link_to 'Reopen', project_issue_path(@project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true | |
24 | + - else | |
25 | + = link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true | |
26 | + - if can? current_user, :write_issue, issue | |
27 | + = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true | |
28 | + - if can?(current_user, :admin_issue, @project) || issue.author == current_user | |
29 | + = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" | |
30 | + -#%td ##{issue.id} | |
31 | + -#%td | |
10 | 32 | = truncate(html_escape(issue.title), :length => 200) |
11 | 33 | %br |
12 | 34 | %br |
13 | - - if issue.critical | |
14 | - %span.tag.high critical | |
15 | - - if issue.today? | |
16 | - %span.tag.today today | |
17 | 35 | |
18 | - .right | |
19 | - - if can?(current_user, :admin_issue, @project) || issue.author == current_user | |
20 | - = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true | |
21 | - - if can?(current_user, :admin_issue, @project) || issue.author == current_user | |
22 | - | |
23 | - = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" | |
24 | 36 | |
25 | 37 | -#- if issue.author == current_user |
26 | 38 | -#%span.tag.yours yours |
... | ... | @@ -28,7 +40,7 @@ |
28 | 40 | -#%span.tag.notes |
29 | 41 | -#= issue.notes.count |
30 | 42 | -#notes |
31 | - %td | |
43 | + -#%td | |
32 | 44 | - if can? current_user, :write_issue, @project |
33 | 45 | = form_for([@project, issue], :remote => true) do |f| |
34 | 46 | = f.check_box :closed, :onclick => "$(this).parent().submit();" | ... | ... |