Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/application.scss1
-rw-r--r--app/assets/stylesheets/sections/groups.scss31
-rw-r--r--app/models/group.rb15
-rw-r--r--app/models/namespace.rb5
-rw-r--r--app/views/admin/groups/edit.html.haml9
-rw-r--r--app/views/admin/groups/index.html.haml4
-rw-r--r--app/views/admin/groups/new.html.haml10
-rw-r--r--app/views/admin/groups/show.html.haml8
-rw-r--r--app/views/dashboard/_groups.html.haml10
-rw-r--r--db/migrate/20130206084024_add_description_to_namsespace.rb5
-rw-r--r--db/schema.rb7
11 files changed, 83 insertions, 22 deletions
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 6b500b88823..8afda88af46 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -20,6 +20,7 @@
@import "sections/nav.scss";
@import "sections/commits.scss";
@import "sections/issues.scss";
+@import "sections/groups.scss";
@import "sections/projects.scss";
@import "sections/snippets.scss";
@import "sections/votes.scss";
diff --git a/app/assets/stylesheets/sections/groups.scss b/app/assets/stylesheets/sections/groups.scss
new file mode 100644
index 00000000000..9f5dc15a73e
--- /dev/null
+++ b/app/assets/stylesheets/sections/groups.scss
@@ -0,0 +1,31 @@
+.projects {
+ @extend .row;
+ .activities {
+ }
+
+ .side {
+ @extend .right;
+
+ .groups_box {
+ > .title {
+ padding: 2px 15px;
+ }
+ .well-list {
+ li { padding: 15px; }
+ .edit {
+ float: right;
+ margin: 0;
+ }
+ .description {
+ padding-top: 5px;
+ display: block;
+ span, strong {
+ font-size: 12px;
+ color: #666;
+ }
+ }
+ }
+ @extend .ui-box;
+ }
+ }
+}
diff --git a/app/models/group.rb b/app/models/group.rb
index 8ba92980a9b..7651ce23cb6 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -2,13 +2,14 @@
#
# Table name: namespaces
#
-# id :integer not null, primary key
-# name :string(255) not null
-# path :string(255) not null
-# owner_id :integer not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# type :string(255)
+# id :integer not null, primary key
+# name :string(255) not null
+# description :string(255) not null
+# path :string(255) not null
+# owner_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# type :string(255)
#
class Group < Namespace
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 385fa291b48..992ead4fda7 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -4,6 +4,7 @@
#
# id :integer not null, primary key
# name :string(255) not null
+# description :string(255) not null
# path :string(255) not null
# owner_id :integer not null
# created_at :datetime not null
@@ -12,7 +13,7 @@
#
class Namespace < ActiveRecord::Base
- attr_accessible :name, :path
+ attr_accessible :name, :description, :path
has_many :projects, dependent: :destroy
belongs_to :owner, class_name: "User"
@@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base
length: { within: 0..255 },
format: { with: Gitlab::Regex.name_regex,
message: "only letters, digits, spaces & '_' '-' '.' allowed." }
-
+ validates :description, length: { within: 0..255 }
validates :path, uniqueness: true, presence: true, length: { within: 1..255 },
format: { with: Gitlab::Regex.path_regex,
message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
diff --git a/app/views/admin/groups/edit.html.haml b/app/views/admin/groups/edit.html.haml
index dce044956c3..f34ed83fb82 100644
--- a/app/views/admin/groups/edit.html.haml
+++ b/app/views/admin/groups/edit.html.haml
@@ -1,4 +1,4 @@
-%h3.page_title Rename Group
+%h3.page_title Edit Group
%hr
= form_for [:admin, @group] do |f|
- if @group.errors.any?
@@ -10,7 +10,10 @@
.input
= f.text_field :name, placeholder: "Example Group", class: "xxlarge"
-
+ .clearfix.group_description_holder
+ = f.label :description, "Details"
+ .input
+ = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
.clearfix.group_name_holder
= f.label :path do
@@ -24,5 +27,5 @@
%li It will change the git path to repositories under this group.
.form-actions
- = f.submit 'Rename group', class: "btn btn-remove"
+ = f.submit 'Edit group', class: "btn btn-remove"
= link_to 'Cancel', admin_groups_path, class: "btn btn-cancel"
diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml
index 6d5a293ef7f..1b4ffcb6e02 100644
--- a/app/views/admin/groups/index.html.haml
+++ b/app/views/admin/groups/index.html.haml
@@ -17,6 +17,7 @@
Name
%i.icon-sort-down
%th Path
+ %th Description
%th Projects
%th Owner
%th.cred Danger Zone!
@@ -25,11 +26,12 @@
%tr
%td
%strong= link_to group.name, [:admin, group]
+ %td= group.description
%td= group.path
%td= group.projects.count
%td
= link_to group.owner_name, admin_user_path(group.owner)
%td.bgred
- = link_to 'Rename', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small"
+ = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small"
= link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
= paginate @groups, theme: "admin"
diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml
index 60c6fa5ad09..29bbcc55c93 100644
--- a/app/views/admin/groups/new.html.haml
+++ b/app/views/admin/groups/new.html.haml
@@ -9,8 +9,14 @@
Group name is
.input
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
- &nbsp;
- = f.submit 'Create group', class: "btn btn-primary"
+ .clearfix.group_description_holder
+ = f.label :description, "Details"
+ .input
+ = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
+
+ .form-actions
+ = f.submit 'Create group', class: "btn btn-primary"
+
%hr
.padded
%ul
diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml
index 90f8fc0f814..63ea78fdd99 100644
--- a/app/views/admin/groups/show.html.haml
+++ b/app/views/admin/groups/show.html.haml
@@ -16,7 +16,13 @@
&nbsp;
= link_to edit_admin_group_path(@group), class: "btn btn-small pull-right" do
%i.icon-edit
- Rename
+ Edit
+ %tr
+ %td
+ %b
+ Description:
+ %td
+ = @group.description
%tr
%td
%b
diff --git a/app/views/dashboard/_groups.html.haml b/app/views/dashboard/_groups.html.haml
index ba8d3029eaf..8c1dfc12322 100644
--- a/app/views/dashboard/_groups.html.haml
+++ b/app/views/dashboard/_groups.html.haml
@@ -1,4 +1,4 @@
-.ui-box
+.groups_box
%h5.title
Groups
%small
@@ -13,6 +13,8 @@
%li
= link_to group_path(id: group.path), class: dom_class(group) do
%strong.well-title= truncate(group.name, length: 35)
- %span.pull-right.light
- - if group.owner == current_user
- %i.icon-wrench
+ %span.edit.light
+ - if group.owner == current_user
+ %i.icon-wrench
+ %span.description
+ %strong= group.description
diff --git a/db/migrate/20130206084024_add_description_to_namsespace.rb b/db/migrate/20130206084024_add_description_to_namsespace.rb
new file mode 100644
index 00000000000..ef02e489d03
--- /dev/null
+++ b/db/migrate/20130206084024_add_description_to_namsespace.rb
@@ -0,0 +1,5 @@
+class AddDescriptionToNamsespace < ActiveRecord::Migration
+ def change
+ add_column :namespaces, :description, :string, default: '', null: false
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 74d5f9a360c..63f498e4a66 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -112,6 +112,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "type"
+ t.string "description", :default => "", :null => false
end
add_index "namespaces", ["name"], :name => "index_namespaces_on_name"
@@ -152,6 +153,8 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
t.boolean "wiki_enabled", :default => true, :null => false
t.integer "namespace_id"
t.boolean "public", :default => false, :null => false
+ t.string "issues_tracker", :default => "gitlab", :null => false
+ t.string "issues_tracker_id"
end
add_index "projects", ["creator_id"], :name => "index_projects_on_owner_id"
@@ -230,8 +233,8 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
t.string "name"
t.string "path"
t.integer "owner_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|