debian-mirror-gitlab/app/views/projects/snippets/show.html.haml

39 lines
1.4 KiB
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- page_title @snippet.title, "Snippets"
2014-09-02 18:07:02 +05:30
%h3.page-title
= @snippet.title
.pull-right
2015-04-26 12:48:37 +05:30
= link_to new_namespace_project_snippet_path(@project.namespace, @project), class: "btn btn-new", title: "New Snippet" do
2014-09-02 18:07:02 +05:30
Add new snippet
%hr
.append-bottom-20
.pull-right
= "##{@snippet.id}"
%span.light
by
= link_to user_path(@snippet.author) do
= image_tag avatar_icon(@snippet.author_email), class: "avatar avatar-inline s16"
= @snippet.author_name
.back-link
2015-04-26 12:48:37 +05:30
= link_to namespace_project_snippets_path(@project.namespace, @project) do
2014-09-02 18:07:02 +05:30
← project snippets
.file-holder
.file-title
2015-04-26 12:48:37 +05:30
%i.fa.fa-file
%strong
2014-09-02 18:07:02 +05:30
= @snippet.file_name
2015-04-26 12:48:37 +05:30
.file-actions
2014-09-02 18:07:02 +05:30
.btn-group
2015-09-11 14:41:01 +05:30
- if can?(current_user, :update_project_snippet, @snippet)
2015-04-26 12:48:37 +05:30
= link_to "edit", edit_namespace_project_snippet_path(@project.namespace, @project, @snippet), class: "btn btn-sm", title: 'Edit Snippet'
= link_to "raw", raw_namespace_project_snippet_path(@project.namespace, @project, @snippet), class: "btn btn-sm", target: "_blank"
2014-09-02 18:07:02 +05:30
- if can?(current_user, :admin_project_snippet, @snippet)
2015-04-26 12:48:37 +05:30
= link_to "remove", namespace_project_snippet_path(@project.namespace, @project, @snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-sm btn-remove", title: 'Delete Snippet'
2014-09-02 18:07:02 +05:30
= render 'shared/snippets/blob'
%div#notes= render "projects/notes/notes_with_form"