Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
ouyangxuhua 2015-09-24 11:08:27 +08:00
commit e41de221c5
2 changed files with 52 additions and 4 deletions

View File

@ -0,0 +1,28 @@
<%# 这些代码删除也没什么影响,暂时放着,待优化 %>
<%= wikitoolbar_for 'project_description' %>
<% @project.custom_field_values.each do |value| %>
<p>
<%= custom_field_tag_with_label :project, value %>
</p>
<% end %>
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
<% 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 %>

View File

@ -1,6 +1,6 @@
<% @nav_dispaly_project_label = 1
@nav_dispaly_forum_label = 1 %>
<%= error_messages_for 'project' %>
<div class="project_r_h02">
<h2 class="project_h2"><%= l(:label_project_new)%></h2>
</div>
@ -17,7 +17,7 @@
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_type_project)%>&nbsp;&nbsp;</label>
<%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %>
<%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %><span class=" ml15 c_orange">开发模式开发模式开发模式开发模式开发模式开发模式开发模式开发模</span>
</li>
<div class="cl"></div>
<li class="ml45">
@ -25,12 +25,31 @@
<textarea name="project[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" ></textarea>
<div class="cl"></div>
</li>
<li>
<p style="display: none" >
<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %>
<% 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>
<% end %></p>
</li>
<li class=" mb5 ml80">
<label >公开&nbsp;&nbsp;</label>
<input id="project_is_public" name="project[is_public]" type="checkbox" value="1">
<input id="project_is_public" name="project[is_public]" type="checkbox" value="1" checked="checked">
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。)</span>
<div class="cl"></div>
</li>
<li>
<p style="display:none;">
<%= f.text_field :project_type, :value => 0 %>
</p>
</li>
<li>
<%= render :partial => 'form_new', :locals => { :f => f } %>
</li>
<li class=" ml90" >
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_project();" >提交</a>
<%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%>
@ -70,4 +89,5 @@
$("#new_project").submit();
}
}
</script>
</script>