From b1fbd6583247c85096bc9c7362907db3539e806b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 18 Jul 2013 13:21:56 +0300 Subject: [PATCH] Improve UI for project snippets --- app/views/projects/snippets/_snippet.html.haml | 16 ++++++---------- app/views/projects/snippets/show.html.haml | 1 - db/fixtures/development/12_snippets.rb | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/views/projects/snippets/_snippet.html.haml b/app/views/projects/snippets/_snippet.html.haml index 72865bf28..fc1c0893b 100644 --- a/app/views/projects/snippets/_snippet.html.haml +++ b/app/views/projects/snippets/_snippet.html.haml @@ -1,13 +1,8 @@ %li - .snippet-title - - if snippet.private? - %i.icon-lock.cgreen - - else - %i.icon-globe.cblue + %h4.snippet-title = link_to reliable_snippet_path(snippet) do - %h5.inline - = truncate(snippet.title, length: 60) - %span.cgray + = truncate(snippet.title, length: 60) + %span.cgray.monospace.tiny.pull-right = snippet.file_name %small.pull-right.cgray @@ -17,9 +12,10 @@ - else Never - .snippet-info.prepend-left-20 + .snippet-info = "##{snippet.id}" - %span.light + %span by = image_tag gravatar_icon(snippet.author_email), class: "avatar avatar-inline s16" = snippet.author_name + %span.light #{time_ago_in_words(snippet.created_at)} ago diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml index 564c2e8b7..4a07ebf7f 100644 --- a/app/views/projects/snippets/show.html.haml +++ b/app/views/projects/snippets/show.html.haml @@ -1,5 +1,4 @@ %h3.page-title - %i.icon-lock.cgreen = @snippet.title %small.pull-right diff --git a/db/fixtures/development/12_snippets.rb b/db/fixtures/development/12_snippets.rb index 78f24446a..4ca8afe29 100644 --- a/db/fixtures/development/12_snippets.rb +++ b/db/fixtures/development/12_snippets.rb @@ -13,7 +13,7 @@ Gitlab::Seeder.quiet do PersonalSnippet.seed(:id, [{ id: i, author_id: user.id, - title: Faker::Lorem.sentence(6), + title: Faker::Lorem.sentence(3), file_name: Faker::Internet.domain_word + '.sh', private: [true, false].sample, content: contents.sample, -- 2.11.0