diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-13 19:20:25 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-13 19:20:25 -0700 |
commit | 2da2720584e162c53436a046380740bd64c3ad24 (patch) | |
tree | 7608f1eb08ae5b4e84571257b5f2a8b95cbc1273 /app/views | |
parent | 3aded9d5816b8605d5ccf486ab2e38247e2b654f (diff) | |
download | gitlab-ce-2da2720584e162c53436a046380740bd64c3ad24.tar.gz |
Improve css for file actions
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/help/ui.html.haml | 19 | ||||
-rw-r--r-- | app/views/projects/blame/show.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/blob/_blob.html.haml | 10 | ||||
-rw-r--r-- | app/views/projects/snippets/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/search/results/_snippet_blob.html.haml | 6 | ||||
-rw-r--r-- | app/views/snippets/show.html.haml | 4 |
6 files changed, 33 insertions, 17 deletions
diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index 58de5b7c869..ed03f885dcd 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -22,6 +22,8 @@ %li = link_to 'Forms', '#forms' %li + = link_to 'Files', '#file' + %li = link_to 'Markdown', '#markdown' %h2#blocks Blocks @@ -193,6 +195,23 @@ Remember me %button.btn.btn-default{:type => "submit"} Sign in + %h2#file File + %h3 + %code .file-holder + + - blob = Snippet.new(content: "Wow\nSuch\nFile") + .example + .file-holder + .file-title + Awesome file + .file-actions + .btn-group + %a.btn Edit + %a.btn Remove + .file-contenta.code + = render 'shared/file_highlight', blob: blob + + %h2#markdown Markdown %h3 %code .md or .wiki and others diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 4cc1fedb1ce..e6a859fea8f 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -4,10 +4,11 @@ .file-holder .file-title %i.fa.fa-file - %span.file_name + %strong = @path - %small= number_to_human_size @blob.size - %span.options= render "projects/blob/actions" + %small= number_to_human_size @blob.size + .file-actions + = render "projects/blob/actions" .file-content.blame.highlight %table - @blame.each do |commit, lines, since| diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index 9ff61f3887f..ba60bd92869 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -21,12 +21,14 @@ %div#tree-content-holder.tree-content-holder %article.file-holder - .file-title.clearfix + .file-title %i.fa.fa-file - %span.file_name + %strong = blob.name - %small= number_to_human_size blob.size - %span.options.hidden-xs= render "actions" + %small + = number_to_human_size(blob.size) + .file-actions.hidden-xs + = render "actions" - if blob.text? = render "text", blob: blob - elsif blob.image? diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml index 345848fa6d1..408e3c0224a 100644 --- a/app/views/projects/snippets/show.html.haml +++ b/app/views/projects/snippets/show.html.haml @@ -23,9 +23,9 @@ .file-holder .file-title %i.fa.fa-file - %span.file_name + %strong = @snippet.file_name - .options + .file-actions .btn-group - if can?(current_user, :modify_project_snippet, @snippet) = link_to "edit", edit_namespace_project_snippet_path(@project.namespace, @project, @snippet), class: "btn btn-small", title: 'Edit Snippet' diff --git a/app/views/search/results/_snippet_blob.html.haml b/app/views/search/results/_snippet_blob.html.haml index 6fc2cdf6362..8af393777f0 100644 --- a/app/views/search/results/_snippet_blob.html.haml +++ b/app/views/search/results/_snippet_blob.html.haml @@ -13,12 +13,6 @@ .file-title %i.fa.fa-file %strong= snippet_blob[:snippet_object].file_name - %span.options - .btn-group.tree-btn-group.pull-right - - if snippet_blob[:snippet_object].author == current_user - = link_to "Edit", edit_snippet_path(snippet_blob[:snippet_object]), class: "btn btn-tiny", title: 'Edit Snippet' - = link_to "Delete", snippet_path(snippet_blob[:snippet_object]), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-tiny", title: 'Delete Snippet' - = link_to "Raw", raw_snippet_path(snippet_blob[:snippet_object]), class: "btn btn-tiny", target: "_blank" - if gitlab_markdown?(snippet_blob[:snippet_object].file_name) .file-content.wiki - snippet_blob[:snippet_chunks].each do |snippet| diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index f5bc543de10..d9436caaadb 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -31,9 +31,9 @@ .file-holder .file-title %i.fa.fa-file - %span.file_name + %strong = @snippet.file_name - .options + .file-actions .btn-group - if can?(current_user, :modify_personal_snippet, @snippet) = link_to "edit", edit_snippet_path(@snippet), class: "btn btn-small", title: 'Edit Snippet' |