Fix different styles/button positions
This commit is contained in:
parent
72a13fcc2e
commit
23a1ba7362
|
@ -476,3 +476,33 @@ body.project-page table.no-borders td{
|
||||||
}
|
}
|
||||||
|
|
||||||
#tree-content-holder { float:left; width:100%; }
|
#tree-content-holder { float:left; width:100%; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Commit Page */
|
||||||
|
.entity-info {float: right;}
|
||||||
|
.entity-button{
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4));
|
||||||
|
background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4);
|
||||||
|
background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4);
|
||||||
|
background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4);
|
||||||
|
box-shadow: 0 -1px 0 white inset;
|
||||||
|
display: block;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
position: relative;
|
||||||
|
padding: 4px 10px;
|
||||||
|
font-size: 11px;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entity-button i{
|
||||||
|
background: url('images.png') no-repeat -138px -27px;
|
||||||
|
width: 6px;
|
||||||
|
height: 9px;
|
||||||
|
float: right;
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
right: 5px;
|
||||||
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@ class Snippet < ActiveRecord::Base
|
||||||
belongs_to :author, :class_name => "User"
|
belongs_to :author, :class_name => "User"
|
||||||
has_many :notes, :as => :noteable
|
has_many :notes, :as => :noteable
|
||||||
|
|
||||||
|
delegate :name,
|
||||||
|
:email,
|
||||||
|
:to => :author,
|
||||||
|
:prefix => true
|
||||||
attr_protected :author, :author_id, :project, :project_id
|
attr_protected :author, :author_id, :project, :project_id
|
||||||
|
|
||||||
validates_presence_of :project_id
|
validates_presence_of :project_id
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
%h2.icon
|
||||||
|
%span>
|
||||||
|
Merge Requests
|
||||||
|
.right= link_to 'New Merge request', new_project_merge_request_path(@project), :class => "grey-button"
|
||||||
- if @merge_requests.opened.count > 0
|
- if @merge_requests.opened.count > 0
|
||||||
%div{ :class => "update-data ui-box ui-box-small ui-box-big" }
|
%div{ :class => "update-data ui-box ui-box-small ui-box-big" }
|
||||||
%h3
|
%h3
|
||||||
|
@ -17,4 +21,3 @@
|
||||||
.clear
|
.clear
|
||||||
%br
|
%br
|
||||||
|
|
||||||
= link_to 'New Merge request', new_project_merge_request_path(@project), :class => "grey-button"
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
|
%h2.icon
|
||||||
|
%span>
|
||||||
|
Team
|
||||||
- if can? current_user, :admin_team_member, @project
|
- if can? current_user, :admin_team_member, @project
|
||||||
%div#new-member-holder
|
%div#new-member-holder
|
||||||
= link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "grey-button"
|
.right= link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "grey-button"
|
||||||
%br
|
%br
|
||||||
%table.round-borders#team-table
|
%table.round-borders#team-table
|
||||||
%thead
|
%thead
|
||||||
|
|
|
@ -32,3 +32,5 @@
|
||||||
|
|
||||||
.buttons
|
.buttons
|
||||||
= f.submit 'Save', :class => "grey-button"
|
= f.submit 'Save', :class => "grey-button"
|
||||||
|
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
||||||
|
.right= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "grey-button delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
%div
|
%h2.icon
|
||||||
- if can? current_user, :write_snippet, @project
|
%span>
|
||||||
= link_to 'New Snippet', new_project_snippet_path(@project), :class => "grey-button append-bottom-10"
|
Snippets
|
||||||
|
- if can? current_user, :write_snippet, @project
|
||||||
|
.right= link_to 'New Snippet', new_project_snippet_path(@project), :class => "grey-button append-bottom-10"
|
||||||
|
|
||||||
|
%table#snippets-table
|
||||||
|
= render @snippets.fresh
|
||||||
|
|
||||||
%table#snippets-table
|
|
||||||
= render @snippets.fresh
|
|
||||||
:javascript
|
:javascript
|
||||||
$('.delete-snippet').live('ajax:success', function() {
|
$('.delete-snippet').live('ajax:success', function() {
|
||||||
$(this).closest('tr').fadeOut(); });
|
$(this).closest('tr').fadeOut(); });
|
||||||
|
|
|
@ -1,23 +1,31 @@
|
||||||
- if !@snippet.expired?
|
%div
|
||||||
.ui-box.width-100p
|
%span.entity-info
|
||||||
%h3
|
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
||||||
= @snippet.title
|
= link_to edit_project_snippet_path(@project, @snippet) do
|
||||||
.right= @snippet.file_name
|
.entity-button
|
||||||
.data.no-padding
|
Edit Snippet
|
||||||
:erb
|
%i
|
||||||
<%= raw @snippet.colorize %>
|
- if @snippet.author_email
|
||||||
|
= image_tag gravatar_icon(@snippet.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||||
|
- else
|
||||||
|
= image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||||
|
%span.commit-title
|
||||||
|
%strong
|
||||||
|
= truncate(@snippet.title, :length => 60)
|
||||||
|
%span.commit-author
|
||||||
|
%strong= @snippet.author_name
|
||||||
|
= @snippet.created_at.stamp("Aug 21, 2011 9:23pm")
|
||||||
|
|
||||||
.buttons
|
%hr
|
||||||
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
|
||||||
= link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "grey-button"
|
|
||||||
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
|
||||||
.right= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "grey-button delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
|
|
||||||
.clear
|
|
||||||
%br
|
|
||||||
.snippet_notes= render "notes/notes"
|
|
||||||
|
|
||||||
.clear
|
.view_file
|
||||||
|
.view_file_header
|
||||||
|
%strong= @snippet.file_name
|
||||||
|
.data.no-padding
|
||||||
|
:erb
|
||||||
|
<%= raw @snippet.colorize %>
|
||||||
|
.clear
|
||||||
|
%br
|
||||||
|
.snippet_notes= render "notes/notes"
|
||||||
|
|
||||||
- else
|
.clear
|
||||||
%h2
|
|
||||||
Sorry, this snippet is no longer exists
|
|
||||||
|
|
Loading…
Reference in a new issue