Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
1382f9a0cd
|
@ -337,7 +337,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
end
|
||||
if params[:repository] == "pswd_is_null"
|
||||
html << l(:label_password_not_null)<< ";"
|
||||
html << l(:label_password_not_null)
|
||||
end
|
||||
flash[:error] = html if !html.to_s.blank?
|
||||
end
|
||||
|
|
|
@ -61,7 +61,7 @@ module FilesHelper
|
|||
s = ''
|
||||
projects.each do |project|
|
||||
if !project_contains_attachment?(project,attachment) && User.current.allowed_to?(:manage_files, project)
|
||||
s << "<label>#{ check_box_tag name, project.id, false, :id => nil } #{h project.name}</label>"
|
||||
s << "<label>#{ check_box_tag name, project.id, false, :id => nil } #{h project.name}</label><br/>"
|
||||
end
|
||||
end
|
||||
s.html_safe
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="tag_h">
|
||||
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "10"} %>
|
||||
<%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "10"} %>
|
||||
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %>
|
||||
<%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6"} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!---re_con_box end-->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
||||
<div class="upload_con">
|
||||
<h2>将此课件引入我的资源库</h2>
|
||||
<h2>将此文件件引入我的资源库</h2>
|
||||
<% if error == '403' %>
|
||||
<div class="upload_box">
|
||||
<div style="color: red;">您没有权限引用此资源</div>
|
||||
|
@ -13,13 +13,11 @@
|
|||
remote: true,
|
||||
id: "relation_file_form" do %>
|
||||
<%= hidden_field_tag(:file_id, file.id) %>
|
||||
<%= content_tag('div', projects_check_box_tags('projects[project][]', User.current.projects,project,file), :id => 'projects')%>
|
||||
<%= content_tag('div', projects_check_box_tags('projects[project][]', User.current.projects,project,file), :id => 'projects', :class => "hidden")%>
|
||||
<a id="submit_quote" href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_quote();">引 用</a><a href="javascript:void(0)" class="blue_btn grey_btn fl c_white" onclick="closeModal();">取 消</a>
|
||||
<% end -%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -11,113 +11,113 @@
|
|||
|
||||
<div class="members_left">
|
||||
<% if members.any? %>
|
||||
<ul style=" border-bottom:none;">
|
||||
<ul style=" border-bottom:none;">
|
||||
<li><span class="w90 f_b" ><%= l(:label_user) %></span><span class="w210 f_b"><%= l(:label_role_plural) %></span><span></span></li>
|
||||
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
|
||||
<% members.each do |member| %>
|
||||
<li >
|
||||
<%= link_to_user_header member.principal,false,:class => "w90 c_orange fl" %>
|
||||
<span class="w210 fl">
|
||||
<%= link_to_user_header member.principal,false,:class => "w90 c_orange fl" %>
|
||||
<span class="w210 fl">
|
||||
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||
:method => :put,
|
||||
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
|
||||
) do |f| %>
|
||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||
:method => :put,
|
||||
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
|
||||
) do |f| %>
|
||||
<% roles.each do |role| %>
|
||||
<ul style="text-align: left;" class="m115">
|
||||
<ul class="m120" style="text-align: left;" >
|
||||
<%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
|
||||
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
|
||||
<label ><%= h role %></label>
|
||||
</ul>
|
||||
<!--<br/>-->
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'membership[role_ids][]', '' %>
|
||||
<div class="m130">
|
||||
<a href="javascript:void(0)" class="member_btn" onclick="$('#member-<%= member.id%>-roles-form').submit();" style="margin-right: 10px;">
|
||||
<%= l(:button_change)%>
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="member_btn" onclick="$('#member-<%= member.id%>-roles-form').hide();$(this).parent().parent().parent().parent().height(30)">
|
||||
<%= l(:button_cancel)%>
|
||||
</a>
|
||||
</div>
|
||||
<%= hidden_field_tag 'membership[role_ids][]', '' %>
|
||||
<div class="m130">
|
||||
<a href="javascript:void(0)" class="member_btn" onclick="$('#member-<%= member.id%>-roles-form').submit();" style="margin-right: 10px;">
|
||||
<%= l(:button_change)%>
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="member_btn" onclick="$('#member-<%= member.id%>-roles-form').hide();$(this).parent().parent().parent().parent().height(30)">
|
||||
<%= l(:button_cancel)%>
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
<% unless member.user_id == @project.user_id %>
|
||||
<a href="javascript:void(0) " class="c_dblue ml15 fl" onclick="$('#member-<%= member.id%>-roles-form').show();$(this).parent().height(110);">编辑</a>
|
||||
<%= delete_link membership_path(member),
|
||||
:remote => true,
|
||||
:class => "c_dblue ml30 fl",
|
||||
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
|
||||
<% end%>
|
||||
</li>
|
||||
<% unless member.user_id == @project.user_id %>
|
||||
<a href="javascript:void(0) " class="c_dblue ml15 fl" onclick="$('#member-<%= member.id%>-roles-form').show();$(this).parent().height(110);">编辑</a>
|
||||
<%= delete_link membership_path(member),
|
||||
:remote => true,
|
||||
:class => "c_dblue ml30 fl",
|
||||
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
|
||||
<% end%>
|
||||
</li>
|
||||
<% end%>
|
||||
</ul>
|
||||
</ul>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div><!-- left -->
|
||||
<!--right begin-->
|
||||
<% if roles.any? %>
|
||||
<div class="members_right">
|
||||
<!-- applied -->
|
||||
<% if @project.applied_projects.any? %>
|
||||
<div class="members_jion">
|
||||
<p class="c_blue mb10 fb"><%= l(:label_apply_project) %></p>
|
||||
<%= form_for(@applied_members, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<div id="principals_for_applied_member">
|
||||
<%= render_principals_for_applied_members_new(@project) %>
|
||||
</div>
|
||||
<ul class="mb10">
|
||||
<li><%= l(:label_role_plural) %>:</li>
|
||||
<% roles.each do |role| %>
|
||||
<li>
|
||||
<div class="members_right">
|
||||
<!-- applied -->
|
||||
<% if @project.applied_projects.any? %>
|
||||
<div class="members_jion">
|
||||
<p class="c_blue mb10 fb"><%= l(:label_apply_project) %></p>
|
||||
<%= form_for(@applied_members, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<div id="principals_for_applied_member">
|
||||
<%= render_principals_for_applied_members_new(@project) %>
|
||||
</div>
|
||||
<ul class="mb10">
|
||||
<li><%= l(:label_role_plural) %>:</li>
|
||||
<% roles.each do |role| %>
|
||||
<li>
|
||||
<%= check_box_tag 'membership[role_ids][]', role.id %>
|
||||
<label ><%= h role %></label >
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fl" onclick="$('#new_membership').submit();">
|
||||
<%= l(:label_approve) %>
|
||||
</a>
|
||||
<a remote="true" href="javascript:void(0)" class="grey_btn fl ml10" onclick="refusal_applied_member();">
|
||||
<%= l(:label_refusal) %>
|
||||
</a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %><!--members_jion end-->
|
||||
<div class="cl"></div>
|
||||
<!-- add members -->
|
||||
<p class="c_blue fb mt10 mb5"><%= l(:label_member_new) %></p>
|
||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<div class="member_search">
|
||||
<input id="principal_search" class="member_search_input fl" type="text" placeholder="请输入用户名称来搜索好友">
|
||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fl" onclick="$('#new_membership').submit();">
|
||||
<%= l(:label_approve) %>
|
||||
</a>
|
||||
<a remote="true" href="javascript:void(0)" class="grey_btn fl ml10" onclick="refusal_applied_member();">
|
||||
<%= l(:label_refusal) %>
|
||||
</a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %><!--members_jion end-->
|
||||
<div class="cl"></div>
|
||||
<!-- add members -->
|
||||
<p class="c_blue fb mt10 mb5"><%= l(:label_member_new) %></p>
|
||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<div class="member_search">
|
||||
<input id="principal_search" class="member_search_input fl" type="text" placeholder="请输入用户名称来搜索好友">
|
||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="principals_for_new_member">
|
||||
<%= render_principals_for_new_project_members(@project) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="principals_for_new_member">
|
||||
<%= render_principals_for_new_project_members(@project) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<ul class="rolebox mb10 mt10">
|
||||
<li class="fb">
|
||||
<%= l(:label_role_plural) %>:
|
||||
</li>
|
||||
<% roles.each do |role| %>
|
||||
<li>
|
||||
<%= check_box_tag 'membership[role_ids][]', role.id %>
|
||||
<label ><%= h role %></label>
|
||||
<ul class="rolebox mb10 mt10">
|
||||
<li class="fb">
|
||||
<%= l(:label_role_plural) %>:
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="cl mb10"></div>
|
||||
<a href="javascript:void(0)" class="member_btn" onclick="$(this).parent().parent().submit();">
|
||||
新增成员
|
||||
</a>
|
||||
</div>
|
||||
<% end%>
|
||||
</div><!-- 右边 end-->
|
||||
<% roles.each do |role| %>
|
||||
<li>
|
||||
<%= check_box_tag 'membership[role_ids][]', role.id %>
|
||||
<label ><%= h role %></label>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="cl mb10"></div>
|
||||
<a href="javascript:void(0)" class="member_btn" onclick="$(this).parent().parent().submit();">
|
||||
新增成员
|
||||
</a>
|
||||
</div>
|
||||
<% end%>
|
||||
</div><!-- 右边 end-->
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
$("#pro_st_edit_ku").toggle();
|
||||
}
|
||||
</script>
|
||||
<%= error_messages_for 'repository' %>
|
||||
<%= str = error_messages_for 'repository' %>
|
||||
<% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %>
|
||||
<% ip = RepositoriesHelper::REPO_IP_ADDRESS %><!--Added by tanxianbo For formatting project's path-->
|
||||
<% if @project.repositories.any? %>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<div id="pro_st_edit_ku" class="pro_st_edit_ku">
|
||||
<ul>
|
||||
<li >
|
||||
<label class="label02"> 管理系统 :</label>
|
||||
<label class="label02"><%=l(:label_scm)%>:</label>
|
||||
<%= select_tag('repository_scm',
|
||||
options_for_select(["Git"],@repository.class.name.demodulize),
|
||||
:data => {:remote => true, :method => 'get'})%>
|
||||
|
@ -73,25 +73,24 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 主版本库 :</label>
|
||||
<label class="label02"><%=l(:field_repository_is_default)%>:</label>
|
||||
<%= f.check_box :is_default, :label => "" %></p>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span> 版本库名 :</label>
|
||||
<label class="label02"><span class="c_red">*</span><%=l(:label_repository_name)%>:</label>
|
||||
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>""%>
|
||||
<% unless @repository.identifier_frozen? %>
|
||||
<span class="c_grey">长度必须在 1 到 254 个字符之间。 仅小写字母(a-z)、数字、破折号(-)和下划线(_)可以使用。
|
||||
一旦保存,标识无法修改。</span>
|
||||
<span class="c_grey"><%=l(:text_length_between,:min=>1,:max=>254)<<l(:text_project_identifier_info)%></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span> 密码 :</label>
|
||||
<label class="label02"><span class="c_red">*</span><%=l(:label_password)%></label>
|
||||
<%= f.password_field :upassword, :label=> "" %>
|
||||
<span class="c_grey">该密码在项目组内可共享</span>
|
||||
<span class="c_grey"><%= l(:label_upassword_info)%></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<a href="#" onclick="$('#repository-form').submit();" class="blue_btn fl ml110">保存</a>
|
||||
<a href="<%= settings_project_path(@project, :tab => 'repositories')%>" class="grey_btn fl ml10">取消</a>
|
||||
<a href="#" onclick="$('#repository-form').submit();" class="blue_btn fl ml110"><%=l(:button_save)%></a>
|
||||
<a href="<%= settings_project_path(@project, :tab => 'repositories')%>" class="grey_btn fl ml10"><%=l(:button_cancel)%></a>
|
||||
</div><!--pro_st_edit_issues end-->
|
||||
<% end %>
|
|
@ -57,32 +57,32 @@
|
|||
<div id="pro_st_edit_ban" class="pro_st_edit_ban">
|
||||
<ul>
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span>名称:</label>
|
||||
<label class="label02"><span class="c_red">*</span><%=l(:field_name)%>:</label>
|
||||
<%= f.text_field :name, :maxlength => 60, :required => true %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">描述:</label>
|
||||
<label class="label02"><%=l(:label_version_description)%>:</label>
|
||||
<%= f.text_field :description, :maxlength => 60 %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">状态:</label>
|
||||
<label class="label02"><%=l(:field_status)%>:</label>
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">Wiki 页面:</label>
|
||||
<label class="label02"><%=l(:label_wiki_page)%>:</label>
|
||||
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">日期:</label>
|
||||
<label class="label02"><%=l(:label_date)%>:</label>
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
|
||||
<%= calendar_for('version_effective_date') %>
|
||||
</li>
|
||||
<div class="cl mb10"></div>
|
||||
<li >
|
||||
<label class="label02">共享:</label>
|
||||
<label class="label02"><%=l(:field_sharing)%>:</label>
|
||||
<%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
|
||||
</li>
|
||||
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110">保存</a>
|
||||
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_repository_plural) %></h2>
|
||||
</div>
|
||||
<div class="contextual">
|
||||
<div>
|
||||
<h3><%= l(:label_revision_plural) %></h3>
|
||||
<%= form_tag(
|
||||
{:controller => 'repositories', :action => 'revision', :id => @project,
|
||||
:repository_id => @repository.identifier_param},
|
||||
|
@ -12,7 +13,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<h3><%= l(:label_revision_plural) %></h3>
|
||||
|
||||
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project,
|
||||
|
|
|
@ -3,29 +3,29 @@
|
|||
<div id="pro_st_edit_ban" class="pro_st_edit_ban_display">
|
||||
<ul>
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span>名称:</label>
|
||||
<label class="label02"><span class="c_red">*</span><%=l(:field_name)%>:</label>
|
||||
<%= f.text_field :name, :maxlength => 60,:class=>" w280", :label => ""%>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">描述:</label>
|
||||
<label class="label02"><%=l(:label_version_description)%>:</label>
|
||||
<%= f.text_field :description, :maxlength => 60,:class=>" w280", :label => "" %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">状态:</label>
|
||||
<label class="label02"><%=l(:field_status)%>:</label>
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">Wiki 页面:</label>
|
||||
<label class="label02"><%=l(:label_wiki_page)%>:</label>
|
||||
<%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">日期:</label>
|
||||
<label class="label02"><%=l(:label_date)%>:</label>
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%>
|
||||
<%= calendar_for('version_effective_date') %>
|
||||
</li>
|
||||
<div class="cl mb10"></div>
|
||||
<li >
|
||||
<label class="label02">共享:</label>
|
||||
<label class="label02"><%=l(:field_sharing)%>:</label>
|
||||
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
<%= labelled_form_for @version,:html=>{:id=>"new_project_version_form"} do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110">保存</a>
|
||||
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ zh:
|
|||
field_enterprise_name: 组织名称
|
||||
label_organization_choose: --请选择组织--
|
||||
text_length_between: "长度必须在 %{min} 到 %{max} 个字符之间。"
|
||||
text_project_identifier_info: "小写字母(a-z)、数字、破折号(-)和下划线(_)可以使用。<br />一旦保存,标识无法修改。"
|
||||
text_project_identifier_info: "小写字母(a-z)、数字、破折号(-)和下划线(_)可以使用。一旦保存,标识无法修改。"
|
||||
field_is_public: 公开
|
||||
field_hidden_repo: 隐藏代码库
|
||||
|
||||
|
|
Loading…
Reference in New Issue