Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan Loong Liauw <hanloongliauw@gmail.com>2015-10-14 15:12:08 +0300
committerHan Loong Liauw <hanloongliauw@gmail.com>2015-10-14 15:53:52 +0300
commit1f92c22fec8493fa0efb8a53829a4c726e78934e (patch)
tree51dd95359ef6dcd4a509114eccd32cc09350778b /app/views/snippets
parenta60853fda09b37c2990b2437baa7a5d13b54572d (diff)
New snippet design for projects
Split out header into shared partial Used action partials to have unique actions for shared and personal snippets changed back to created date in list view Switched to using existing color classes
Diffstat (limited to 'app/views/snippets')
-rw-r--r--app/views/snippets/_actions.html.haml8
-rw-r--r--app/views/snippets/show.html.haml32
2 files changed, 9 insertions, 31 deletions
diff --git a/app/views/snippets/_actions.html.haml b/app/views/snippets/_actions.html.haml
new file mode 100644
index 00000000000..a4fdf89a4ee
--- /dev/null
+++ b/app/views/snippets/_actions.html.haml
@@ -0,0 +1,8 @@
+= link_to new_snippet_path, class: 'btn btn-grouped new-snippet-link', title: "New Snippet" do
+ = icon('plus')
+ new snippet
+= link_to "remove", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-grouped btn-remove", title: 'Delete Snippet'
+- if can?(current_user, :update_personal_snippet, @snippet)
+ = link_to edit_snippet_path(@snippet), class: "btn btn-grouped snippable-edit" do
+ = icon('pencil-square-o')
+ Edit
diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml
index 9d20b76cbf2..202a43bc57d 100644
--- a/app/views/snippets/show.html.haml
+++ b/app/views/snippets/show.html.haml
@@ -1,35 +1,5 @@
- page_title @snippet.title, "Snippets"
-
-.snippet
- .snippet-details
- .page-title
- - if @snippet.private?
- .snippet-box.snippet-box-locked
- %i.fa.fa-lock
- Private
- %span.snippet-id Snippet ##{@snippet.id}
- %span.creator
- &middot; created by #{link_to_member(@project, @snippet.author, size: 24)}
- &middot;
- = time_ago_with_tooltip(@snippet.created_at, placement: 'bottom', html_class: 'snippet_updated_ago')
- - if @snippet.updated_at != @snippet.created_at
- %span
- &middot;
- = icon('edit', title: 'edited')
- = time_ago_with_tooltip(@snippet.updated_at, placement: 'bottom', html_class: 'snippet_edited_ago')
-
- .pull-right
- = link_to new_snippet_path, class: 'btn btn-grouped new-snippet-link', title: "New Snippet" do
- = icon('plus')
- new snippet
- = link_to "remove", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-grouped btn-remove", title: 'Delete Snippet'
- - if can?(current_user, :update_personal_snippet, @snippet)
- = link_to edit_snippet_path(@snippet), class: "btn btn-grouped issuabled-edit" do
- = icon('pencil-square-o')
- Edit
- .gray-content-block.middle-block
- %h2.snippet-title
- = gfm escape_once(@snippet.title)
+= render 'shared/snippets/header'
.file-holder
.file-title