60 lines
3.9 KiB
Plaintext
60 lines
3.9 KiB
Plaintext
<%= 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"> </label>
|
||
<%#= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
|
||
</li>-->
|
||
<li class="mb10">
|
||
<label class="label"><span class="c_red f12">*</span> 项目名称 : </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"> 项目描述 : </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="项目描述作为项目的简介,将始终显示在动态页的顶部 最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>-->
|
||
</li>
|
||
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
|
||
<li class="clear">
|
||
<label class="fl"> 默认分支 :</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">公开 :</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 ">隐藏代码库 :</label>
|
||
<input class="fl mt8 ml5" id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
|
||
</li>
|
||
<li class="clear">
|
||
<% if Member.where(:user_id => User.current.id, :project_id => @project.id).first.try(:roles).to_s.include?("Manager") %>
|
||
<%= link_to(l(:button_delete_project), { :controller => 'projects', :action => 'archive', :id => @project, :status => params[:status], :type =>"project" },
|
||
:data => {:confirm => l(:text_delete_project_are_you_sure)}, :method => :post, :class => "sy_btn_grey mr5 fl ml15") unless @project.archived? %>
|
||
<p class="fl c_grey">(友情提示:删除该项目后如果您想恢复该项目,请联系系统管理员!)</p>
|
||
<% end %>
|
||
<a href="javascript:void(0)" class="sy_btn_blue mr15 fr" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
|
||
</li>
|
||
</ul>
|
||
<% end %>
|
||
</div>
|