Merge branch 'team-and-group-descriptions' of https://github.com/Undev/gitlabhq into Undev-team-and-group-descriptions
Conflicts: db/schema.rb
This commit is contained in:
commit
5c3cb47c16
26 changed files with 155 additions and 45 deletions
|
@ -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
|
||||
|
|
|
@ -2,17 +2,18 @@
|
|||
#
|
||||
# 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 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" }
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
|
||||
class UserTeam < ActiveRecord::Base
|
||||
attr_accessible :name, :owner_id, :path
|
||||
attr_accessible :name, :description, :owner_id, :path
|
||||
|
||||
belongs_to :owner, class_name: User
|
||||
|
||||
|
@ -26,6 +26,7 @@ class UserTeam < 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" }
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -9,8 +9,14 @@
|
|||
Group name is
|
||||
.input
|
||||
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
|
||||
|
||||
= 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
|
||||
|
|
|
@ -16,7 +16,13 @@
|
|||
|
||||
= 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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%h3.page_title Rename Team
|
||||
%h3.page_title Edit Team
|
||||
%hr
|
||||
= form_for @team, url: admin_team_path(@team), method: :put do |f|
|
||||
- if @team.errors.any?
|
||||
|
@ -10,6 +10,11 @@
|
|||
.input
|
||||
= f.text_field :name, placeholder: "Example Team", class: "xxlarge"
|
||||
|
||||
.clearfix.team-description-holder
|
||||
= f.label :description, "Details"
|
||||
.input
|
||||
= f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
|
||||
|
||||
.clearfix.team_name_holder
|
||||
= f.label :path do
|
||||
%span.cred Team path is
|
||||
|
@ -19,5 +24,5 @@
|
|||
%li It will change web url for access team and team projects.
|
||||
|
||||
.form-actions
|
||||
= f.submit 'Rename team', class: "btn btn-remove"
|
||||
= f.submit 'Edit team', class: "btn btn-remove"
|
||||
= link_to 'Cancel', admin_teams_path, class: "btn btn-cancel"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
%th
|
||||
Name
|
||||
%i.icon-sort-down
|
||||
%th Description
|
||||
%th Path
|
||||
%th Projects
|
||||
%th Members
|
||||
|
@ -26,13 +27,14 @@
|
|||
%tr
|
||||
%td
|
||||
%strong= link_to team.name, admin_team_path(team)
|
||||
%td= team.description
|
||||
%td= team.path
|
||||
%td= team.projects.count
|
||||
%td= team.members.count
|
||||
%td
|
||||
= link_to team.owner.name, admin_user_path(team.owner)
|
||||
%td.bgred
|
||||
= link_to 'Rename', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small"
|
||||
= link_to 'Edit', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small"
|
||||
= link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
|
||||
|
||||
= paginate @teams, theme: "admin"
|
||||
|
|
|
@ -9,8 +9,15 @@
|
|||
Team name is
|
||||
.input
|
||||
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
|
||||
|
||||
= f.submit 'Create team', class: "btn btn-primary"
|
||||
|
||||
.clearfix.team-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 team', class: "btn btn-primary"
|
||||
|
||||
%hr
|
||||
.padded
|
||||
%ul
|
||||
|
|
|
@ -16,7 +16,13 @@
|
|||
|
||||
= link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do
|
||||
%i.icon-edit
|
||||
Rename
|
||||
Edit
|
||||
%tr
|
||||
%td
|
||||
%b
|
||||
Description:
|
||||
%td
|
||||
= @team.description
|
||||
%tr
|
||||
%td
|
||||
%b
|
||||
|
|
|
@ -9,8 +9,15 @@
|
|||
Group name is
|
||||
.input
|
||||
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
|
||||
|
||||
= f.submit 'Save group', class: "btn btn-save"
|
||||
|
||||
.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 'Save group', class: "btn btn-save"
|
||||
|
||||
%hr
|
||||
|
||||
|
||||
|
|
|
@ -9,8 +9,16 @@
|
|||
Group name is
|
||||
.input
|
||||
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
|
||||
|
||||
= f.submit 'Create group', class: "btn btn-create"
|
||||
|
||||
.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
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
- if @group.description.present?
|
||||
.description
|
||||
= @group.description
|
||||
%hr
|
||||
|
||||
.projects
|
||||
.activities.span8
|
||||
= render "events/event_last_push", event: @last_push
|
||||
|
|
|
@ -12,13 +12,20 @@
|
|||
.input
|
||||
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xlarge left"
|
||||
|
||||
.clearfix.team-description-holder
|
||||
= f.label :description, "Details"
|
||||
.input
|
||||
= f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
|
||||
|
||||
.clearfix
|
||||
= f.label :path do
|
||||
Team path is
|
||||
.input
|
||||
= f.text_field :path, placeholder: "opensource", class: "xlarge left"
|
||||
|
||||
.form-actions
|
||||
= f.submit 'Save team changes', class: "btn btn-save"
|
||||
= f.submit 'Save team changes', class: "btn btn-primary"
|
||||
= link_to 'Delete team', team_path(@team), method: :delete, confirm: "You are shure?", class: "btn btn-remove pull-right"
|
||||
.span5
|
||||
.ui-box
|
||||
%h5.title Remove team
|
||||
|
@ -26,4 +33,3 @@
|
|||
%p
|
||||
Removed team can not be restored!
|
||||
= link_to 'Remove team', team_path(@team), method: :delete, confirm: "You are sure?", class: "btn btn-remove btn-small"
|
||||
|
||||
|
|
|
@ -9,8 +9,15 @@
|
|||
Team name is
|
||||
.input
|
||||
= f.text_field :name, placeholder: "Ex. Ruby Developers", class: "xxlarge left"
|
||||
|
||||
= f.submit 'Create team', class: "btn btn-create"
|
||||
|
||||
.clearfix.team-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 team', class: "btn btn-create"
|
||||
|
||||
%hr
|
||||
.padded
|
||||
%ul
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
- if @team.description.present?
|
||||
.description
|
||||
= @team.description
|
||||
%hr
|
||||
|
||||
.projects
|
||||
.activities.span8
|
||||
= link_to dashboard_path, class: 'btn btn-tiny' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue