_form.rhtml
37 lines
| 1.5 KiB
| text/html+ruby
|
RhtmlLexer
|
r2 | <%= error_messages_for 'project' %> | ||
|
r103 | |||
|
r10 | <div class="box"> | ||
|
r2 | <!--[form:project]--> | ||
|
r19 | <p><%= f.text_field :name, :required => true %></p> | ||
|
r2 | |||
|
r42 | <% if admin_loggedin? and !@root_projects.empty? %> | ||
|
r19 | <p><%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %></p> | ||
|
r5 | <% end %> | ||
|
r19 | <p><%= f.text_area :description, :required => true, :cols => 60, :rows => 3 %></p> | ||
<p><%= f.text_field :homepage, :size => 40 %></p> | ||||
<p><%= f.check_box :is_public %></p> | ||||
|
r10 | |||
|
r18 | <% for @custom_value in @custom_values %> | ||
<p><%= custom_field_tag_with_label @custom_value %></p> | ||||
|
r10 | <% end %> | ||
|
r42 | |||
<% unless @custom_fields.empty? %> | ||||
<p><label><%=l(:label_custom_field_plural)%></label> | ||||
|
r19 | <% for custom_field in @custom_fields %> | ||
|
r42 | <%= check_box_tag "custom_field_ids[]", custom_field.id, ((@project.custom_fields.include? custom_field) or custom_field.is_for_all?), (custom_field.is_for_all? ? {:disabled => "disabled"} : {}) %> | ||
|
r19 | <%= custom_field.name %> | ||
|
r42 | <% end %></p> | ||
<% end %> | ||||
|
r103 | <!--[eoform:project]--> | ||
</div> | ||||
<div class="box"><h3><%= check_box_tag "repository_enabled", 1, !@project.repository.nil?, :onclick => "Element.toggle('repository');" %> <%= l(:label_repository) %></h3> | ||||
<%= hidden_field_tag "repository_enabled", 0 %> | ||||
<div id="repository"> | ||||
<% fields_for :repository, @project.repository, { :builder => TabularFormBuilder, :lang => current_language} do |repository| %> | ||||
<p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://)</p> | ||||
<% end %> | ||||
</div> | ||||
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %> | ||||
|
r10 | </div> | ||