Commit 33347efa26857243c9e61d4c89d1c4631244c5be
1 parent
82e1fe46
Exists in
master
and in
4 other branches
User links to user snippets
Showing
7 changed files
with
14 additions
and
10 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap/lists.scss
@@ -75,7 +75,6 @@ ul.bordered-list { | @@ -75,7 +75,6 @@ ul.bordered-list { | ||
75 | display: block; | 75 | display: block; |
76 | margin: 0px; | 76 | margin: 0px; |
77 | &:last-child { border:none } | 77 | &:last-child { border:none } |
78 | - | ||
79 | &.active { | 78 | &.active { |
80 | background: #f9f9f9; | 79 | background: #f9f9f9; |
81 | a { font-weight: bold; } | 80 | a { font-weight: bold; } |
app/assets/stylesheets/sections/snippets.scss
app/views/snippets/_snippet.html.haml
@@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
17 | = "##{snippet.id}" | 17 | = "##{snippet.id}" |
18 | %span | 18 | %span |
19 | by | 19 | by |
20 | - = image_tag gravatar_icon(snippet.author_email), class: "avatar avatar-inline s16", alt: '' | ||
21 | - = snippet.author_name | 20 | + = link_to user_snippets_path(snippet.author) do |
21 | + = image_tag gravatar_icon(snippet.author_email), class: "avatar avatar-inline s16", alt: '' | ||
22 | + = snippet.author_name | ||
22 | %span.light #{time_ago_in_words(snippet.created_at)} ago | 23 | %span.light #{time_ago_in_words(snippet.created_at)} ago |
app/views/snippets/current_user_index.html.haml
@@ -19,6 +19,6 @@ | @@ -19,6 +19,6 @@ | ||
19 | = nav_tab :scope, 'public' do | 19 | = nav_tab :scope, 'public' do |
20 | = link_to "Public", user_snippets_path(@user, scope: 'public') | 20 | = link_to "Public", user_snippets_path(@user, scope: 'public') |
21 | 21 | ||
22 | - .span9 | 22 | + .span9.my-snippets |
23 | = render 'snippets' | 23 | = render 'snippets' |
24 | 24 |
app/views/snippets/index.html.haml
app/views/snippets/show.html.haml
@@ -16,8 +16,9 @@ | @@ -16,8 +16,9 @@ | ||
16 | = "##{@snippet.id}" | 16 | = "##{@snippet.id}" |
17 | %span.light | 17 | %span.light |
18 | by | 18 | by |
19 | - = image_tag gravatar_icon(@snippet.author_email), class: "avatar avatar-inline s16" | ||
20 | - = @snippet.author_name | 19 | + = link_to user_snippets_path(@snippet.author) do |
20 | + = image_tag gravatar_icon(@snippet.author_email), class: "avatar avatar-inline s16" | ||
21 | + = @snippet.author_name | ||
21 | 22 | ||
22 | .back-link | 23 | .back-link |
23 | - if @snippet.author == current_user | 24 | - if @snippet.author == current_user |
app/views/snippets/user_index.html.haml
@@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
4 | %span | 4 | %span |
5 | \/ | 5 | \/ |
6 | Snippets | 6 | Snippets |
7 | - %small share code pastes with others out of git repository | ||
8 | = link_to new_snippet_path, class: "btn btn-small add_new pull-right", title: "New Snippet" do | 7 | = link_to new_snippet_path, class: "btn btn-small add_new pull-right", title: "New Snippet" do |
9 | Add new snippet | 8 | Add new snippet |
10 | 9 |