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
app/assets/stylesheets/sections/snippets.scss
app/views/snippets/_snippet.html.haml
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | = "##{snippet.id}" |
| 18 | 18 | %span |
| 19 | 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 | 23 | %span.light #{time_ago_in_words(snippet.created_at)} ago | ... | ... |
app/views/snippets/current_user_index.html.haml
app/views/snippets/index.html.haml
app/views/snippets/show.html.haml
| ... | ... | @@ -16,8 +16,9 @@ |
| 16 | 16 | = "##{@snippet.id}" |
| 17 | 17 | %span.light |
| 18 | 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 | 23 | .back-link |
| 23 | 24 | - if @snippet.author == current_user | ... | ... |
app/views/snippets/user_index.html.haml