Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
whimlex 2015-04-16 09:54:27 +08:00
commit 7ce8ae0261
11 changed files with 47 additions and 20 deletions

View File

@ -323,6 +323,7 @@ class ProjectsController < ApplicationController
@member ||= @project.members.new
@trackers = Tracker.sorted.all
@wiki ||= @project.wiki
@select_tab = params[:tab]
end
def send_mail_to_member

View File

@ -1409,6 +1409,16 @@ module ApplicationHelper
link_to l(:button_delete), url, options
end
def delete_link_version(url, options={})
options = {
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'c_purple'
}.merge(options)
link_to l(:button_delete), url, options
end
def delete_new_link(url, options={})

View File

@ -1,5 +1,4 @@
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
<div id="project_memu">
<div class="subNav">
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
@ -50,5 +49,4 @@
<div class="subNav subNav_jiantou" onclick="expand_tools_expand();" id="expand_tools_expand"><%= l(:label_project_more) %></div>
<ul class="navContent">
<%= render 'projects/tools_expand' %>
</ul>
</div>
</ul>

View File

@ -1,5 +1,4 @@
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
<div id="project_memu">
<div class="subNav">
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
@ -27,5 +26,4 @@
<%= link_to "+"+l(:label_upload_files), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
<% end %>
</div>
<% end %>
</div>
<% end %>

View File

@ -1,5 +1,4 @@
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
<div id="project_memu">
<div class="subNav">
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
@ -38,5 +37,4 @@
<%= link_to "+"+l(:label_upload_files), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
<% end %>
</div>
<% end%>
</div>
<% end%>

View File

@ -43,19 +43,19 @@
if(data == 1)
{
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team)))%>");
$("#project_memu").html('<%= escape_javascript(render(:partial => 'layouts/base_development_group')) %>');
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_development_group')) %>');
$("#close_light").attr("onClick","close_window('development_group');");
}
else if(data == 2)
{
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_research_group)))%>");
$("#project_memu").html('<%= escape_javascript(render(:partial => 'layouts/base_research_team')) %>');
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_research_team')) %>');
$("#close_light").attr("onClick","close_window('research_group');");
}
else if(data == 3)
{
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_friend_organization)))%>");
$("#project_memu").html('<%= escape_javascript(render(:partial => 'layouts/base_friend_group')) %>');
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_friend_group')) %>');
$("#close_light").attr("onClick","close_window('friend_organization');");
}
else
@ -165,13 +165,15 @@
<% end %><!--end-->
<!--menu 左侧工具栏 -->
<!--project_new_type: 1为开发组2为科研组3为朋友圈子-->
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
<div id="project_memu_list">
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
<%= render :partial => 'layouts/base_development_group', :locals => {:project => @project}%>
<% elsif @project.project_new_type == 2 %>
<%= render :partial => 'layouts/base_research_team', :locals => {:project => @project}%>
<% else %>
<% else %>
<%= render :partial => 'layouts/base_friend_group', :locals => {:project => @project}%>
<% end %>
</div>
<!-- end -->
</div><!--项目侧导航 end-->
<div class="cl"></div>

View File

@ -0,0 +1,10 @@
$('#pro_st_tbc_02').html('<%= escape_javascript(render :partial => 'projects/settings/new_modules') %>');
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
$('#project_memu_list').html('<%= escape_javascript(render :partial => 'layouts/base_development_group', :locals => {:project => @project}) %>');
<% elsif @project.project_new_type == 2 %>
$('#project_memu_list').html('<%= escape_javascript(render :partial => 'layouts/base_research_team', :locals => {:project => @project}) %>');
<% else %>
$('#project_memu_list').html('<%= escape_javascript(render :partial => 'layouts/base_friend_group', :locals => {:project => @project}) %>');
<% end %>

View File

@ -1,3 +1,13 @@
<script type="text/javascript">
<%if @select_tab%>
$(function(){
<%if @select_tab == "modules"%>
project_setting(2);
<% end%>
});
<% end%>
</script>
<div class="project_r_h">
<h2 class="project_h2">配置</h2>
</div>

View File

@ -5,18 +5,18 @@
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<li>
<label>
<%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m) -%>
<%= l_or_humanize(m, :prefix => "project_module_") %>
<%= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m)).html_safe -%>
<%= l_or_humanize(m, :prefix => "project_module_").html_safe %>
</label>
</li>
<% end %>
</ul>
</div><!--box end-->
<p class="mb10 c_grey">
<%= check_all_links 'modules-form' %>
<%= check_all_links('modules-form').html_safe %>
</p>
<p>
<a remote="true" href="javascript:void(0)" class="blue_btn" onclick="$('#modules-form').submit();">
<a href="javascript:void(0)" class="blue_btn" onclick="$('#modules-form').submit();">
<%= l(:button_save) %>
</a>
</p>

View File

@ -28,7 +28,7 @@
<td >
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %></a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" ><%= delete_link version_path(version) %></a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" ><%= delete_link_version version_path(version) %></a>
<% end %>
</td>
</tr>

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150409092151) do
ActiveRecord::Schema.define(:version => 20150414115406) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false