2012-02-24 13:05:58 +00:00
|
|
|
|
- act = controller.action_name.to_sym
|
2012-02-22 17:48:37 +00:00
|
|
|
|
- if [:new, :create].include? act
|
2012-03-21 19:55:14 +00:00
|
|
|
|
.leftlist= f.label :name, t("activerecord.attributes.project.name"), :class => :label
|
|
|
|
|
.rightlist= f.text_field :name, :class => 'text_field', :disabled => f.object.try(:persisted?)
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.both
|
2012-03-21 19:55:14 +00:00
|
|
|
|
.leftlist= f.label :description, t("activerecord.attributes.project.description"), :class => :label
|
|
|
|
|
.rightlist= f.text_area :description, :class => 'text_field', :cols => 80
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.both
|
2012-02-27 09:03:28 +00:00
|
|
|
|
- if ['new', 'create'].include? controller.action_name
|
2012-03-21 19:55:14 +00:00
|
|
|
|
.leftlist= f.label :owner_id, t("activerecord.attributes.project.owner"), :class => :label
|
2012-02-27 09:03:28 +00:00
|
|
|
|
.rightlist
|
|
|
|
|
= label_tag t("activerecord.attributes.project.who_owns.me")
|
2012-03-03 00:24:57 +00:00
|
|
|
|
- if Group.can_own_project(current_user).count > 0
|
|
|
|
|
= radio_button_tag :who_owns, 'me', @who_owns == :me #{}.merge( (@who_owns == :me) ? {:checked => 'checked'} : {} )
|
|
|
|
|
- puts @who_owns.inspect
|
|
|
|
|
- puts @who_owns == :group
|
2012-03-01 11:41:57 +00:00
|
|
|
|
= label_tag t("activerecord.attributes.project.who_owns.group")
|
2012-03-03 00:24:57 +00:00
|
|
|
|
= radio_button_tag :who_owns, 'group', @who_owns == :group #{}.merge( (@who_owns == :group) ? {:checked => 'checked'} : {} )
|
2012-03-01 11:41:57 +00:00
|
|
|
|
-# TODO: Make our own select_box helper with new design, blackjack and bitches!
|
2012-04-03 14:08:22 +01:00
|
|
|
|
= select_tag :owner_id, options_from_collection_for_select( Group.can_own_project(current_user), :id, :name )
|
2012-03-03 00:24:57 +00:00
|
|
|
|
- else
|
|
|
|
|
= hidden_field_tag :who_owns, :me
|
2012-02-27 09:03:28 +00:00
|
|
|
|
.both
|
2012-03-29 20:00:44 +01:00
|
|
|
|
|
2012-03-21 19:55:14 +00:00
|
|
|
|
.leftlist= f.label :visibility, t("activerecord.attributes.project.visibility"), :class => :label
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.rightlist
|
|
|
|
|
=# f.select :visibility, Project::VISIBILITIES
|
|
|
|
|
- Project::VISIBILITIES.each do |visibility|
|
2012-02-28 19:11:08 +00:00
|
|
|
|
= f.radio_button :visibility, visibility, :class => 'niceRadio'
|
2012-02-22 17:48:37 +00:00
|
|
|
|
- if visibility == 'open'
|
|
|
|
|
= image_tag("unlock.png")
|
|
|
|
|
- else
|
|
|
|
|
= image_tag("lock.png")
|
|
|
|
|
= t("activerecord.attributes.project.visibilities.#{visibility}")
|
|
|
|
|
.both
|
2012-02-24 13:05:58 +00:00
|
|
|
|
- if [:edit, :update].include? act
|
2012-03-21 19:55:14 +00:00
|
|
|
|
.leftlist= t("activerecord.attributes.project.default_branch")
|
|
|
|
|
.rightlist= f.select :default_branch, options_from_collection_for_select(@project.branches, :name, :name, @project.default_branch), :class => 'sel80', :id => 'branch_selector'
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.both
|
2012-02-24 13:05:58 +00:00
|
|
|
|
- if [:edit, :update].include? act
|
|
|
|
|
.leftlist
|
|
|
|
|
\
|
|
|
|
|
.rightlist
|
|
|
|
|
.check
|
2012-03-21 19:55:14 +00:00
|
|
|
|
%span#niceCheckbox1.niceCheck-main= f.check_box :is_rpm#, :class => 'niceCheckbox1'
|
|
|
|
|
.forcheck= t("activerecord.attributes.project.is_rpm")
|
2012-02-24 13:05:58 +00:00
|
|
|
|
.both
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.both
|
|
|
|
|
- if [:new, :create].include? act
|
2012-03-21 19:55:14 +00:00
|
|
|
|
.leftlist= f.label :srpm, t("activerecord.attributes.project.srpm"), :class => :label
|
|
|
|
|
.rightlist= f.file_field :srpm, :class => 'file_field'
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.both
|
2012-02-28 20:12:37 +00:00
|
|
|
|
.leftlist
|
|
|
|
|
\
|
2012-03-21 19:55:14 +00:00
|
|
|
|
.rightlist= submit_tag t("layout.save"), :class => 'button'
|
2012-02-28 20:12:37 +00:00
|
|
|
|
.both
|