Add edit/update tag actions for future release notes

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-11-05 10:51:12 +01:00
parent 95da91a66d
commit 33b8f00263
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
4 changed files with 11 additions and 1 deletions

View File

@ -10,6 +10,14 @@ class Projects::TagsController < Projects::ApplicationController
@tags = Kaminari.paginate_array(sorted).page(params[:page]).per(PER_PAGE)
end
def edit
# TODO: implement
end
def update
# TODO: implement
end
def create
result = CreateTagService.new(@project, current_user).
execute(params[:tag_name], params[:ref], params[:message])

View File

@ -9,6 +9,8 @@
&nbsp;
= strip_gpg_signature(tag.message)
.controls
= link_to edit_namespace_project_tag_path(@project.namespace, @project, tag.name), class: 'btn-grouped btn' do
= icon("pencil")
- if can? current_user, :download_code, @project
= render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-xs'
- if can?(current_user, :admin_project, @project)

View File

View File

@ -569,7 +569,7 @@ Gitlab::Application.routes.draw do
end
resources :branches, only: [:index, :new, :create, :destroy], constraints: { id: Gitlab::Regex.git_reference_regex }
resources :tags, only: [:index, :new, :create, :destroy], constraints: { id: Gitlab::Regex.git_reference_regex }
resources :tags, constraints: { id: Gitlab::Regex.git_reference_regex }
resources :protected_branches, only: [:index, :create, :update, :destroy], constraints: { id: Gitlab::Regex.git_reference_regex }
resource :variables, only: [:show, :update]
resources :triggers, only: [:index, :create, :destroy]