file name overflow fixed

This commit is contained in:
gitlabhq 2011-11-22 07:50:47 -05:00
parent a59b709021
commit 3f0d807955
6 changed files with 17 additions and 3 deletions

View file

@ -385,3 +385,4 @@ body.dashboard.project-page .news-feed .project-updates a.project-update span.up
body.project-page .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; }
body.projects-page input.text.git-url.project_list_url { width:165px; }

View file

@ -6,6 +6,8 @@ class TreeDecorator < ApplicationDecorator
part_path = ""
parts = path.split("\/")
parts = parts[0...-1] if is_blob?
yield(h.link_to("..", "#", :remote => :true)) if parts.count > max_links
parts.each do |part|

View file

@ -22,4 +22,8 @@ class Tree
def is_blob?
tree.is_a?(Grit::Blob)
end
def empty?
data.blank?
end
end

View file

@ -46,6 +46,9 @@
- if @commit
= link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil
- if can? current_user, :admin_project, @project
= link_to "Edit", edit_project_path(@project), :class => (current_page?(edit_project_path(@project))) ? "current" : nil
.medium-tags{:style => 'padding: 10px 0 0 10px; width: 210px;'}= tag_list @project
.project-content

View file

@ -8,8 +8,12 @@
%br/
- if file.text?
.view_file_content
- unless file.empty?
:erb
<%= raw file.colorize %>
- else
%h3
%center Empty file
- elsif file.image?
.view_file_content_image
%img{ :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}

View file

@ -1,6 +1,6 @@
%div
- if can? current_user, :write_snippet, @project
= link_to 'New Snippet', new_project_snippet_path(@project), :class => "button append-bottom-10"
= link_to 'New Snippet', new_project_snippet_path(@project), :class => "grey-button append-bottom-10"
%table.round-borders#snippets-table
%thead