Merge branch 'rep_quality' into develop
This commit is contained in:
commit
446f0d142c
|
@ -329,7 +329,18 @@ class AttachmentsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# prams[:type] => history 历史版本
|
||||
def destroy
|
||||
if params[:type] == "history"
|
||||
begin
|
||||
AttachmentHistory.find(params[:history_id]).destroy
|
||||
@attachment = Attachment.find(params[:id])
|
||||
@is_history = true
|
||||
@attachment_histories = @attachment.attachment_histories
|
||||
rescue Exception => e
|
||||
puts e
|
||||
end
|
||||
else
|
||||
if @attachment.container.respond_to?(:init_journal)
|
||||
@attachment.container.init_journal(User.current)
|
||||
end
|
||||
|
@ -342,6 +353,8 @@ class AttachmentsController < ApplicationController
|
|||
else
|
||||
@attachment.destroy
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
if !@attachment.container.nil? &&
|
||||
|
|
|
@ -460,6 +460,16 @@ class OrganizationsController < ApplicationController
|
|||
@members = paginateHelper @members, 20
|
||||
end
|
||||
|
||||
def more_org_submains
|
||||
@org_subfield = OrgSubfield.find params[:org_subfield_id].to_i
|
||||
|
||||
@page = params[:page]
|
||||
@submains = @org_subfield.sub_domains.reorder('priority').uniq.page((params[:page].to_i || 1) +1).per(5)
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def more_org_projects
|
||||
@organization = Organization.find params[:id]
|
||||
@page = params[:page]
|
||||
|
|
|
@ -3056,7 +3056,7 @@ class UsersController < ApplicationController
|
|||
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}
|
||||
user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id }
|
||||
# user_org_ids = User.current.organizations.map {|o| o.id}
|
||||
if( params[:type] == "1") # 我的资源
|
||||
if(params[:type].blank? || params[:type] == "1") # 我的资源
|
||||
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
|
||||
|
@ -3070,7 +3070,7 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
|
||||
end
|
||||
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
|
||||
elsif (params[:type] == "6") # 公共资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources_public( user_course_ids, @order, @score)
|
||||
elsif params[:status] == "3"
|
||||
|
|
|
@ -1380,6 +1380,21 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
# 判断课程、项目、组织是否有权限删除历史资源
|
||||
# 项目管理员或者附件的作者可以删除
|
||||
# (is_project_manager?(User.current.id, @project.id) || User.current.id == history.author_id)
|
||||
def allow_to_delete_attachment history
|
||||
attachment = history.attachment
|
||||
case attachment.try(:container_type)
|
||||
when "Project"
|
||||
result = is_project_manager?(User.current.id, attachment.container_id) || User.current.id == history.author_id || User.current.admin?
|
||||
when "Course"
|
||||
result = User.current.allowed_to?(:as_teacher, attachment.container) || User.current.id == history.author_id || User.current.admin?
|
||||
when "OrgSubfield"
|
||||
result = User.current.id == history.author_id || User.current.admin_of_org?(@organization) || User.current.admin?
|
||||
end
|
||||
end
|
||||
|
||||
# Wiki links
|
||||
#
|
||||
# Examples:
|
||||
|
|
|
@ -369,6 +369,7 @@ class Attachment < ActiveRecord::Base
|
|||
|
||||
# 有了历史记录的数据记录是不能被删除的。
|
||||
# true 能被删除 false 不能被删除
|
||||
# 2016.10.14 修改成可以删除,删除时候添加提示全部删除
|
||||
def destroyable
|
||||
self.attachment_histories.count == 0
|
||||
end
|
||||
|
|
|
@ -1,66 +1,11 @@
|
|||
<!--<div class="resourceUploadPopup">-->
|
||||
<span class="uploadDialogText">更新资源版本</span>
|
||||
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
||||
<div>
|
||||
<div>
|
||||
<div>当前版本
|
||||
<span class="attachment" >
|
||||
<input readonly="readonly" name="attachments[1][filename]" value="<%=@attachment.filename%>" class="upload_filename readonly" type="text">
|
||||
</span>
|
||||
<div class="muban_popup_top">
|
||||
<h3 class="fl">更新资源版本</h3>
|
||||
<a href="javascript:void(0);" class="muban_icons_close fr" onclick="hideModal();"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% unless @attachment_histories.empty? %>
|
||||
<div class="muban_popup_con" >
|
||||
|
||||
<div >历史版本</div>
|
||||
<div style="max-height: 95px;overflow-y:auto; background-color: #e3e3e3;" class="mb10 p10">
|
||||
<% @attachment_histories.each do |history| %>
|
||||
<span class="attachment">
|
||||
<%= link_to truncate(history.filename,length: 35, omission: '...'),
|
||||
download_history_attachment_path(history.id, history.filename),
|
||||
:title => history.filename+"\n"+history.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:300px;",:class => "linkBlue f_14 f_b upload_filename fl" %>
|
||||
<span class="fr">版本号:<%= history.version %></span>
|
||||
<div class="cl"></div>
|
||||
</span>
|
||||
|
||||
<% end %>
|
||||
<div class=" clear ml15 mr15 mt15" id="attachment_history_popub">
|
||||
<%= render :partial => "files/attachment_history_popub" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<%= form_tag(upload_attachment_version_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
|
||||
<%= hidden_field_tag :old_attachment_id,@attachment.id %>
|
||||
<div>
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
</span>
|
||||
</div>
|
||||
<div class="uploadBox">
|
||||
<input type="hidden" name="attachment_type" value="1">
|
||||
<%= render :partial => 'attachments/upload_attachment_new_version' %>
|
||||
<div class="cl"></div>
|
||||
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
|
||||
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
|
||||
</div>
|
||||
<div class="W300 uploadResourceIntr fontGrey2">
|
||||
<span id="upload_file_count" class="mr15">(未选择文件)</span>
|
||||
<span>您可以上传小于<span class="c_red">50MB</span>的文件</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mb5 mt5">
|
||||
<p class="c_dark f14" style="line-height:30px;">描述:</p>
|
||||
<div class="fl">
|
||||
<textarea style="resize:none" type="text" placeholder="请编辑资源描述" name="description" class="InputBox fl H60 W420" ><%= @attachment.description %></textarea>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div style="margin-top: 10px" >
|
||||
<div class="courseSendSubmit">
|
||||
<!--<a href="javascript:void(0);" class="sendSourceText" onclick="">确定</a>-->
|
||||
<%= submit_tag '确定',:onclick=>'upload_attachment_version(event);',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sendSourceText' %>
|
||||
</div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" id="upload_files_cancle_btn" class="sendSourceText" onclick="hideModal();">取消</a></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<!--</div>-->
|
|
@ -1,8 +1,8 @@
|
|||
<div class="clear mb10">
|
||||
<a class="sub_btn fl" name="button" onclick="_file.click()" onmouseover="" style="<%= ie8? ? 'display:none' : ''%>">文件浏览</a>
|
||||
<p class="fl ml5 mt3 sy_cgrey">(未选择文件) 您可以上传小于<span class="c_red">50MB</span>的文件</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<button name="button" class="sub_btn" onclick="_file.click()" onmouseover="this.focus()" style="<%#= ie8? ? 'display:none' : ''%>" type="button" ><%#= l(:label_browse) %></button>-->
|
||||
<a href="javascript:void(0);" class="uploadIcon f14" name="button" onclick="_file.click()" onmouseover="" style="<%= ie8? ? 'display:none' : ''%>">
|
||||
<span class="chooseFile">选择文件</span></a>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => ie8? ? '':'file_selector',
|
||||
|
|
|
@ -1,7 +1,2 @@
|
|||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'attachments/show_attachment_history' )%>');
|
||||
showModal('ajax-modal', '452px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
||||
$('#ajax-modal').parent().css("top","40%").css("left","50%").css("position","fixed");
|
||||
$('#ajax-modal').parent().addClass("resourceUploadPopup");
|
||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
||||
var htmlvalue = "<%= escape_javascript(render :partial => 'attachments/show_attachment_history') %>";
|
||||
pop_box_new(htmlvalue,820,360);
|
|
@ -1,3 +1,8 @@
|
|||
//历史版本删除局部刷新
|
||||
<% if @is_history %>
|
||||
$("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub') %>');
|
||||
<% end %>
|
||||
|
||||
<% if @is_destroy%>
|
||||
$("#attachment_<%= @attachment.id%>").remove();
|
||||
if(document.getElementById("revise_attachment_div_<%= @attachment.id%>")) {
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<table class="muban_table mb15" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>资源名称</th>
|
||||
<th >下载数</th>
|
||||
<th>引用数</th>
|
||||
<th>版本号</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th ><p class="popup_ziyuan_title"><%= @attachment.filename %><span class="muban_icons_blue ml5">当前版本</span></p></th>
|
||||
<th><%= @attachment.downloads %></th>
|
||||
<th><%= @attachment.try(:quotes).to_i %></th>
|
||||
<th><%= format_time(@attachment.created_on) %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<% @attachment_histories.each do |history| %>
|
||||
<tr>
|
||||
<th ><p class="popup_ziyuan_title">
|
||||
<%= link_to history.filename, download_history_attachment_path(history.id, history.filename), :title => history.filename+"\n"+history.description.to_s %></p>
|
||||
</th>
|
||||
<th><%= history.downloads %></th>
|
||||
<th><%= history.try(:quotes).to_i %></th>
|
||||
<th><%= format_time(history.created_on) %></th>
|
||||
<th>
|
||||
<%= link_to( '删除资源', attachment_path(history.attachment, :history_id => history, :type => "history"),
|
||||
:remote => true,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:class => "postOptionLink",
|
||||
:class => "btn") if allow_to_delete_attachment(history) %>
|
||||
</th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= form_tag(upload_attachment_version_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
|
||||
<%= hidden_field_tag :old_attachment_id,@attachment.id %>
|
||||
<div>
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
</span>
|
||||
</div>
|
||||
<div class="clear mb10">
|
||||
<input type="hidden" name="attachment_type" value="1">
|
||||
<%= render :partial => 'attachments/upload_attachment_new_version' %>
|
||||
<div class="cl"></div>
|
||||
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
|
||||
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<textarea style="resize:none" type="text" placeholder="请在此编辑资源描述" name="description" class="mr15 mb10 muban_textarea" ><%= @attachment.description %></textarea>
|
||||
<div class="clear mb15">
|
||||
<a href="javascript:void(0);" id="upload_files_cancle_btn" class="btn fr" onclick="hideModal();">取消</a>
|
||||
<%= submit_tag '确定', :onclick => 'upload_attachment_version(event);', :onfocus => 'this.blur()', :id => 'upload_files_submit_btn', :class => 'btn btn-blue fr mr5' %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -80,7 +80,7 @@
|
|||
<% end %>
|
||||
<li>
|
||||
<%= link_to( '删除资源', attachment_path(file),
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" && file.destroyable %>
|
||||
:data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" %>
|
||||
</li>
|
||||
</ul>
|
||||
<%else%>
|
||||
|
|
|
@ -82,8 +82,8 @@
|
|||
<%end%>
|
||||
<li>
|
||||
<%= link_to( '删除资源', attachment_path(file),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" && file.destroyable %>
|
||||
:data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)},
|
||||
:method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= link_to( '删除资源', attachment_path(file),:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project" && file.destroyable %>
|
||||
<%= link_to( '删除资源', attachment_path(file),:data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project" %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<% if @container_type == 0 %>
|
||||
<div id="resource_list">
|
||||
<%= render :partial => 'project_file', locals: {project: @project} %>
|
||||
|
|
|
@ -24,15 +24,15 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label">来源:</label>
|
||||
<select class="w150">
|
||||
<option>客户</option>
|
||||
<option>用户</option>
|
||||
<option>其他</option>
|
||||
</select>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<!--<li>-->
|
||||
<!--<label class="label">来源:</label>-->
|
||||
<!--<select class="w150">-->
|
||||
<!--<option>客户</option>-->
|
||||
<!--<option>用户</option>-->
|
||||
<!--<option>其他</option>-->
|
||||
<!--</select>-->
|
||||
<!--</li>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<li>
|
||||
<label class="label"><%= l(:field_assigned_to) %>:</label>
|
||||
<% if @issue.safe_attribute? 'assigned_to_id' %>
|
||||
|
@ -85,13 +85,6 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label02">实际工时 (H):</label>
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li><label class="label02"> % 完成 : </label>
|
||||
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
|
||||
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||
|
|
|
@ -1,3 +1,121 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<script xmlns="http://www.w3.org/1999/html">
|
||||
//issues列表
|
||||
/*function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('issues_list_nav_'+i).className='issues_nav_nomal';
|
||||
|
||||
}
|
||||
|
||||
g('issues_list_nav_'+n).className='issues_nav_hover';
|
||||
}*/
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
$("input[nhname='date_show']").change(function(){
|
||||
if($(this).val()=='创建日期起始' || $(this).val()=='创建日期结束')return;
|
||||
$("input[nhname='date_val']",$(this).parent('div')).val($(this).val());
|
||||
remote_function();
|
||||
});
|
||||
|
||||
});
|
||||
function remote_function() {
|
||||
if($.trim($("#issue_create_date_end_show").val()) !="" && Date.parse($.trim($("#issue_create_date_end_show").val())) < Date.parse($.trim($("#issue_create_date_start_show").val()))){
|
||||
alert("开始日期不能大于结束日期!");
|
||||
}
|
||||
$("#issue_query_form").submit();
|
||||
// $.ajax({
|
||||
// url:'<%#= project_issues_path(@project)%>',
|
||||
// data:{
|
||||
// subject:$("#v_subject").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||
// status_id: $("#status_id").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||
// assigned_to_id: $("#assigned_to_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||
// priority_id: $("#priority_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||
// author_id: $("#author_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, "")
|
||||
// },
|
||||
// success: function(data){
|
||||
// },
|
||||
// error: function(data){
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
function remote_function_export(project_id) {
|
||||
// $("#export_issue_hidden").attr("value","1");
|
||||
// $("#issue_query_form").attr("set_filter","1");
|
||||
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues.xls");
|
||||
// $("#issue_query_form").submit();
|
||||
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues");
|
||||
// $("#issue_query_form").removeAttr("format");
|
||||
// $("#issue_query_form").attr("set_filter","0");
|
||||
// $("#export_issue_hidden").attr("value","0");
|
||||
|
||||
var tracker_id = $("#tracker_id").attr("value");
|
||||
var subject = $("#v_subject").attr("value");
|
||||
var assigned_to_id = $("#assigned_to_id").attr("value");
|
||||
var fixed_version_id = $("#fixed_version_id").attr("value");
|
||||
var status_id = $("#status_id").attr("value");
|
||||
var done_ratio = $("#done_ratio").attr("value");
|
||||
var test = $("#test").attr("value");
|
||||
var author_id = $("#author_id").attr("value");
|
||||
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
|
||||
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
|
||||
$("#sendexcel").attr("href","/projects/"+project_id+"/issues.xls?export=true&set_filter=1&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end);
|
||||
///projects/1811/issues.xls?export=true&set_filter=1
|
||||
|
||||
|
||||
}
|
||||
|
||||
// function nh_reset_form() {
|
||||
// $("#issue_query_form")[0].reset();
|
||||
// $("input[nhname='date_val']").val('');//涛哥的火狐reset 清不掉这个值 我擦
|
||||
// remote_function();
|
||||
// }
|
||||
|
||||
function EnterPress(e){
|
||||
var e = e || window.event;
|
||||
if(e.keyCode == 13){
|
||||
remote_function();
|
||||
}
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中assign_to
|
||||
function switch_assign_to(assign) {
|
||||
var assign = "option[value =" + assign + "]";
|
||||
$("#issues_type_2").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
|
||||
$("select[id='author_id']").val('');
|
||||
remote_function();
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中user_id
|
||||
function createByMe(user_id) {
|
||||
var user = "option[value =" + user_id + "]";
|
||||
$("#createByMe").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='author_id']").find(user).attr("selected", "selected");
|
||||
remote_function();
|
||||
}
|
||||
// 清楚表单所有选项
|
||||
function all_reset_form() {
|
||||
$("#issue_query_form")[0].reset();
|
||||
$("select[id='author_id']").val('');
|
||||
$("select[id='assigned_to_id']").val('');
|
||||
$("input[nhname='date_val']").val('');
|
||||
remote_function();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="homepageRight mt0 ml10" >
|
||||
<div class="issues_con fl">
|
||||
<div class="clear mb5">
|
||||
|
@ -9,7 +127,7 @@
|
|||
<li>关闭<a class="issues_greycirbg_btn "><%#= @issues_filter_author_count %><%= @issue_close_count %></a></li>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
<!--<input type="button" class="hw_btn_blue fr" value="导出EXCEL" onclick="remote_function_export('<%#= @project.id %>')">-->
|
||||
<!--<input type="button" class="hw_btn_blue fr" value="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">-->
|
||||
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls', :export => true, :set_filter => "1")%>" id="sendexcel" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">导出EXCEL</a>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<%= link_to "首页",user_activities_path(User.current), :class => "c_white f16 db p10", :title => "回到个人首页"%>
|
||||
</li>
|
||||
<li class="navHomepageMenu fl">
|
||||
<%= link_to "资源库", user_resource_user_path(User.current, :type => 6), :class => "c_white f16 db p10" %>
|
||||
<%= link_to "资源库", user_resource_user_path(User.current, :type => 1), :class => "c_white f16 db p10" %>
|
||||
</li>
|
||||
<% if hidden_unproject_infos %>
|
||||
<li class="navHomepageMenu fl">
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus'%>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus', 'css/moduel'%>
|
||||
<%= javascript_include_tag "course","avatars","header","attachments",'prettify' %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'prettify','jquery/jquery-ui-1.9.2','css/common','css/structure','css/public','repository','css/courses','css/org','css/project', 'css/popup' %>
|
||||
<%= stylesheet_link_tag 'prettify','jquery/jquery-ui-1.9.2','css/common','css/structure','css/public','repository','css/courses','css/org','css/project', 'css/popup', 'css/moduel' %>
|
||||
<%= javascript_include_tag 'cookie','project',"avatars", 'organization','header','prettify','select_list_move','org'%>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','prettify','repository','css/gantt', 'css/calendar' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','prettify','repository','css/gantt', 'css/calendar', "css/moduel" %>
|
||||
<%= javascript_include_tag 'cookie','project',"avatars", 'header','prettify','select_list_move','attachments' %>
|
||||
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
|
|
|
@ -43,12 +43,11 @@
|
|||
$(this).prev().css("color","#808080");
|
||||
$(this).css("z-index", "1");
|
||||
});
|
||||
|
||||
//二级菜单滑动时箭头方向控制
|
||||
$(".homepageLeftMenuMoreIcon").toggle(function(){
|
||||
$(this).css("background","url(/images/homepage_icon.png) 100px -624px no-repeat");
|
||||
},function(){
|
||||
$(this).css("background","url(/images/homepage_icon.png) -74px -240px no-repeat");
|
||||
},function(){
|
||||
$(this).css("background","url(/images/homepage_icon.png) 100px -624px no-repeat");
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
@ -103,17 +102,15 @@
|
|||
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<!-- link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" -->
|
||||
<a href = "javascript:void(0);" class = "homepageMenuText" onclick = "$('#PostDomain_<%= field.id %>').slideToggle();"><%= field.name %></a>
|
||||
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<% end %>
|
||||
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
|
||||
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepageLeftMenuCourses" id="PostDomain_<%= field.id %>" style="display:<%= field.sub_domains.count == 0 ? 'none' : '' %>">
|
||||
|
||||
<div class="<%= (field.sub_domains.count == 0) ? 'homepageLeftMenuCourses':'homepageLeftMenuCourses borderBottomNone' %>" id="PostDomain_<%= field.id %>" style="display:block;">
|
||||
<ul>
|
||||
<%= render :partial => 'organizations/org_subdomain',:locals => {:subdomains => field.sub_domains.reorder('priority').uniq, :org_subfield_id => field.id} %>
|
||||
<%= render :partial => 'organizations/org_subdomain',:locals => {:subdomains => field.sub_domains.reorder('priority').uniq.limit(5), :org_subfield_id => field.id, :page=>1, :org_id => organization.id } %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
<%= link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => org_subfield_id), :class => "coursesLineGrey hidden", :title => subdomain.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%# if subdomains.size == 5 %>
|
||||
<!--<li class="homepageLeftMenuMore" id="show_more_org_project">-->
|
||||
<!--<input type="hidden" value="<%#= page %>" id="org_project_page_num">-->
|
||||
<!--<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_project('<%#= more_org_projects_organization_path(org_id) %>');"></a>-->
|
||||
<!--</li>-->
|
||||
<%# end%>
|
||||
<% if subdomains.size == 5 %>
|
||||
<li class="homepageLeftMenuMore" id="show_more_org_submains">
|
||||
<input type="hidden" value="<%= page %>" id="org_submains_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_submain('<%= more_org_submains_organization_path(org_id, :org_subfield_id => org_subfield_id) %>');"></a>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
$("#show_more_org_submains").replaceWith("<%= escape_javascript( render :partial => 'organizations/org_subdomain',:locals => {:subdomains => @submains, :org_subfield_id => @org_subfield.id, :page=> @page, :org_id => @organization } )%>");
|
|
@ -45,10 +45,10 @@
|
|||
<div>
|
||||
<ul class="resource-banner">
|
||||
<li class="fl resource-switch">
|
||||
<a href="<%= user_resource_user_path(@user, :type => '6', :status => 6) %>" class="resource-tab resource-tab-active" id="public_resource_list" data-remote="true">公共资源</a>
|
||||
<a href="<%= user_resource_user_path(@user, :type => '1', :status => 6) %>" class="resource-tab resource-tab-active" id="my_resource_list" data-remote="true">我的资源</a>
|
||||
</li>
|
||||
<li class="fl resource-switch">
|
||||
<a href="<%= user_resource_user_path(@user, :type => '1', :status => 6) %>" class="resource-tab" id="my_resource_list" data-remote="true">我的资源</a>
|
||||
<a href="<%= user_resource_user_path(@user, :type => '6', :status => 6) %>" class="resource-tab" id="public_resource_list" data-remote="true">公共资源</a>
|
||||
</li>
|
||||
<!--<li class="fl resource-switch">-->
|
||||
<!--<a href="<%#= user_resource_user_path(@user, :type => '2', :status => 6) %>" class="resource-tab" id="private_resource_list" data-remote="true">申请资源</a>-->
|
||||
|
|
|
@ -188,6 +188,7 @@ zh:
|
|||
|
||||
|
||||
text_are_you_sure: 您确定要删除吗? #js 提示
|
||||
text_history_are_you_sure: 本资源有多个版本,你确定要全部删除吗?
|
||||
text_are_you_sure_out: 你确定要退出该班级吗?
|
||||
text_are_you_sure_out_group: 你确定要退出该分班吗?
|
||||
text_are_you_sure_all: 您确定要删除所有文件吗
|
||||
|
|
|
@ -73,6 +73,7 @@ RedmineApp::Application.routes.draw do
|
|||
put 'set_homepage'
|
||||
put 'cancel_homepage'
|
||||
get 'members'
|
||||
get 'more_org_submains'
|
||||
get 'more_org_projects'
|
||||
get 'more_org_courses'
|
||||
get 'search_courses'
|
||||
|
|
|
@ -34,6 +34,17 @@ function observeSearchfield(fieldId, targetId, url) {
|
|||
});
|
||||
}
|
||||
|
||||
//显示更多子栏目
|
||||
function show_more_org_submain(url){
|
||||
$.get(
|
||||
url,
|
||||
{ page: $("#org_submains_page_num").val() },
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
//显示更多的项目
|
||||
function show_more_org_project(url){
|
||||
$.get(
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
/* 模板弹框 20161013byLB */
|
||||
#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;}
|
||||
.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; }
|
||||
a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;}
|
||||
a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;}
|
||||
/*模板表格 20161013byLB*/
|
||||
.muban_table{ width:100%; background:#fff; border:1px solid #e5e5e5; border-bottom: none; }
|
||||
.muban_table thead tr{ height:40px; line-height:40px;}
|
||||
.muban_table thead tr th{ border-bottom:1px solid #e5e5e5;}
|
||||
.muban_table tbody tr:hover{ background:#f5f5f5;}
|
||||
.muban_table tbody tr th{ height:40px; line-height:40px; border-bottom:1px solid #e5e5e5; font-weight:normal; color:#888;}
|
||||
/*模板icons 20161013byLB*/
|
||||
.muban_icons_orange{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #ff4a1b;border: 1px solid #ff4a1b;}
|
||||
.muban_icons_blue{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #3b94d6;border: 1px solid #3b94d6;}
|
||||
/*模板buttons 20161013byLB*/
|
||||
.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
|
||||
.btn:hover{background: #c3c3c3; color: #333;}
|
||||
.btn-green{background: #60b25e; color: #fff;}
|
||||
.btn-green:hover{background: #51a74f; color: #fff;}
|
||||
.btn-blue{background: #3b94d6; color: #fff;}
|
||||
.btn-blue:hover{background: #2788d0; color: #fff;}
|
||||
.btn-orange{background:#ff7b33; color: #fff;}
|
||||
.btn-orange:hover{background:#ee4a1f; color: #fff;}
|
||||
.btn-line{display: inline-block;border:none; padding:0 10px;color: #333;background:#fff; border: 1px solid #d5d5d5; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
|
||||
.btn-line:hover{background:#eee; }
|
||||
.btn-line-green{border: 1px solid #51a74f; color: #51a74f;}
|
||||
.btn-line-green:hover{ background: #51a74f; color: #fff;}
|
||||
.btn-line-blue{border: 1px solid #2788d0; color: #2788d0;}
|
||||
.btn-line-blue:hover{ background: #2788d0; color: #fff;}
|
||||
.btn-line-orange{border: 1px solid #ee4a1f; color: #ee4a1f;}
|
||||
.btn-line-orange:hover{ background: #ee4a1f; color: #fff;}
|
||||
.btn-small{ padding: 0px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; color: #333;}
|
||||
.btn-small:hover{background-image:linear-gradient(#ededed, #dddddd);}
|
||||
.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;}
|
||||
.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
|
||||
/*模板a标签按钮 20161013byLB*/
|
||||
a.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
|
||||
a:hover.btn{background: #c3c3c3; color: #333;}
|
||||
a.btn-green{background: #60b25e; color: #fff;}
|
||||
a:hover.btn-green{background: #51a74f; color: #fff;}
|
||||
a.btn-blue{background: #3b94d6; color: #fff;}
|
||||
a:hover.btn-blue{background: #2788d0; color: #fff;}
|
||||
a.btn-orange{background:#ff7b33; color: #fff;}
|
||||
a:hover.btn-orange:hover{background:#ee4a1f; color: #fff;}
|
||||
a.btn-line{display: inline-block;border:none; padding:0 10px;color: #333;background:#fff; border: 1px solid #d5d5d5; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
|
||||
a:hover.btn-line{background:#eee; }
|
||||
a.btn-line-green{border: 1px solid #51a74f; color: #51a74f;}
|
||||
a:hover.btn-line-green{ background: #51a74f; color: #fff;}
|
||||
a.btn-line-blue{border: 1px solid #2788d0; color: #2788d0;}
|
||||
a:hover.btn-line-blue{ background: #2788d0; color: #fff;}
|
||||
a.btn-line-orange{border: 1px solid #ee4a1f; color: #ee4a1f;}
|
||||
a:hover.btn-line-orange{ background: #ee4a1f; color: #fff;}
|
||||
a.btn-small{ padding: 0px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; color: #333;}
|
||||
a:hover.btn-small{background-image:linear-gradient(#ededed, #dddddd);}
|
||||
a.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;}
|
||||
a:hover.sub_btn{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
|
||||
/*模板form 20161013byLB*/
|
||||
textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; color:#666; padding:5px;}
|
|
@ -660,3 +660,6 @@ a:hover.sy_btn_pink{ background: #e64c4c;}
|
|||
}
|
||||
|
||||
.sy_class_titbox{margin-bottom:5px; padding-top:10px; }
|
||||
|
||||
/*项目历史版本删除功能*/
|
||||
.popup_ziyuan_title{ display: block; margin-left: 10px; text-align: left;width:360px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
|
|
Loading…
Reference in New Issue