Commit 3f0d8079557e573871cbb1b62e0f90e4e34853f9

Authored by gitlabhq
1 parent a59b7090

file name overflow fixed

app/assets/stylesheets/projects.css.scss
... ... @@ -385,3 +385,4 @@ body.dashboard.project-page .news-feed .project-updates a.project-update span.up
385 385  
386 386 body.project-page .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; }
387 387  
  388 +body.projects-page input.text.git-url.project_list_url { width:165px; }
... ...
app/decorators/tree_decorator.rb
... ... @@ -6,6 +6,8 @@ class TreeDecorator < ApplicationDecorator
6 6 part_path = ""
7 7 parts = path.split("\/")
8 8  
  9 + parts = parts[0...-1] if is_blob?
  10 +
9 11 yield(h.link_to("..", "#", :remote => :true)) if parts.count > max_links
10 12  
11 13 parts.each do |part|
... ...
app/models/tree.rb
... ... @@ -22,4 +22,8 @@ class Tree
22 22 def is_blob?
23 23 tree.is_a?(Grit::Blob)
24 24 end
  25 +
  26 + def empty?
  27 + data.blank?
  28 + end
25 29 end
... ...
app/views/layouts/project.html.haml
... ... @@ -46,6 +46,9 @@
46 46 - if @commit
47 47 = 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
48 48  
  49 + - if can? current_user, :admin_project, @project
  50 + = link_to "Edit", edit_project_path(@project), :class => (current_page?(edit_project_path(@project))) ? "current" : nil
  51 +
49 52 .medium-tags{:style => 'padding: 10px 0 0 10px; width: 210px;'}= tag_list @project
50 53  
51 54 .project-content
... ...
app/views/refs/_tree_file.html.haml
... ... @@ -8,8 +8,12 @@
8 8 %br/
9 9 - if file.text?
10 10 .view_file_content
11   - :erb
12   - <%= raw file.colorize %>
  11 + - unless file.empty?
  12 + :erb
  13 + <%= raw file.colorize %>
  14 + - else
  15 + %h3
  16 + %center Empty file
13 17 - elsif file.image?
14 18 .view_file_content_image
15 19 %img{ :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
... ...
app/views/snippets/index.html.haml
1 1 %div
2 2 - if can? current_user, :write_snippet, @project
3   - = link_to 'New Snippet', new_project_snippet_path(@project), :class => "button append-bottom-10"
  3 + = link_to 'New Snippet', new_project_snippet_path(@project), :class => "grey-button append-bottom-10"
4 4  
5 5 %table.round-borders#snippets-table
6 6 %thead
... ...