From 671e261e900491ae29e118ac12f3ca9328109ab8 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 6 Nov 2011 15:52:23 +0200 Subject: [PATCH] lil design changes --- app/assets/stylesheets/projects.css.scss | 4 ++++ app/views/issues/_issues.html.haml | 1 - app/views/issues/_show.html.haml | 14 ++++++++------ app/views/notes/_show.html.haml | 10 +++++----- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index c4b5de8a..c31f795a 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -663,6 +663,10 @@ table.highlighttable pre{ } } +.cgray { color:gray; } +.cred { color:#D12F19; } +.cgreen { color:#44aa22; } + 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 a6a38e69..d758fed5 100644 --- a/app/views/issues/_issues.html.haml +++ b/app/views/issues/_issues.html.haml @@ -6,7 +6,6 @@ %th ID %th Title %th Closed? - %th - @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 05208d09..72b99b04 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -14,6 +14,14 @@ %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 -#- if issue.notes.count > 0 @@ -27,9 +35,3 @@ = hidden_field_tag :status_only, true - else = check_box_tag "closed", 1, issue.closed, :disabled => true - %td - - if @view_mode == :fluid - - if can?(current_user, :admin_issue, @project) || issue.author == current_user - = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "lbutton positive", :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 => "lbutton delete-issue negative", :id => "destroy_issue_#{issue.id}" diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml index 5d766291..27cb3874 100644 --- a/app/views/notes/_show.html.haml +++ b/app/views/notes/_show.html.haml @@ -2,16 +2,16 @@ = image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" %div.note-author %strong= note.author_name - %cite + %cite.cgray = time_ago_in_words(note.updated_at) ago - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) - = link_to 'Remove', [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-note right negative" + = link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note right" %div.note-title = markdown(note.note) - if note.attachment.url - Attachment: - = link_to note.attachment_identifier, note.attachment.url, :target => "_blank" - %br + .right + %span.file + = link_to note.attachment_identifier, note.attachment.url, :target => "_blank" .clear