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

46 lines
2.6 KiB
Plaintext
Raw Normal View History

2015-04-20 14:54:04 +08:00
<%= error_messages_for 'project' %>
2015-04-11 17:04:48 +08:00
<%= labelled_form_for @project do |f| %>
<ul class="newpro_box ">
2015-04-16 15:48:13 +08:00
<li class="ml45 mb10">
2015-04-11 17:04:48 +08:00
<%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
<div class="cl"></div>
</li>
<li >
<label class="label02"><span class="c_red">*</span>&nbsp;项目名称&nbsp;&nbsp;</label>
2015-04-20 14:54:04 +08:00
<!--<input id="project_name" name="project[name]" class=" w543" type="text" value="<%#= @project.name%>">-->
<input type="text" name="project[name]" id="project_name" class="w543" maxlength="100" onkeyup="regex_project_name();" value="<%= @project.name %>">
<span class="c_red ml110" id="project_name_notice" style="display: none;">项目名称不能为空!</span>
2015-04-11 17:04:48 +08:00
</li>
<div class="cl"></div>
<li >
<label class="label02" >&nbsp;&nbsp;项目描述&nbsp;&nbsp;</label>
2015-04-11 17:04:48 +08:00
<textarea class="w543" id="project_description" name="project[description]" rows="8" placeholder="最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
<div class="cl"></div>
</li>
2016-02-26 19:25:12 +08:00
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
<li>
<label class="label02">&nbsp;默认分支&nbsp;&nbsp;</label>
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch' %>
</li>
<% end %>
<div class="cl"></div>
2015-04-11 17:04:48 +08:00
<li >
<label class="label02">公开&nbsp;&nbsp;</label>
<input id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
<div class="cl"></div>
</li>
</ul>
2015-04-20 14:54:04 +08:00
<a href="javascript:void(0)" class="blue_btn ml110" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
2015-04-11 17:04:48 +08:00
<% end %>
<% if User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %>
<div class="mt30">
<img src="/images/pic_del.gif" class="mr5">
<%= link_to(l(:button_delete_project), { :controller => 'projects', :action => 'archive', :id => @project, :status => params[:status], :type =>"project" },
:data => {:confirm => l(:text_are_you_sure)}, :method => :post) unless @project.archived? %>
<%#=link_to "删除该课程", course_path(@course), :method => :delete, :confirm=>"确认要删除该课程吗?" %>
<span>(友情提示:删除该项目后如果您想恢复该项目,请联系系统管理员!)</span>
</div>
<% end %>
2015-04-11 17:04:48 +08:00
<div class="cl"></div>