snippet table restyle
This commit is contained in:
parent
9d91378980
commit
48a1e31010
3 changed files with 21 additions and 14 deletions
|
@ -622,13 +622,16 @@ body.project-page table .commit {
|
||||||
#notes-list .note .delete-note { display:none; }
|
#notes-list .note .delete-note { display:none; }
|
||||||
#notes-list .note:hover .delete-note { display:block; }
|
#notes-list .note:hover .delete-note { display:block; }
|
||||||
|
|
||||||
|
.snippet .action-links,
|
||||||
#issues-table-holder .issue .action-links {
|
#issues-table-holder .issue .action-links {
|
||||||
display:none;
|
display:none;
|
||||||
a {
|
a {
|
||||||
margin-left:10px;
|
margin-left:10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.snippet:hover .action-links { display:block; }
|
||||||
|
|
||||||
.issue-number {
|
.issue-number {
|
||||||
float: left;
|
float: left;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
@ -665,6 +668,7 @@ body.project-page #notes-list .note span.note-author strong{font-weight: bold; f
|
||||||
//.message .note-title p { margin-bottom:0px; }
|
//.message .note-title p { margin-bottom:0px; }
|
||||||
|
|
||||||
.commit,
|
.commit,
|
||||||
|
.snippet,
|
||||||
.message {
|
.message {
|
||||||
.title {
|
.title {
|
||||||
color:#666;
|
color:#666;
|
||||||
|
|
|
@ -2,11 +2,17 @@
|
||||||
%tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) }
|
%tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) }
|
||||||
%td
|
%td
|
||||||
= image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
= image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
||||||
= truncate snippet.author.name, :lenght => 20
|
%span
|
||||||
%td= html_escape snippet.title
|
%strong= html_escape snippet.title
|
||||||
%td= html_escape snippet.file_name
|
%br
|
||||||
%td
|
%br
|
||||||
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
%div.author
|
||||||
= link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "lbutton positive"
|
%strong= truncate snippet.author.name, :lenght => 20
|
||||||
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
%cite.cgray
|
||||||
= link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
|
= time_ago_in_words(snippet.updated_at)
|
||||||
|
ago
|
||||||
|
.right.action-links
|
||||||
|
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
||||||
|
= link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "cgray"
|
||||||
|
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
||||||
|
= link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
|
||||||
|
|
|
@ -3,11 +3,8 @@
|
||||||
.left= link_to 'New Snippet', new_project_snippet_path(@project), :class => "lbutton vm"
|
.left= link_to 'New Snippet', new_project_snippet_path(@project), :class => "lbutton vm"
|
||||||
|
|
||||||
%table.round-borders#snippets-table
|
%table.round-borders#snippets-table
|
||||||
%tr
|
%thead
|
||||||
%th Author
|
%th
|
||||||
%th Title
|
|
||||||
%th File name
|
|
||||||
%th
|
|
||||||
= render @snippets.fresh
|
= render @snippets.fresh
|
||||||
:javascript
|
:javascript
|
||||||
$('.delete-snippet').live('ajax:success', function() {
|
$('.delete-snippet').live('ajax:success', function() {
|
||||||
|
|
Loading…
Reference in a new issue