项目配置添加KE

This commit is contained in:
huang 2016-10-31 15:29:20 +08:00
parent 06c49aef23
commit 5b2694359f
3 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,6 @@
<%= 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| %>
@ -13,8 +16,20 @@
<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">&nbsp;项目描述&nbsp;&nbsp;:&nbsp;</label>
<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>
<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">

View File

@ -4,7 +4,7 @@
<% if @project.description.blank? %>
<p class="break_word"><%= @project.name %></p>
<% else %>
<p class="break_word"><%= @project.description %></p>
<p class="break_word"><%=h @project.description.html_safe %></p>
<% end %>
</div>

View File

@ -358,6 +358,7 @@ function regex_project_name() {
//配置-信息提交
function submit_edit_project(id) {
project_setting_editor.sync();
if (regex_project_name()) {
$("#edit_project_" + id).submit();
}