summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan Loong Liauw <hanloongliauw@gmail.com>2015-10-12 18:38:34 +1100
committerHan Loong Liauw <hanloongliauw@gmail.com>2015-10-12 18:38:34 +1100
commit857cc388e1a93760e37145cd32514dc4026d0775 (patch)
tree63530310ef25ee238b93adcd4a34f96ea083ee8f
parent42603af3267bd1be0dcd18927d74bfc19a894c04 (diff)
downloadgitlab-ce-857cc388e1a93760e37145cd32514dc4026d0775.tar.gz
Adds modified date to snippets#show #1767
- Fixed a bug with .btn-sm padding. - Changed created_at to modified_at for snippets#index as it seems to be more relevant.
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/stylesheets/generic/buttons.scss10
-rw-r--r--app/views/shared/snippets/_snippet.html.haml3
-rw-r--r--app/views/snippets/show.html.haml4
4 files changed, 14 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a3d796bea66..1e41f6251bd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -45,6 +45,7 @@ v 8.1.0 (unreleased)
- Fix position of hamburger in header for smaller screens (Han Loong Liauw)
- Fix bug where Emojis in Markdown would truncate remaining text (Sakata Sinji)
- Persist filters when sorting on admin user page (Jerry Lukins)
+ - Added last modified date to snippets#show (Han Loong Liauw)
v 8.0.4
- Fix Message-ID header to be RFC 2111-compliant to prevent e-mails being dropped (Stan Hu)
diff --git a/app/assets/stylesheets/generic/buttons.scss b/app/assets/stylesheets/generic/buttons.scss
index 11acbe3adfa..da69fc8f51c 100644
--- a/app/assets/stylesheets/generic/buttons.scss
+++ b/app/assets/stylesheets/generic/buttons.scss
@@ -22,6 +22,12 @@
padding: 11px 24px;
}
+@mixin btn-sm {
+ @include btn-default;
+ @include border-radius(2px);
+ padding: 5px 10px;
+}
+
@mixin btn-color($light, $border-light, $normal, $border-normal, $dark, $border-dark, $color) {
background-color: $light;
border-color: $border-light;
@@ -71,6 +77,10 @@
@include btn-default;
@include btn-white;
+ &.btn-sm {
+ @include btn-sm;
+ }
+
&.btn-success,
&.btn-new,
&.btn-create,
diff --git a/app/views/shared/snippets/_snippet.html.haml b/app/views/shared/snippets/_snippet.html.haml
index 69a713ad9aa..6f4b0453ad3 100644
--- a/app/views/shared/snippets/_snippet.html.haml
+++ b/app/views/shared/snippets/_snippet.html.haml
@@ -17,5 +17,4 @@
= link_to user_snippets_path(snippet.author) do
= image_tag avatar_icon(snippet.author_email), class: "avatar s24", alt: ''
= snippet.author_name
- authored #{time_ago_with_tooltip(snippet.created_at)}
-
+ authored #{time_ago_with_tooltip(snippet.updated_at)}
diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml
index 97374e073dc..a12cfd0ff43 100644
--- a/app/views/snippets/show.html.haml
+++ b/app/views/snippets/show.html.haml
@@ -11,12 +11,12 @@
= link_to new_snippet_path, class: "btn btn-new btn-sm", title: "New Snippet" do
Add new snippet
-.append-bottom-10.prepend-top-10
+.append-bottom-10.prepend-top-10.clearfix
.pull-right
%span.light
- created by
= link_to user_snippets_path(@snippet.author) do
= @snippet.author_name
+ authored #{time_ago_with_tooltip(@snippet.updated_at)}
.back-link
- if @snippet.author == current_user