Commit c803e78fd0de5e3614cf5881c9688e4c7d40641b
1 parent
884390de
Exists in
spb-stable
and in
3 other branches
Use VersionSorter on the Project > Tags page
Showing
2 changed files
with
4 additions
and
3 deletions
Show diff stats
app/controllers/projects/tags_controller.rb
... | ... | @@ -8,7 +8,8 @@ class Projects::TagsController < Projects::ApplicationController |
8 | 8 | before_filter :authorize_admin_project!, only: [:destroy] |
9 | 9 | |
10 | 10 | def index |
11 | - @tags = Kaminari.paginate_array(@repository.tags.reverse).page(params[:page]).per(30) | |
11 | + sorted = VersionSorter.rsort(@repository.tag_names) | |
12 | + @tags = Kaminari.paginate_array(sorted).page(params[:page]).per(30) | |
12 | 13 | end |
13 | 14 | |
14 | 15 | def create | ... | ... |
app/views/projects/tags/index.html.haml
... | ... | @@ -7,13 +7,13 @@ |
7 | 7 | New tag |
8 | 8 | |
9 | 9 | %p |
10 | - Tags give ability to mark specific points in history as being important | |
10 | + Tags give the ability to mark specific points in history as being important | |
11 | 11 | %hr |
12 | 12 | |
13 | 13 | - unless @tags.empty? |
14 | 14 | %ul.bordered-list |
15 | 15 | - @tags.each do |tag| |
16 | - = render 'tag', tag: tag | |
16 | + = render 'tag', tag: @repository.find_tag(tag) | |
17 | 17 | |
18 | 18 | = paginate @tags, theme: 'gitlab' |
19 | 19 | ... | ... |