2006-06-28 22:11:03 +04:00
|
|
|
<%= error_messages_for 'project' %>
|
2006-12-24 16:38:45 +03:00
|
|
|
|
2006-07-29 13:32:58 +04:00
|
|
|
<div class="box">
|
2006-06-28 22:11:03 +04:00
|
|
|
<!--[form:project]-->
|
2006-09-02 17:33:23 +04:00
|
|
|
<p><%= f.text_field :name, :required => true %></p>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2006-11-12 21:50:30 +03:00
|
|
|
<% if admin_loggedin? and !@root_projects.empty? %>
|
2006-09-02 17:33:23 +04:00
|
|
|
<p><%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %></p>
|
2006-07-09 20:30:01 +04:00
|
|
|
<% end %>
|
|
|
|
|
2006-09-02 17:33:23 +04:00
|
|
|
<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>
|
2006-07-29 13:32:58 +04:00
|
|
|
|
2006-07-31 23:52:08 +04:00
|
|
|
<% for @custom_value in @custom_values %>
|
|
|
|
<p><%= custom_field_tag_with_label @custom_value %></p>
|
2006-07-29 13:32:58 +04:00
|
|
|
<% end %>
|
2006-11-12 21:50:30 +03:00
|
|
|
|
|
|
|
<% unless @custom_fields.empty? %>
|
|
|
|
<p><label><%=l(:label_custom_field_plural)%></label>
|
2006-09-02 17:33:23 +04:00
|
|
|
<% for custom_field in @custom_fields %>
|
2006-11-12 21:50:30 +03:00
|
|
|
<%= 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"} : {}) %>
|
2006-09-02 17:33:23 +04:00
|
|
|
<%= custom_field.name %>
|
2006-11-12 21:50:30 +03:00
|
|
|
<% end %></p>
|
|
|
|
<% end %>
|
2006-12-24 16:38:45 +03:00
|
|
|
<!--[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| %>
|
2007-01-02 13:12:15 +03:00
|
|
|
<p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://, file:///)</p>
|
2007-03-09 21:03:31 +03:00
|
|
|
<p><%= repository.text_field :login, :size => 30 %></p>
|
|
|
|
<p><%= repository.password_field :password, :size => 30 %></p>
|
2006-12-24 16:38:45 +03:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
|
2006-07-29 13:32:58 +04:00
|
|
|
</div>
|
2007-01-06 12:08:17 +03:00
|
|
|
|
2007-03-10 18:09:49 +03:00
|
|
|
<div class="box">
|
|
|
|
<h3><%= check_box_tag "wiki_enabled", 1, !@project.wiki.nil?, :onclick => "Element.toggle('wiki');" %> <%= l(:label_wiki) %></h3>
|
|
|
|
<%= hidden_field_tag "wiki_enabled", 0 %>
|
|
|
|
<div id="wiki">
|
|
|
|
<% fields_for :wiki, @project.wiki, { :builder => TabularFormBuilder, :lang => current_language} do |wiki| %>
|
|
|
|
<p><%= wiki.text_field :start_page, :size => 60, :required => true %></p>
|
|
|
|
<% # content_tag("div", "", :id => "wiki_start_page_auto_complete", :class => "auto_complete") +
|
|
|
|
# auto_complete_field("wiki_start_page", { :url => { :controller => 'wiki', :action => 'auto_complete_for_wiki_page', :id => @project } })
|
|
|
|
%>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<%= javascript_tag "Element.hide('wiki');" if @project.wiki.nil? %>
|
|
|
|
</div>
|
|
|
|
|
2007-01-06 12:08:17 +03:00
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= javascript_include_tag 'calendar/calendar' %>
|
|
|
|
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
|
|
|
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
|
|
|
<%= stylesheet_link_tag 'calendar' %>
|
|
|
|
<% end %>
|