Add project labels support
This commit is contained in:
parent
880cb8aa48
commit
edf41005b2
3 changed files with 16 additions and 1 deletions
|
@ -28,12 +28,14 @@ class Project < ActiveRecord::Base
|
|||
include Gitlab::ShellAdapter
|
||||
extend Enumerize
|
||||
|
||||
attr_accessible :name, :path, :description, :default_branch, :issues_tracker,
|
||||
attr_accessible :name, :path, :description, :default_branch, :issues_tracker, :label_list,
|
||||
:issues_enabled, :wall_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id,
|
||||
:wiki_enabled, :public, :import_url, :last_activity_at, as: [:default, :admin]
|
||||
|
||||
attr_accessible :namespace_id, :creator_id, as: :admin
|
||||
|
||||
acts_as_taggable_on :labels
|
||||
|
||||
attr_accessor :import_url
|
||||
|
||||
# Relations
|
||||
|
|
|
@ -49,6 +49,10 @@
|
|||
.left
|
||||
- if project.description.present?
|
||||
%span.light= project.description
|
||||
- project.labels.each do |label|
|
||||
%span.label.label-info
|
||||
%i.icon-tag
|
||||
= label.name
|
||||
|
||||
.pull-right.light
|
||||
%small.light
|
||||
|
|
|
@ -57,6 +57,15 @@
|
|||
authentication.
|
||||
It will also be listed on the #{link_to "public access directory", public_root_path}.
|
||||
|
||||
%fieldset.features
|
||||
%legend
|
||||
Labels:
|
||||
.control-group
|
||||
= f.label :label_list, "Labels", class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :label_list, maxlength: 2000, class: "xxlarge"
|
||||
%p.hint Separate with comma.
|
||||
|
||||
%fieldset.features
|
||||
%legend
|
||||
Features:
|
||||
|
|
Loading…
Reference in a new issue