diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-29 23:11:30 +0200 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-30 23:32:03 +0200 |
commit | 0d4ae0e392b3ea5c5ff3b0fd37725cdc07a70191 (patch) | |
tree | 30726dc68cba3b26165e44055af8e48e7666760b /app | |
parent | 2b88c9cd15d79ff755cea501d5d6fb511538de73 (diff) | |
download | gitlab-ce-0d4ae0e392b3ea5c5ff3b0fd37725cdc07a70191.tar.gz |
Titleize blob action buttons.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/blob/_actions.html.haml | 21 | ||||
-rw-r--r-- | app/views/projects/tree/_tree.html.haml | 2 |
2 files changed, 14 insertions, 9 deletions
diff --git a/app/views/projects/blob/_actions.html.haml b/app/views/projects/blob/_actions.html.haml index 8587dc4bc6d..64c19a57803 100644 --- a/app/views/projects/blob/_actions.html.haml +++ b/app/views/projects/blob/_actions.html.haml @@ -2,21 +2,26 @@ -# only show edit link for text files - if @blob.text? - if allowed_tree_edit? - = link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-small" + = link_to 'Edit', project_edit_tree_path(@project, @id), + class: 'btn btn-small' - else - %span.btn.btn-small.disabled edit - = link_to "raw", project_raw_path(@project, @id), class: "btn btn-small", target: "_blank" + %span.btn.btn-small.disabled Edit + = link_to 'Raw', project_raw_path(@project, @id), + class: 'btn btn-small', target: '_blank' -# only show normal/blame view links for text files - if @blob.text? - if current_page? project_blame_path(@project, @id) - = link_to "normal view", project_blob_path(@project, @id), class: "btn btn-small" + = link_to 'Normal View', project_blob_path(@project, @id), + class: 'btn btn-small' - else - = link_to "blame", project_blame_path(@project, @id), class: "btn btn-small" unless @blob.empty? - = link_to "history", project_commits_path(@project, @id), class: "btn btn-small" + = link_to 'Blame', project_blame_path(@project, @id), + class: 'btn btn-small' unless @blob.empty? + = link_to 'History', project_commits_path(@project, @id), + class: 'btn btn-small' - if @ref != @commit.sha - = link_to 'permalink', project_blob_path(@project, + = link_to 'Permalink', project_blob_path(@project, tree_join(@commit.sha, @path)), class: 'btn btn-small' - if allowed_tree_edit? = link_to '#modal-remove-blob', class: "remove-blob btn btn-small btn-remove", "data-toggle" => "modal" do - remove + Remove diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml index 84c3682d7ab..9fe990d0fbd 100644 --- a/app/views/projects/tree/_tree.html.haml +++ b/app/views/projects/tree/_tree.html.haml @@ -30,7 +30,7 @@ = link_to @commit.short_id, project_commit_path(@project, @commit) – = truncate(@commit.title, length: 50) - = link_to "history", project_commits_path(@project, @id), class: "pull-right" + = link_to 'History', project_commits_path(@project, @id), class: 'pull-right' - if @path.present? %tr.tree-item |