socialforge/app/views/projects/settings/_new_edit.html.erb

59 lines
3.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
<div id="project_setting_hight">
<%= error_messages_for 'project' %>
<%= labelled_form_for @project do |f| %>
<ul class="pro_newsetting_con mb15">
<!-- <li class="clear mb10" id="project_avatar_form">
<label class="label fl">&nbsp;&nbsp;</label>
<%#= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
</li>-->
<li class="mb10">
<label class="label"><span class="c_red f12">*</span>&nbsp;项目名称&nbsp;&nbsp;:&nbsp;</label>
<input type="text" name="project[name]" id="project_name" class="ml5 w690" maxlength="100" style="height: 28px;" onkeyup="regex_project_name();" value="<%= @project.name %>">
<div></div>
<span class="c_red ml5 w690" id="project_name_notice" style="padding-left:100px;display: none;">项目名称不能为空!</span>
</li>
<li class="clear mb10">
<label class="label fl mr5">&nbsp;项目简介&nbsp;&nbsp;:&nbsp;</label>
<%= f.kindeditor :description, :editor_id => 'project_setting_editor',
:owner_id => @project.nil? ? 0: @project.id,
:owner_type => OwnerTypeHelper::PROJECT,
:width => '85%',
:height => 300,
:minHeight=> 300,
:class => 'fl ml5 w690',
:input_html => { :id => 'project_description',
:class => 'courses_text fl',
:maxlength => 5000 }
%>
<!--<textarea class="fl ml5 w690" style="height:192px; padding-top:5px;" id="project_description" name="project[description]" rows="8" placeholder="项目描述作为项目的简介,将始终显示在动态页的顶部&#13;&#10;最多3000个汉字或6000个英文字符)"><%= @project.description%></textarea>-->
</li>
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
<li class="clear mb10">
<label class="fl">&nbsp;默认分支&nbsp;&nbsp;</label>
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch', :class => "ml5", :style => "height: 28px;" %>
</li>
<% end %>
<li class="clear">
<label class="fl">&nbsp;语言&nbsp;&nbsp;</label>
<%= select_tag :language, options_for_select(["","java","python","c#"], :selected => "#{@project.language}"), :id => 'language', :class => "ml5", :style => "height: 28px;" %>
</li>
<li class="clear">
<label class="fl">公开&nbsp;&nbsp;</label>
<input class="fl mt8 ml5" id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
<span class="fl c_grey ">(打钩为公开项目,不打钩为私有项目;私有项目仅项目成员可见。)</span>
</li>
<li class="clear mb10">
<label class="fl ">隐藏代码库&nbsp;&nbsp;</label>
<input class="fl mt8 ml5" id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
</li>
<li class="clear">
<a href="javascript:void(0)" class="sy_btn_blue mr15 fr" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
</li>
</ul>
<% end %>
</div>