Commit edf41005b2c6cf3d429b8ca10f41fe64306b044a
1 parent
880cb8aa
Exists in
master
and in
4 other branches
Add project labels support
Showing
3 changed files
with
16 additions
and
1 deletions
Show diff stats
app/models/project.rb
| ... | ... | @@ -28,12 +28,14 @@ class Project < ActiveRecord::Base |
| 28 | 28 | include Gitlab::ShellAdapter |
| 29 | 29 | extend Enumerize |
| 30 | 30 | |
| 31 | - attr_accessible :name, :path, :description, :default_branch, :issues_tracker, | |
| 31 | + attr_accessible :name, :path, :description, :default_branch, :issues_tracker, :label_list, | |
| 32 | 32 | :issues_enabled, :wall_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, |
| 33 | 33 | :wiki_enabled, :public, :import_url, :last_activity_at, as: [:default, :admin] |
| 34 | 34 | |
| 35 | 35 | attr_accessible :namespace_id, :creator_id, as: :admin |
| 36 | 36 | |
| 37 | + acts_as_taggable_on :labels | |
| 38 | + | |
| 37 | 39 | attr_accessor :import_url |
| 38 | 40 | |
| 39 | 41 | # Relations | ... | ... |
app/views/dashboard/projects.html.haml
app/views/projects/_form.html.haml
| ... | ... | @@ -59,6 +59,15 @@ |
| 59 | 59 | |
| 60 | 60 | %fieldset.features |
| 61 | 61 | %legend |
| 62 | + Labels: | |
| 63 | + .control-group | |
| 64 | + = f.label :label_list, "Labels", class: 'control-label' | |
| 65 | + .controls | |
| 66 | + = f.text_field :label_list, maxlength: 2000, class: "xxlarge" | |
| 67 | + %p.hint Separate with comma. | |
| 68 | + | |
| 69 | + %fieldset.features | |
| 70 | + %legend | |
| 62 | 71 | Features: |
| 63 | 72 | .control-group |
| 64 | 73 | = f.label :issues_enabled, "Issues", class: 'control-label' | ... | ... |