Commit 23a1ba73 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix different styles/button positions

parent 72a13fcc
......@@ -476,3 +476,33 @@ body.project-page table.no-borders td{
}
#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"
has_many :notes, :as => :noteable
delegate :name,
:email,
:to => :author,
:prefix => true
attr_protected :author, :author_id, :project, :project_id
validates_presence_of :project_id
......
%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
%div{ :class => "update-data ui-box ui-box-small ui-box-big" }
%h3
......@@ -17,4 +21,3 @@
.clear
%br
= link_to 'New Merge request', new_project_merge_request_path(@project), :class => "grey-button"
%h2.icon
%span>
Team
- if can? current_user, :admin_team_member, @project
%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
%table.round-borders#team-table
%thead
......
......@@ -32,3 +32,5 @@
.buttons
= 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}"
%div
- if can? current_user, :write_snippet, @project
= link_to 'New Snippet', new_project_snippet_path(@project), :class => "grey-button append-bottom-10"
%h2.icon
%span>
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
%table#snippets-table
= render @snippets.fresh
:javascript
$('.delete-snippet').live('ajax:success', function() {
$(this).closest('tr').fadeOut(); });
- if !@snippet.expired?
.ui-box.width-100p
%h3
= @snippet.title
.right= @snippet.file_name
%div
%span.entity-info
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
= link_to edit_project_snippet_path(@project, @snippet) do
.entity-button
Edit Snippet
%i
- 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")
%hr
.view_file
.view_file_header
%strong= @snippet.file_name
.data.no-padding
:erb
<%= raw @snippet.colorize %>
.clear
%br
.snippet_notes= render "notes/notes"
.buttons
- 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
- else
%h2
Sorry, this snippet is no longer exists
.clear
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment