圈子JS和modulesJS

版本库删除按钮
This commit is contained in:
huang 2015-04-16 09:49:03 +08:00
parent bc6ff57de2
commit 115d77dd01
7 changed files with 37 additions and 6 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

@ -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