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

59 lines
3.5 KiB
Plaintext
Raw Normal View History

2016-10-31 15:29:20 +08:00
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
2016-10-12 17:02:51 +08:00
<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">
2016-10-12 17:02:51 +08:00
<label class="label fl">&nbsp;&nbsp;</label>
<%#= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
</li>-->
2016-10-12 17:02:51 +08:00
<li class="mb10">
<label class="label"><span class="c_red f12">*</span>&nbsp;项目名称&nbsp;&nbsp;:&nbsp;</label>
2016-10-19 17:43:05 +08:00
<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>
2016-10-12 17:02:51 +08:00
</li>
<li class="clear mb10">
<label class="label fl mr5">&nbsp;项目简介&nbsp;&nbsp;:&nbsp;</label>
2016-10-31 15:29:20 +08:00
<%= 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>-->
2016-10-12 17:02:51 +08:00
</li>
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
<li class="clear mb10">
2016-10-12 17:02:51 +08:00
<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;" %>
2016-10-12 17:02:51 +08:00
</li>
2016-02-26 19:25:12 +08:00
<% 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>
2016-10-12 17:02:51 +08:00
<li class="clear">
<label class="fl">公开&nbsp;&nbsp;</label>
2016-11-09 14:57:39 +08:00
<input class="fl mt8 ml5" id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
2016-10-12 17:02:51 +08:00
<span class="fl c_grey ">(打钩为公开项目,不打钩为私有项目;私有项目仅项目成员可见。)</span>
</li>
<li class="clear mb10">
<label class="fl ">隐藏代码库&nbsp;&nbsp;</label>
2016-11-09 14:57:39 +08:00
<input class="fl mt8 ml5" id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
2016-10-12 17:02:51 +08:00
</li>
<li class="clear">
<a href="javascript:void(0)" class="sy_btn_blue mr15 fr" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
</li>
</ul>
2016-10-18 17:09:00 +08:00
<% end %>
</div>