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

show.html.haml « snippets « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bb444efec795b1dc60fb010f466261fe0dd1fb79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%h2
  = "Snippet ##{@snippet.id} - #{@snippet.title}"

.view_file
  .view_file_header
    %strong
      = @snippet.file_name
      %br/
  .view_file_content
    - ft = handle_file_type(@snippet.file_name)
    :erb
      <%= raw Albino.colorize(@snippet.content, ft, :html, 'utf-8', "linenos=True") %>

- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
  = link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive"
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
  = link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
.clear
%br
.snippet_notes= render "notes/notes"

.clear