diff options
author | gitlabhq <m@gitlabhq.com> | 2011-11-22 07:50:47 -0500 |
---|---|---|
committer | gitlabhq <m@gitlabhq.com> | 2011-11-22 07:50:47 -0500 |
commit | 3f0d8079557e573871cbb1b62e0f90e4e34853f9 (patch) | |
tree | 8b82246434fd838e29a8738cd3ba6c17a9f18789 | |
parent | a59b70902143f8f734c00baaa2fb006c073b91d7 (diff) | |
download | gitlab-ce-3f0d8079557e573871cbb1b62e0f90e4e34853f9.tar.gz |
file name overflow fixed
-rw-r--r-- | app/assets/stylesheets/projects.css.scss | 1 | ||||
-rw-r--r-- | app/decorators/tree_decorator.rb | 2 | ||||
-rw-r--r-- | app/models/tree.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/project.html.haml | 3 | ||||
-rw-r--r-- | app/views/refs/_tree_file.html.haml | 8 | ||||
-rw-r--r-- | app/views/snippets/index.html.haml | 2 |
6 files changed, 17 insertions, 3 deletions
diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 5d0d4df7ad0..029b8d3fbd7 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -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; } diff --git a/app/decorators/tree_decorator.rb b/app/decorators/tree_decorator.rb index 8379006c94b..11af9724c0f 100644 --- a/app/decorators/tree_decorator.rb +++ b/app/decorators/tree_decorator.rb @@ -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| diff --git a/app/models/tree.rb b/app/models/tree.rb index db9df1312f0..16b23a5e9d3 100644 --- a/app/models/tree.rb +++ b/app/models/tree.rb @@ -22,4 +22,8 @@ class Tree def is_blob? tree.is_a?(Grit::Blob) end + + def empty? + data.blank? + end end diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index bc019f38f08..00955a450c1 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -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 diff --git a/app/views/refs/_tree_file.html.haml b/app/views/refs/_tree_file.html.haml index b3a11e58ce6..86597706b57 100644 --- a/app/views/refs/_tree_file.html.haml +++ b/app/views/refs/_tree_file.html.haml @@ -8,8 +8,12 @@ %br/ - if file.text? .view_file_content - :erb - <%= raw file.colorize %> + - 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)}"} diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index c76107b9e2e..691ec6408a8 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -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 |