diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 5d0d4df7..029b8d3f 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 8379006c..11af9724 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 db9df131..16b23a5e 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 bc019f38..00955a45 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 b3a11e58..86597706 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 c76107b9..691ec640 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