diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-15 10:30:39 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-15 10:30:39 +0400 |
commit | 9c7a9d92ff2d3fc8e1caf7c74fc72d10dbf6da37 (patch) | |
tree | d69aaab5ac39db6a8aa5eb6e8b6539471d223044 /app | |
parent | 6be82c5e3b65bccc5b951628de34ebe94e06fdec (diff) | |
parent | c803e78fd0de5e3614cf5881c9688e4c7d40641b (diff) |
Merge pull request #6773 from tsigo/rs-tag-page-sorting
Use VersionSorter on the Project > Tags page
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/tags_controller.rb | 3 | ||||
-rw-r--r-- | app/views/projects/tags/index.html.haml | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index 818c5d971e9..0b99165bf62 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -8,7 +8,8 @@ class Projects::TagsController < Projects::ApplicationController before_filter :authorize_admin_project!, only: [:destroy] def index - @tags = Kaminari.paginate_array(@repository.tags.reverse).page(params[:page]).per(30) + sorted = VersionSorter.rsort(@repository.tag_names) + @tags = Kaminari.paginate_array(sorted).page(params[:page]).per(30) end def create diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 53f3e67ff2c..08122fb884f 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -7,13 +7,13 @@ New tag %p - Tags give ability to mark specific points in history as being important + Tags give the ability to mark specific points in history as being important %hr - unless @tags.empty? %ul.bordered-list - @tags.each do |tag| - = render 'tag', tag: tag + = render 'tag', tag: @repository.find_tag(tag) = paginate @tags, theme: 'gitlab' |