diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-16 13:45:45 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-16 13:45:45 +0400 |
commit | edf41005b2c6cf3d429b8ca10f41fe64306b044a (patch) | |
tree | a92946d80dfe25669469654eb86481c5e8a9d844 /app | |
parent | 880cb8aa487a78c22bedb26b3cfd0e1d8590a932 (diff) |
Add project labels support
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 4 | ||||
-rw-r--r-- | app/views/dashboard/projects.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/_form.html.haml | 9 |
3 files changed, 16 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index cad8f1666d3..e811cbe7f41 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml index f81af59b38f..a285010d80c 100644 --- a/app/views/dashboard/projects.html.haml +++ b/app/views/dashboard/projects.html.haml @@ -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 diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml index 4d51e10dc3e..eb5fa1755b4 100644 --- a/app/views/projects/_form.html.haml +++ b/app/views/projects/_form.html.haml @@ -59,6 +59,15 @@ %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: .control-group = f.label :issues_enabled, "Issues", class: 'control-label' |