Styled snippets. Raw button for snippet
This commit is contained in:
parent
b96af79bb8
commit
093159a868
5 changed files with 39 additions and 7 deletions
|
@ -1,6 +1,12 @@
|
|||
%tr
|
||||
%td
|
||||
%a{:href => project_snippet_path(snippet.project, snippet)}
|
||||
= truncate(snippet.title, :length => 60)
|
||||
%span.right.cgray
|
||||
= snippet.file_name
|
||||
%strong= truncate(snippet.title, :length => 60)
|
||||
%td
|
||||
= snippet.file_name
|
||||
%td
|
||||
%span.cgray
|
||||
- if snippet.expires_at
|
||||
= snippet.expires_at.to_date.to_s(:short)
|
||||
- else
|
||||
Never
|
||||
|
|
|
@ -8,5 +8,14 @@
|
|||
%br
|
||||
To add new snippet - click on button.
|
||||
|
||||
- unless @snippets.fresh.empty?
|
||||
%table.zebra-striped.borders= render @snippets.fresh
|
||||
%table.admin-table
|
||||
%thead
|
||||
%tr
|
||||
%th Title
|
||||
%th File Name
|
||||
%th Expires At
|
||||
= render @snippets.fresh
|
||||
- if @snippets.fresh.empty?
|
||||
%tr
|
||||
%td{:colspan => 3}
|
||||
%h3.nothing_here_message Nothing here.
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
.view_file_header
|
||||
%i.icon-file
|
||||
%strong= @snippet.file_name
|
||||
%span.options
|
||||
= link_to "raw", raw_project_snippet_path(@project, @snippet), :class => "btn very_small", :target => "_blank"
|
||||
.view_file_content
|
||||
%div{:class => current_user.dark_scheme ? "black" : ""}
|
||||
= raw @snippet.colorize(options: { linenos: 'True'})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue