Commit 6955c075 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

navless layout for new group/team. Proper title for this pages

parent 475da578
...@@ -12,6 +12,9 @@ class GroupsController < ApplicationController ...@@ -12,6 +12,9 @@ class GroupsController < ApplicationController
# Load group projects # Load group projects
before_filter :projects, except: [:new, :create] before_filter :projects, except: [:new, :create]
layout 'navless', only: [:new, :create]
before_filter :set_title, only: [:new, :create]
def new def new
@group = Group.new @group = Group.new
end end
...@@ -134,4 +137,8 @@ class GroupsController < ApplicationController ...@@ -134,4 +137,8 @@ class GroupsController < ApplicationController
return render_404 return render_404
end end
end end
def set_title
@title = 'New Group'
end
end end
...@@ -7,6 +7,8 @@ class TeamsController < ApplicationController ...@@ -7,6 +7,8 @@ class TeamsController < ApplicationController
before_filter :user_team, except: [:new, :create] before_filter :user_team, except: [:new, :create]
layout '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 def show
projects projects
...@@ -76,4 +78,8 @@ class TeamsController < ApplicationController ...@@ -76,4 +78,8 @@ class TeamsController < ApplicationController
def user_team def user_team
@team ||= current_user.authorized_teams.find_by_path(params[:id]) @team ||= current_user.authorized_teams.find_by_path(params[:id])
end end
def set_title
@title = 'New Team'
end
end end
%h3.page_title New Group
%hr
= form_for @group do |f| = form_for @group do |f|
- if @group.errors.any? - if @group.errors.any?
.alert.alert-error .alert.alert-error
...@@ -15,14 +13,16 @@ ...@@ -15,14 +13,16 @@
.input .input
= f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 = 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 .form-actions
= f.submit 'Create group', class: "btn btn-create" = 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
%h3.page_title New Team
%hr
= form_for @team, url: teams_path do |f| = form_for @team, url: teams_path do |f|
- if @team.errors.any? - if @team.errors.any?
.alert.alert-error .alert.alert-error
...@@ -15,16 +13,16 @@ ...@@ -15,16 +13,16 @@
.input .input
= f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 = 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 .form-actions
= f.submit 'Create team', class: "btn btn-create" = 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? - if current_user.can_create_group?
.clearfix .clearfix
.input.light .input.light
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment