Use VersionSorter on the Project > Tags page

This commit is contained in:
Robert Speicher 2014-04-14 12:39:24 -04:00
parent 884390de20
commit c803e78fd0
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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'