diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-12-08 14:29:15 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-12-10 00:57:23 -0600 |
commit | 68c1e3a1568d9f61bf1e01d6ff55ce59c5c3eaaf (patch) | |
tree | d06d2a31338017ace22bee19f4fd3d991f88e76b | |
parent | 1ea478476404d6696d65269fd2ffe6ca29740035 (diff) | |
download | gitlab-ce-68c1e3a1568d9f61bf1e01d6ff55ce59c5c3eaaf.tar.gz |
update snippets list design
-rw-r--r-- | app/assets/stylesheets/pages/snippets.scss | 10 | ||||
-rw-r--r-- | app/views/shared/snippets/_snippet.html.haml | 23 |
2 files changed, 20 insertions, 13 deletions
diff --git a/app/assets/stylesheets/pages/snippets.scss b/app/assets/stylesheets/pages/snippets.scss index 857eb76131a..e6e86556695 100644 --- a/app/assets/stylesheets/pages/snippets.scss +++ b/app/assets/stylesheets/pages/snippets.scss @@ -1,3 +1,13 @@ +.snippet-row { + .title { + margin-bottom: 2px; + } + + .snippet-filename { + padding: 0 2px; + } +} + .snippet-form-holder .file-holder .file-title { padding: 2px; } diff --git a/app/views/shared/snippets/_snippet.html.haml b/app/views/shared/snippets/_snippet.html.haml index ea17bec8677..95985ad6afb 100644 --- a/app/views/shared/snippets/_snippet.html.haml +++ b/app/views/shared/snippets/_snippet.html.haml @@ -4,14 +4,11 @@ .title = link_to reliable_snippet_path(snippet) do = snippet.title - - if snippet.private? - %span.label.label-gray.hidden-xs - = icon('lock') - private - %span.monospace.pull-right.hidden-xs - = snippet.file_name + - if snippet.file_name + %span.snippet-filename.monospace.hidden-xs + = snippet.file_name - %ul.controls.visible-xs + %ul.controls %li - note_count = snippet.notes.user.count = link_to reliable_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if note_count.zero?) do @@ -22,11 +19,11 @@ = visibility_level_label(snippet.visibility_level) = visibility_level_icon(snippet.visibility_level, fw: false) - %small.pull-right.cgray.hidden-xs - - if snippet.project_id? - = link_to snippet.project.name_with_namespace, namespace_project_path(snippet.project.namespace, snippet.project) - - .snippet-info.hidden-xs + .snippet-info + #{snippet.to_reference} · + authored #{time_ago_with_tooltip(snippet.created_at, placement: 'bottom')} by = link_to user_snippets_path(snippet.author) do = snippet.author_name - authored #{time_ago_with_tooltip(snippet.created_at)} + + .pull-right.snippet-updated-at + %span updated #{time_ago_with_tooltip(snippet.updated_at, placement: 'bottom', html_class: 'snippet_update_ago')} |