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
|
|
|
|
|
.leftlist
|
|
|
|
|
= f.label :name, t("activerecord.attributes.project.name"), :class => :label
|
|
|
|
|
.rightlist
|
|
|
|
|
= f.text_field :name, :class => 'text_field', :disabled => f.object.try(:persisted?)
|
|
|
|
|
.both
|
|
|
|
|
.leftlist
|
2011-10-19 21:58:31 +01:00
|
|
|
|
= f.label :description, t("activerecord.attributes.project.description"), :class => :label
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.rightlist
|
2011-10-19 21:58:31 +01:00
|
|
|
|
= 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
|
|
|
|
|
.leftlist
|
|
|
|
|
= f.label :owner_id, t("activerecord.attributes.project.owner"), :class => :label
|
|
|
|
|
.rightlist
|
|
|
|
|
= label_tag t("activerecord.attributes.project.who_owns.me")
|
|
|
|
|
= radio_button_tag :who_owns, 'me'
|
|
|
|
|
= label_tag t("activerecord.attributes.project.who_owns.group")
|
|
|
|
|
= radio_button_tag :who_owns, 'group'
|
2012-02-28 07:59:38 +00:00
|
|
|
|
-# TODO: Make our own select_box helper with new design, blackjack and bitches!
|
2012-02-27 09:03:28 +00:00
|
|
|
|
= select_tag :owner_id, options_for_select( Group.can_own_project(current_user) )
|
|
|
|
|
.both
|
2012-02-24 13:05:58 +00:00
|
|
|
|
-#- if [:new, :create].include? act
|
|
|
|
|
-# .leftlist
|
|
|
|
|
-# = f.label :category_id, t("activerecord.attributes.project.category_id"), :class => :label
|
|
|
|
|
-# .rightlist
|
|
|
|
|
-# = f.grouped_collection_select :category_id, Category.roots, :children, :name, :id, :name, :include_blank => true
|
|
|
|
|
-# .both
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.leftlist
|
|
|
|
|
= f.label :visibility, t("activerecord.attributes.project.visibility"), :class => :label
|
|
|
|
|
.rightlist
|
|
|
|
|
=# f.select :visibility, Project::VISIBILITIES
|
|
|
|
|
- Project::VISIBILITIES.each do |visibility|
|
|
|
|
|
%span.niceRadio.radioChecked
|
|
|
|
|
= f.radio_button :visibility, visibility, :class => 'niceRadio'
|
|
|
|
|
- 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
|
|
|
|
|
.leftlist
|
|
|
|
|
Ветка по умолчанию:
|
|
|
|
|
.rightlist
|
|
|
|
|
= f.select :default_branch, options_from_collection_for_select(@project.branches, :name, :name, @project.default_branch), :class => 'sel80', :id => 'branch_selector'
|
|
|
|
|
-#.lineForm
|
|
|
|
|
-# #cuselFrame-ext.cusel.sel80{:style => "width:200px", :tabindex => "2"}
|
|
|
|
|
-# .cuselFrameRight
|
|
|
|
|
-# .cuselText Master
|
|
|
|
|
-# .cusel-scroll-wrap{:style => "display: none; visibility: visible; "}
|
|
|
|
|
-# #cusel-scroll-ext.cusel-scroll-pane
|
|
|
|
|
-# %span.cuselActive{:selected => "selected", :val => "1000"} Master
|
|
|
|
|
-# %span{:val => "1"} Extend
|
|
|
|
|
-# %span{:val => "2"} Fork4Driver
|
|
|
|
|
-# %input#ext{:name => "ext", :type => "hidden", :value => "1000"}/
|
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
|
|
|
|
|
-#%span#niceCheckbox1.niceCheck-main{:onclick => "changeCheck(this)"}
|
|
|
|
|
-# %input{:name => "ch1", :type => "checkbox"}/
|
|
|
|
|
= f.check_box :is_rpm, :class => 'niceCheck-main'
|
|
|
|
|
.forcheck
|
|
|
|
|
Проект является пакетом
|
|
|
|
|
.both
|
2012-02-22 17:48:37 +00:00
|
|
|
|
.both
|
|
|
|
|
- if [:new, :create].include? act
|
|
|
|
|
.leftlist
|
|
|
|
|
= f.label :srpm, t("activerecord.attributes.project.srpm"), :class => :label
|
|
|
|
|
.rightlist
|
|
|
|
|
= f.file_field :srpm, :class => 'file_field'
|
|
|
|
|
.both
|
2012-02-28 16:10:31 +00:00
|
|
|
|
-#.leftlist
|
|
|
|
|
-# \
|
|
|
|
|
-#.rightlist
|
|
|
|
|
-# -#%a.button{:href => "#"} Сохранить
|
|
|
|
|
-# = submit_tag t("layout.save"), :class => 'button'
|
|
|
|
|
-#.both
|
2011-03-31 02:56:20 +01:00
|
|
|
|
.group.navform.wat-cf
|
|
|
|
|
%button.button{:type => "submit"}
|
2012-02-27 23:16:14 +00:00
|
|
|
|
= image_tag("choose.png", :alt => t("layout.save"))
|
2011-03-31 02:56:20 +01:00
|
|
|
|
= t("layout.save")
|
|
|
|
|
%span.text_button_padding= t("layout.or")
|
2011-10-17 15:21:29 +01:00
|
|
|
|
= link_to t("layout.cancel"), @projects_path, :class => "text_button_padding link_button"
|
2011-03-31 02:56:20 +01:00
|
|
|
|
|
2012-02-22 17:48:37 +00:00
|
|
|
|
-#.group
|
|
|
|
|
-# = f.label :category_id, t("activerecord.attributes.project.category_id"), :class => :label
|
|
|
|
|
-# = f.grouped_collection_select :category_id, Category.roots, :children, :name, :id, :name, :include_blank => true
|
|
|
|
|
-#.group
|
|
|
|
|
-# = f.label :name, t("activerecord.attributes.project.name"), :class => :label
|
|
|
|
|
-# = f.text_field :name, :class => 'text_field', :disabled => f.object.try(:persisted?)
|
|
|
|
|
-#.group
|
|
|
|
|
-# = f.label :visibility, t("activerecord.attributes.project.visibility"), :class => :label
|
|
|
|
|
-# = f.select :visibility, Project::VISIBILITIES
|
|
|
|
|
-#.group
|
|
|
|
|
-# = f.label :description, t("activerecord.attributes.project.description"), :class => :label
|
|
|
|
|
-# = f.text_area :description, :class => 'text_field', :cols => 80
|
|
|
|
|
-#.group
|
|
|
|
|
-# = f.label :has_issues, t("activerecord.attributes.project.has_issues"), :class => :label
|
|
|
|
|
-# = f.check_box :has_issues
|
|
|
|
|
-#.group
|
|
|
|
|
-# = f.label :has_wiki, t("activerecord.attributes.project.has_wiki"), :class => :label
|
|
|
|
|
-# = f.check_box :has_wiki
|
|
|
|
|
-#.group
|
|
|
|
|
-# = f.label :srpm, t("activerecord.attributes.project.srpm"), :class => :label
|
|
|
|
|
-# = f.file_field :srpm, :class => 'file_field'
|
|
|
|
|
-#
|
|
|
|
|
-#.group.navform.wat-cf
|
|
|
|
|
-# %button.button{:type => "submit"}
|
|
|
|
|
-# = image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
|
|
|
|
-# = t("layout.save")
|
|
|
|
|
-# %span.text_button_padding= t("layout.or")
|
|
|
|
|
-# = link_to t("layout.cancel"), @projects_path, :class => "text_button_padding link_button"
|