Description added to temas

This commit is contained in:
Andrew8xx8 2013-02-07 15:10:14 +04:00
parent 9f45e01e84
commit 5f657203a1
9 changed files with 74 additions and 14 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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