diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index e5d39474..3fe6b233 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -679,6 +679,30 @@ body.project-page table .commit { } } +#notes-list .note .delete-note { display:none; } +#notes-list .note:hover .delete-note { display:block; } + +#issues-table-holder .issue .action-links { + display:none; + a { + margin-left:10px; + } +} + +.issue-number { + float: left; + border-radius: 5px; + text-shadow: none; + background: rgba(0, 0, 0, 0.12); + text-align: center; + padding: 14px 8px; + width: 40px; + margin-right: 10px; + color: #444; +} + +#issues-table-holder .issue:hover .action-links { display:block; } + body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} body.project-page #notes-list .note img{float: left; margin-right: 10px;} diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml index d758fed5..5651883a 100644 --- a/app/views/issues/_issues.html.haml +++ b/app/views/issues/_issues.html.haml @@ -1,11 +1,6 @@ %table.round-borders#issues-table %thead - - if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0" - %th - %th Assignee - %th ID - %th Title - %th Closed? + %th Issues - @issues.critical.each do |issue| = render(:partial => 'show', :locals => {:issue => issue}) diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml index 72b99b04..9f2e90e2 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -1,26 +1,38 @@ %tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(@project, issue) } - - if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0") + -#- if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0") %td = image_tag "move.png" , :class => [:handle, :left] %td - = image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" - = issue.assignee.name - %td ##{issue.id} - %td + %strong.issue-number= "##{issue.id}" + %span + = truncate(html_escape(issue.title), :length => fixed_mode? ? 100 : 200) + %br + %br + %div.note-author + %strong= issue.assignee.name + %cite.cgray + = time_ago_in_words(issue.updated_at) + ago + - if issue.critical + %span.tag.high critical + - if issue.today? + %span.tag.today today + .right.action-links + - if can? current_user, :write_issue, issue + - if issue.closed + = link_to 'Reopen', project_issue_path(@project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true + - else + = link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true + - if can? current_user, :write_issue, issue + = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true + - if can?(current_user, :admin_issue, @project) || issue.author == current_user + = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" + -#%td ##{issue.id} + -#%td = truncate(html_escape(issue.title), :length => 200) %br %br - - if issue.critical - %span.tag.high critical - - if issue.today? - %span.tag.today today - .right - - if can?(current_user, :admin_issue, @project) || issue.author == current_user - = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true - - if can?(current_user, :admin_issue, @project) || issue.author == current_user -   - = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" -#- if issue.author == current_user -#%span.tag.yours yours @@ -28,7 +40,7 @@ -#%span.tag.notes -#= issue.notes.count -#notes - %td + -#%td - if can? current_user, :write_issue, @project = form_for([@project, issue], :remote => true) do |f| = f.check_box :closed, :onclick => "$(this).parent().submit();"