From 6955c075977812b02361115dfbd9c5bd4ae1f064 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 7 Jun 2013 17:41:01 +0300 Subject: [PATCH] navless layout for new group/team. Proper title for this pages --- app/controllers/groups_controller.rb | 7 +++++++ app/controllers/teams_controller.rb | 6 ++++++ app/views/groups/new.html.haml | 18 +++++++++--------- app/views/teams/new.html.haml | 16 +++++++--------- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 8976262f4f7..38bc3665b51 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -12,6 +12,9 @@ class GroupsController < ApplicationController # Load group projects before_filter :projects, except: [:new, :create] + layout 'navless', only: [:new, :create] + before_filter :set_title, only: [:new, :create] + def new @group = Group.new end @@ -134,4 +137,8 @@ class GroupsController < ApplicationController return render_404 end end + + def set_title + @title = 'New Group' + end end diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index 26c1d84f86b..c7d4040725d 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -7,6 +7,8 @@ class TeamsController < ApplicationController before_filter :user_team, except: [:new, :create] layout 'user_team', except: [:new, :create] + layout 'navless', only: [:new, :create] + before_filter :set_title, only: [:new, :create] def show projects @@ -76,4 +78,8 @@ class TeamsController < ApplicationController def user_team @team ||= current_user.authorized_teams.find_by_path(params[:id]) end + + def set_title + @title = 'New Team' + end end diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index b395a8bc6a3..4aa58dedc4a 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -1,5 +1,3 @@ -%h3.page_title New Group -%hr = form_for @group do |f| - if @group.errors.any? .alert.alert-error @@ -15,14 +13,16 @@ .input = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 + .clearfix + .input + %ul + %li Group is kind of directory for several projects + %li All created groups are private + %li People within a group see only projects they have access to + %li All projects of group will be stored in a group directory + %li You will be able to move existing projects into group + .form-actions = f.submit 'Create group', class: "btn btn-create" - .padded - %ul - %li Group is kind of directory for several projects - %li All created groups are private - %li People within a group see only projects they have access to - %li All projects of group will be stored in a group directory - %li You will be able to move existing projects into group diff --git a/app/views/teams/new.html.haml b/app/views/teams/new.html.haml index 99d308217e0..fe1f9cf10ec 100644 --- a/app/views/teams/new.html.haml +++ b/app/views/teams/new.html.haml @@ -1,5 +1,3 @@ -%h3.page_title New Team -%hr = form_for @team, url: teams_path do |f| - if @team.errors.any? .alert.alert-error @@ -15,16 +13,16 @@ .input = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 + + .clearfix + .input + %ul + %li All created teams are public (users can view who enter into team and which project are assigned for this team) + %li People within a team see only projects they have access to + %li You will be able to assign existing projects for team .form-actions = f.submit 'Create team', class: "btn btn-create" - .padded - %ul - %li All created teams are public (users can view who enter into team and which project are assigned for this team) - %li People within a team see only projects they have access to - %li You will be able to assign existing projects for team - %hr - - if current_user.can_create_group? .clearfix .input.light -- GitLab