socialforge/app/views/projects/_form.html.erb

123 lines
4.6 KiB
Plaintext
Raw Normal View History

2013-08-01 10:33:49 +08:00
<%= error_messages_for 'project' %>
<!--[form:project]-->
2013-08-22 22:30:24 +08:00
<% unless @project.new_record? %>
<p>
<%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %>
</p>
2013-08-22 22:30:24 +08:00
<% end %>
<p>
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %>
</p>
2013-08-01 10:33:49 +08:00
2014-07-10 09:21:24 +08:00
<p style="padding-right: 20px;">
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:0px;" %>
2014-07-01 17:49:12 +08:00
</p><!--by young-->
<p>
<%#= f.text_field :enterprise_name, :size => 60, :style => "width:490px;" %>
<label for="project_description">
<%= l(:field_enterprise_name)%>
<span class="required">&nbsp;&nbsp;</span>
</label>
<%= select_tag :organization_id,options_for_select(project_organizations_id_option,@project.organization_id),{} %>
</p>
<p style="display: none" >
<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
2014-08-07 17:56:29 +08:00
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %>
2013-08-01 10:33:49 +08:00
<% unless @project.identifier_frozen? %>
<em class="info">
<%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %>
<%= l(:text_project_identifier_info).html_safe %>
</em>
2013-08-01 10:33:49 +08:00
<% end %></p>
2014-08-07 11:20:24 +08:00
2014-07-10 09:21:24 +08:00
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
<p style="margin-left:-10px;">
<em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
<%= f.check_box :is_public, :style => "margin-left:10px;" %>
</em>
</p>
<p style="margin-left:-10px;">
<em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
<%= f.check_box :hidden_repo, :style => "margin-left:10px;" %>
</em>
</p>
<!--
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
<%#= f.check_box :dts_test, :style => "margin-left:10px;" %>
</em></p>
-->
<p style="display:none;">
<%= f.text_field :project_type, :value => 0 %>
</p>
2013-08-01 10:33:49 +08:00
<%= wikitoolbar_for 'project_description' %>
2013-09-23 16:42:19 +08:00
2013-08-01 10:33:49 +08:00
<% @project.custom_field_values.each do |value| %>
<p>
<%= custom_field_tag_with_label :project, value %>
</p>
2013-08-01 10:33:49 +08:00
<% end %>
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
2013-08-06 10:16:51 +08:00
2013-08-01 10:33:49 +08:00
2014-07-01 17:49:12 +08:00
<!-- <%# if @project.new_record? %>
<fieldset class="box tabular"><legend><%#= l(:label_module_plural) %></legend>
<%# Redmine::AccessControl.available_project_modules.each do |m| %>
2013-08-01 10:33:49 +08:00
<label class="floating">
2014-07-01 17:49:12 +08:00
<%#= check_box_tag 'project[enabled_module_names][]', m, @project.module_enabled?(m), :id => "project_enabled_module_names_#{m}" %>
<%#= l_or_humanize(m, :prefix => "project_module_") %>
2013-08-01 10:33:49 +08:00
</label>
2014-07-01 17:49:12 +08:00
<%# end %>
<%#= hidden_field_tag 'project[enabled_module_names][]', '' %>
<%#= javascript_tag 'observeProjectModules()' %>
2013-08-01 10:33:49 +08:00
</fieldset>
2014-07-01 17:49:12 +08:00
<%# end %>
2013-08-01 10:33:49 +08:00
2014-07-01 17:49:12 +08:00
<%# if @project.new_record? || @project.module_enabled?('issue_tracking') %>
<%# unless @trackers.empty? %>
<fieldset class="box tabular" id="project_trackers"><legend><%#=l(:label_tracker_plural)%></legend>
<%# @trackers.each do |tracker| %>
2013-08-01 10:33:49 +08:00
<label class="floating">
2014-07-01 17:49:12 +08:00
<%#= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.include?(tracker) %>
<%#=h tracker %>
2013-08-01 10:33:49 +08:00
</label>
2014-07-01 17:49:12 +08:00
<%# end %>
<%#= hidden_field_tag 'project[tracker_ids][]', '' %>
2013-08-01 10:33:49 +08:00
</fieldset>
2014-07-01 17:49:12 +08:00
<%# end %>
2013-08-01 10:33:49 +08:00
2014-07-01 17:49:12 +08:00
<%# unless @issue_custom_fields.empty? %>
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%#=l(:label_custom_field_plural)%></legend>
<%# @issue_custom_fields.each do |custom_field| %>
2013-08-01 10:33:49 +08:00
<label class="floating">
2014-07-01 17:49:12 +08:00
<%#= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field), (custom_field.is_for_all? ? {:disabled => "disabled"} : {}) %>
<%#=h custom_field.name %>
2013-08-01 10:33:49 +08:00
</label>
2014-07-01 17:49:12 +08:00
<%# end %>
<%#= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
2013-08-01 10:33:49 +08:00
</fieldset>
2014-07-01 17:49:12 +08:00
<%# end %>
<%# end %> -->
2013-08-01 10:33:49 +08:00
<!--[eoform:project]-->
<% unless @project.identifier_frozen? %>
<% content_for :header_tags do %>
<%= javascript_include_tag 'project_identifier' %>
<% end %>
<% end %>
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
<%= javascript_tag do %>
$(document).ready(function() {
$("#project_inherit_members").change(function(){
if (!$(this).is(':checked')) {
if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
$("#project_inherit_members").attr("checked", true);
}
}
});
});
<% end %>
<% end %>