diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 18:23:18 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 18:23:18 +0300 |
commit | 6fb9badcaef5152c60bf4091899a84b34f5cc1b8 (patch) | |
tree | d550b8cd824aba48bc89f91c7fe888123123b7b4 /app | |
parent | 03654a6abf47c88b8b980a6707874ff78080d2fe (diff) | |
download | gitlab-ce-6fb9badcaef5152c60bf4091899a84b34f5cc1b8.tar.gz |
Replace project labels with tags to prevent name conflict with GitLab labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/dashboard_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | app/views/dashboard/_projects_filter.html.haml | 12 | ||||
-rw-r--r-- | app/views/dashboard/projects.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/edit.html.haml | 8 |
6 files changed, 16 insertions, 16 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 233b91680f6..5aff526d1b5 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -46,11 +46,11 @@ class DashboardController < ApplicationController @projects = @projects.where(namespace_id: Group.find_by(name: params[:group])) if params[:group].present? @projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present? @projects = @projects.includes(:namespace) - @projects = @projects.tagged_with(params[:label]) if params[:label].present? + @projects = @projects.tagged_with(params[:tag]) if params[:tag].present? @projects = @projects.sort(@sort = params[:sort]) @projects = @projects.page(params[:page]).per(30) - @labels = current_user.authorized_projects.tags_on(:labels) + @tags = current_user.authorized_projects.tags_on(:tags) @groups = current_user.authorized_groups end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 1b1b0eb7ad1..f23afaf28fa 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -196,7 +196,7 @@ class ProjectsController < ApplicationController def project_params params.require(:project).permit( - :name, :path, :description, :issues_tracker, :label_list, + :name, :path, :description, :issues_tracker, :tag_list, :issues_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, :default_branch, :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id ) diff --git a/app/models/project.rb b/app/models/project.rb index 73a2b42492e..a4627d6d4d1 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -42,7 +42,7 @@ class Project < ActiveRecord::Base ActsAsTaggableOn.strict_case_match = true - acts_as_taggable_on :labels, :issues_default_labels + acts_as_taggable_on :tags, :issues_default_labels attr_accessor :new_default_branch diff --git a/app/views/dashboard/_projects_filter.html.haml b/app/views/dashboard/_projects_filter.html.haml index 8c9893ba84f..e4fa2d59e8a 100644 --- a/app/views/dashboard/_projects_filter.html.haml +++ b/app/views/dashboard/_projects_filter.html.haml @@ -44,12 +44,12 @@ -- if @labels.present? +- if @tags.present? %fieldset - %legend Labels + %legend Tags %ul.nav.nav-pills.nav-stacked.nav-small - - @labels.each do |label| - %li{ class: (label.name == params[:label]) ? 'active' : 'light' } - = link_to projects_dashboard_filter_path(scope: params[:scope], label: label.name) do + - @tags.each do |tag| + %li{ class: (tag.name == params[:tag]) ? 'active' : 'light' } + = link_to projects_dashboard_filter_path(scope: params[:scope], tag: tag.name) do %i.icon-tag - = label.name + = tag.name diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml index e1c9a5941e9..2714ebc53de 100644 --- a/app/views/dashboard/projects.html.haml +++ b/app/views/dashboard/projects.html.haml @@ -54,10 +54,10 @@ %span.label %i.icon-archive Archived - - project.labels.each do |label| + - project.tags.each do |tag| %span.label.label-info %i.icon-tag - = label.name + = tag.name - if project.description.present? %p= truncate project.description, length: 100 .last-activity diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 6eaa3e7559a..99b6d8ad288 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -33,12 +33,12 @@ %fieldset.features %legend - Labels: + Tags: .form-group - = f.label :label_list, "Labels", class: 'control-label' + = f.label :tag_list, "Tags", class: 'control-label' .col-sm-10 - = f.text_field :label_list, maxlength: 2000, class: "form-control" - %p.hint Separate labels with commas. + = f.text_field :tag_list, maxlength: 2000, class: "form-control" + %p.hint Separate tags with commas. %fieldset.features %legend |