Commit b1fbd658 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve UI for project snippets

parent bbb06e50
%li %li
.snippet-title %h4.snippet-title
- if snippet.private?
%i.icon-lock.cgreen
- else
%i.icon-globe.cblue
= link_to reliable_snippet_path(snippet) do = link_to reliable_snippet_path(snippet) do
%h5.inline = truncate(snippet.title, length: 60)
= truncate(snippet.title, length: 60) %span.cgray.monospace.tiny.pull-right
%span.cgray
= snippet.file_name = snippet.file_name
%small.pull-right.cgray %small.pull-right.cgray
...@@ -17,9 +12,10 @@ ...@@ -17,9 +12,10 @@
- else - else
Never Never
.snippet-info.prepend-left-20 .snippet-info
= "##{snippet.id}" = "##{snippet.id}"
%span.light %span
by by
= image_tag gravatar_icon(snippet.author_email), class: "avatar avatar-inline s16" = image_tag gravatar_icon(snippet.author_email), class: "avatar avatar-inline s16"
= snippet.author_name = snippet.author_name
%span.light #{time_ago_in_words(snippet.created_at)} ago
%h3.page-title %h3.page-title
%i.icon-lock.cgreen
= @snippet.title = @snippet.title
%small.pull-right %small.pull-right
......
...@@ -13,7 +13,7 @@ Gitlab::Seeder.quiet do ...@@ -13,7 +13,7 @@ Gitlab::Seeder.quiet do
PersonalSnippet.seed(:id, [{ PersonalSnippet.seed(:id, [{
id: i, id: i,
author_id: user.id, author_id: user.id,
title: Faker::Lorem.sentence(6), title: Faker::Lorem.sentence(3),
file_name: Faker::Internet.domain_word + '.sh', file_name: Faker::Internet.domain_word + '.sh',
private: [true, false].sample, private: [true, false].sample,
content: contents.sample, content: contents.sample,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment