parent
59e7f2f28b
commit
beac15475d
@ -0,0 +1,250 @@
|
|||||||
|
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
|
||||||
|
<div id="resource_list">
|
||||||
|
<% if @isproject %>
|
||||||
|
<%= render :partial => 'project_file', locals: {project: @project} %>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => 'course_file', locals: {course: @course} %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript'>
|
||||||
|
var slideHeight = 29;
|
||||||
|
function readmore(aNode) {
|
||||||
|
// console.log(aNode)
|
||||||
|
// var $td_tags_area = $(aNode).parent().parent();
|
||||||
|
var $td_tags_area = $(aNode).parent().parent().parent().parent();
|
||||||
|
var $tags_area = $td_tags_area.find('.tags_area')
|
||||||
|
var $tags_gradint = $td_tags_area.find('.tags_gradint')
|
||||||
|
var $read_more = $td_tags_area.find('.read-more')
|
||||||
|
var $read_more_a = $td_tags_area.find('.read-more a')
|
||||||
|
var $tags = $td_tags_area.find('#tags')
|
||||||
|
var $icona = $td_tags_area.find('.tags_icona')
|
||||||
|
|
||||||
|
var slideHeight = 13; //px
|
||||||
|
var defHeight = $tags.height();
|
||||||
|
|
||||||
|
var curHeight = $tags_area.height();
|
||||||
|
if (curHeight == slideHeight) {
|
||||||
|
$tags_area.animate({
|
||||||
|
height: defHeight
|
||||||
|
}, 'normal');
|
||||||
|
$read_more_a.html('隐藏');
|
||||||
|
$icona.html('<%=image_tag "/images/sidebar/minus.png"%>')
|
||||||
|
$tags_gradint.fadeOut();
|
||||||
|
} else {
|
||||||
|
$tags_area.animate({
|
||||||
|
height: slideHeight
|
||||||
|
}, 'normal');
|
||||||
|
$read_more_a.html('更多');
|
||||||
|
$icona.html('<%=image_tag "/images/sidebar/add.png"%>')
|
||||||
|
$tags_gradint.fadeIn();
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
}
|
||||||
|
$(function () {
|
||||||
|
var slideHeight = 20; //px
|
||||||
|
var defHeight = $('.tags_area').height();
|
||||||
|
if (defHeight >= slideHeight) {
|
||||||
|
$('.tags_area').css('height', slideHeight + 'px');
|
||||||
|
}
|
||||||
|
;
|
||||||
|
});
|
||||||
|
|
||||||
|
function eval_ajax(xhr, textStatus) {
|
||||||
|
if (textStatus == 'success') {
|
||||||
|
eval(xhr.responseText);
|
||||||
|
} else if (textStatus == 'error') {
|
||||||
|
alert('error');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function attachment_contenttypes_searchex(value) {
|
||||||
|
<% if @project%>
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: $('#attachment_browse').val(),
|
||||||
|
contentType: encodeURIComponent(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(eval_ajax);
|
||||||
|
<%end%>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function attachtype_edit(value) {
|
||||||
|
<% if @project%>
|
||||||
|
$.ajax({
|
||||||
|
|
||||||
|
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: $('#attachment_browse').val(),
|
||||||
|
contentType: encodeURIComponent(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(eval_ajax);
|
||||||
|
<%end%>
|
||||||
|
}
|
||||||
|
|
||||||
|
function attachmenttypes_searchex(value) {
|
||||||
|
<% if @project%>
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: encodeURIComponent(value),
|
||||||
|
contentType: $('#attach_sufix_browse').val()
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(eval_ajax);
|
||||||
|
<%end%>
|
||||||
|
}
|
||||||
|
|
||||||
|
function course_attachmenttypes_searchex(value) {
|
||||||
|
<% if @course%>
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: encodeURIComponent(value),
|
||||||
|
contentType: $('#attach_sufix_browse').val()
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(eval_ajax);
|
||||||
|
<%end%>
|
||||||
|
}
|
||||||
|
|
||||||
|
function course_attachment_contenttypes_searchex(value) {
|
||||||
|
<% if @course%>
|
||||||
|
$.ajax({
|
||||||
|
|
||||||
|
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: $('#attachment_browse').val(),
|
||||||
|
contentType: encodeURIComponent(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(eval_ajax);
|
||||||
|
<%end%>
|
||||||
|
}
|
||||||
|
function course_attachtype_edit(value) {
|
||||||
|
<% if @course%>
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: $('#attachment_browse').val(),
|
||||||
|
contentType: encodeURIComponent(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(eval_ajax);
|
||||||
|
<%end%>
|
||||||
|
}
|
||||||
|
|
||||||
|
function attachmenttypes_change(id, type) {
|
||||||
|
<% if @project%>
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=updateType_attachments_path%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
attachmentid: encodeURIComponent(id),
|
||||||
|
newtype: encodeURIComponent(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(function (xhr, textStatus) {
|
||||||
|
|
||||||
|
if (textStatus == 'success') {
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: $('#attachment_browse').val(),
|
||||||
|
contentType: $('#attach_sufix_browse').val()
|
||||||
|
}
|
||||||
|
}).error(function () {
|
||||||
|
alert('error');
|
||||||
|
});
|
||||||
|
} else if (textStatus == 'error') {
|
||||||
|
alert('An error has occurred');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
<%end%>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function course_attachmenttypes_change(id, type) {
|
||||||
|
<% if @course%>
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=updateType_attachments_path%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
attachmentid: encodeURIComponent(id),
|
||||||
|
newtype: encodeURIComponent(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(function (xhr, textStatus) {
|
||||||
|
|
||||||
|
if (textStatus == 'success') {
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
type: $('#attachment_browse').val(),
|
||||||
|
contentType: $('#attach_sufix_browse').val()
|
||||||
|
}
|
||||||
|
}).error(function () {
|
||||||
|
alert('error');
|
||||||
|
});
|
||||||
|
} else if (textStatus == 'error') {
|
||||||
|
alert('An error has occurred');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
<%end%>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑文件密级
|
||||||
|
function file_dense_edit(id, type) {
|
||||||
|
$.ajax({
|
||||||
|
url: '<%=updateFileDense_attachments_path%>',
|
||||||
|
type: "POST",
|
||||||
|
remote:"true",
|
||||||
|
data: {
|
||||||
|
attachmentid: encodeURIComponent(id),
|
||||||
|
newtype: encodeURIComponent(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).complete(function (xhr, textStatus) {
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type='text/javascript'>
|
||||||
|
function tagAddClick(divid, objId, objTag) {
|
||||||
|
alert("OK");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: '/users/tag_saveEx',
|
||||||
|
data: {
|
||||||
|
tagname: $('tag_name').value,
|
||||||
|
obj_id: encodeURIComponent(objId),
|
||||||
|
obj_flag: encodeURIComponent(objTag)
|
||||||
|
},
|
||||||
|
success: function (data, textStatus) {
|
||||||
|
alert("OK");
|
||||||
|
$(divid).empty();
|
||||||
|
$(divid).html('123');
|
||||||
|
$("#" + divid + " #name").val("");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,250 +1 @@
|
|||||||
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
|
<%= render :partial => 'files/newfile_index' %>
|
||||||
<div id="resource_list">
|
|
||||||
<% if @isproject %>
|
|
||||||
<%= render :partial => 'project_file', locals: {project: @project} %>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => 'course_file', locals: {course: @course} %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type='text/javascript'>
|
|
||||||
var slideHeight = 29;
|
|
||||||
function readmore(aNode) {
|
|
||||||
// console.log(aNode)
|
|
||||||
// var $td_tags_area = $(aNode).parent().parent();
|
|
||||||
var $td_tags_area = $(aNode).parent().parent().parent().parent();
|
|
||||||
var $tags_area = $td_tags_area.find('.tags_area')
|
|
||||||
var $tags_gradint = $td_tags_area.find('.tags_gradint')
|
|
||||||
var $read_more = $td_tags_area.find('.read-more')
|
|
||||||
var $read_more_a = $td_tags_area.find('.read-more a')
|
|
||||||
var $tags = $td_tags_area.find('#tags')
|
|
||||||
var $icona = $td_tags_area.find('.tags_icona')
|
|
||||||
|
|
||||||
var slideHeight = 13; //px
|
|
||||||
var defHeight = $tags.height();
|
|
||||||
|
|
||||||
var curHeight = $tags_area.height();
|
|
||||||
if (curHeight == slideHeight) {
|
|
||||||
$tags_area.animate({
|
|
||||||
height: defHeight
|
|
||||||
}, 'normal');
|
|
||||||
$read_more_a.html('隐藏');
|
|
||||||
$icona.html('<%=image_tag "/images/sidebar/minus.png"%>')
|
|
||||||
$tags_gradint.fadeOut();
|
|
||||||
} else {
|
|
||||||
$tags_area.animate({
|
|
||||||
height: slideHeight
|
|
||||||
}, 'normal');
|
|
||||||
$read_more_a.html('更多');
|
|
||||||
$icona.html('<%=image_tag "/images/sidebar/add.png"%>')
|
|
||||||
$tags_gradint.fadeIn();
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
}
|
|
||||||
$(function () {
|
|
||||||
var slideHeight = 20; //px
|
|
||||||
var defHeight = $('.tags_area').height();
|
|
||||||
if (defHeight >= slideHeight) {
|
|
||||||
$('.tags_area').css('height', slideHeight + 'px');
|
|
||||||
}
|
|
||||||
;
|
|
||||||
});
|
|
||||||
|
|
||||||
function eval_ajax(xhr, textStatus) {
|
|
||||||
if (textStatus == 'success') {
|
|
||||||
eval(xhr.responseText);
|
|
||||||
} else if (textStatus == 'error') {
|
|
||||||
alert('error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function attachment_contenttypes_searchex(value) {
|
|
||||||
<% if @project%>
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: $('#attachment_browse').val(),
|
|
||||||
contentType: encodeURIComponent(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(eval_ajax);
|
|
||||||
<%end%>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function attachtype_edit(value) {
|
|
||||||
<% if @project%>
|
|
||||||
$.ajax({
|
|
||||||
|
|
||||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: $('#attachment_browse').val(),
|
|
||||||
contentType: encodeURIComponent(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(eval_ajax);
|
|
||||||
<%end%>
|
|
||||||
}
|
|
||||||
|
|
||||||
function attachmenttypes_searchex(value) {
|
|
||||||
<% if @project%>
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: encodeURIComponent(value),
|
|
||||||
contentType: $('#attach_sufix_browse').val()
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(eval_ajax);
|
|
||||||
<%end%>
|
|
||||||
}
|
|
||||||
|
|
||||||
function course_attachmenttypes_searchex(value) {
|
|
||||||
<% if @course%>
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: encodeURIComponent(value),
|
|
||||||
contentType: $('#attach_sufix_browse').val()
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(eval_ajax);
|
|
||||||
<%end%>
|
|
||||||
}
|
|
||||||
|
|
||||||
function course_attachment_contenttypes_searchex(value) {
|
|
||||||
<% if @course%>
|
|
||||||
$.ajax({
|
|
||||||
|
|
||||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: $('#attachment_browse').val(),
|
|
||||||
contentType: encodeURIComponent(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(eval_ajax);
|
|
||||||
<%end%>
|
|
||||||
}
|
|
||||||
function course_attachtype_edit(value) {
|
|
||||||
<% if @course%>
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: $('#attachment_browse').val(),
|
|
||||||
contentType: encodeURIComponent(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(eval_ajax);
|
|
||||||
<%end%>
|
|
||||||
}
|
|
||||||
|
|
||||||
function attachmenttypes_change(id, type) {
|
|
||||||
<% if @project%>
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=updateType_attachments_path%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
attachmentid: encodeURIComponent(id),
|
|
||||||
newtype: encodeURIComponent(type)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(function (xhr, textStatus) {
|
|
||||||
|
|
||||||
if (textStatus == 'success') {
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: $('#attachment_browse').val(),
|
|
||||||
contentType: $('#attach_sufix_browse').val()
|
|
||||||
}
|
|
||||||
}).error(function () {
|
|
||||||
alert('error');
|
|
||||||
});
|
|
||||||
} else if (textStatus == 'error') {
|
|
||||||
alert('An error has occurred');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
<%end%>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function course_attachmenttypes_change(id, type) {
|
|
||||||
<% if @course%>
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=updateType_attachments_path%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
attachmentid: encodeURIComponent(id),
|
|
||||||
newtype: encodeURIComponent(type)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(function (xhr, textStatus) {
|
|
||||||
|
|
||||||
if (textStatus == 'success') {
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
type: $('#attachment_browse').val(),
|
|
||||||
contentType: $('#attach_sufix_browse').val()
|
|
||||||
}
|
|
||||||
}).error(function () {
|
|
||||||
alert('error');
|
|
||||||
});
|
|
||||||
} else if (textStatus == 'error') {
|
|
||||||
alert('An error has occurred');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
<%end%>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 编辑文件密级
|
|
||||||
function file_dense_edit(id, type) {
|
|
||||||
$.ajax({
|
|
||||||
url: '<%=updateFileDense_attachments_path%>',
|
|
||||||
type: "POST",
|
|
||||||
remote:"true",
|
|
||||||
data: {
|
|
||||||
attachmentid: encodeURIComponent(id),
|
|
||||||
newtype: encodeURIComponent(type)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).complete(function (xhr, textStatus) {
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script type='text/javascript'>
|
|
||||||
function tagAddClick(divid, objId, objTag) {
|
|
||||||
alert("OK");
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: '/users/tag_saveEx',
|
|
||||||
data: {
|
|
||||||
tagname: $('tag_name').value,
|
|
||||||
obj_id: encodeURIComponent(objId),
|
|
||||||
obj_flag: encodeURIComponent(objTag)
|
|
||||||
},
|
|
||||||
success: function (data, textStatus) {
|
|
||||||
alert("OK");
|
|
||||||
$(divid).empty();
|
|
||||||
$(divid).html('123');
|
|
||||||
$("#" + divid + " #name").val("");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -0,0 +1,2 @@
|
|||||||
|
alert("eeee");
|
||||||
|
$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>');
|
@ -0,0 +1,137 @@
|
|||||||
|
<div class="project_r_h">
|
||||||
|
<h2 class="project_h2">问题跟踪</h2>
|
||||||
|
</div>
|
||||||
|
<div class="problem_top">
|
||||||
|
<% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %>
|
||||||
|
<span>
|
||||||
|
<%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
|
||||||
|
:html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
|
||||||
|
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
||||||
|
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<span class="problem_p fr">问题总数:<span>100</span> 未解决:<span>20</span></span>
|
||||||
|
</div>
|
||||||
|
<div class="contextual">
|
||||||
|
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||||
|
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
|
||||||
|
<%= delete_link query_path(@query) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||||
|
<div style="clear:right; ">
|
||||||
|
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
|
||||||
|
<%= hidden_field_tag 'set_filter', '1' %>
|
||||||
|
|
||||||
|
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
|
||||||
|
<span>---<%= l :label_query_new %>---</span>
|
||||||
|
|
||||||
|
<div id="query_form_content" class="hide-when-print">
|
||||||
|
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||||
|
<legend onclick="toggleFieldset(this);">
|
||||||
|
<%= l(:label_issue_query_condition) %>
|
||||||
|
</legend>
|
||||||
|
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
||||||
|
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<!--
|
||||||
|
<fieldset class="collapsible collapsed">
|
||||||
|
<legend onclick="toggleFieldset(this);">
|
||||||
|
<%= l(:label_options) %>
|
||||||
|
</legend>
|
||||||
|
<div style="display: none;">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><%= l(:field_column_names) %></td>
|
||||||
|
<td><%= render_query_columns_selection(@query) %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
|
||||||
|
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><%= l(:button_show) %></td>
|
||||||
|
<td><%= available_block_columns_tags(@query) %></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
-->
|
||||||
|
<div class="buttons hide-when-print">
|
||||||
|
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
||||||
|
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= error_messages_for 'query' %>
|
||||||
|
|
||||||
|
<% if @query.valid? %>
|
||||||
|
<% if @issues.empty? %>
|
||||||
|
<p class="nodata">
|
||||||
|
<%= l(:label_no_data) %>
|
||||||
|
</p>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
|
||||||
|
<div class="pagination">
|
||||||
|
<ul><%= pagination_links_full @issue_pages, @issue_count %></ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div style="float: right; padding-top: 30px">
|
||||||
|
<% other_formats_links do |f| %>
|
||||||
|
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
|
||||||
|
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
|
||||||
|
<%= f.link_to 'PDF', :url => params %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="csv-export-options" style="display:none;">
|
||||||
|
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||||
|
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
|
||||||
|
<p>
|
||||||
|
<label>
|
||||||
|
<%= radio_button_tag 'columns', 'all' %>
|
||||||
|
<%= l(:description_all_columns) %>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<label>
|
||||||
|
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
|
||||||
|
<%= l(:field_description) %>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="buttons">
|
||||||
|
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||||
|
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
|
||||||
|
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<%= render :partial => 'issues/sidebar' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :header_tags do %>
|
||||||
|
<%= auto_discovery_link_tag(:atom,
|
||||||
|
{:query_id => @query, :format => 'atom',
|
||||||
|
:page => nil, :key => User.current.rss_key},
|
||||||
|
:title => l(:label_issue_plural)) %>
|
||||||
|
<%= auto_discovery_link_tag(:atom,
|
||||||
|
{:controller => 'journals', :action => 'index',
|
||||||
|
:query_id => @query, :format => 'atom',
|
||||||
|
:page => nil, :key => User.current.rss_key},
|
||||||
|
:title => l(:label_changes_details)) %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= context_menu issues_context_menu_path %>
|
@ -1,135 +1 @@
|
|||||||
<div class="content-title-top">
|
<%= render :partial => 'issues/newissue_index' %>
|
||||||
<% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %>
|
|
||||||
<div>
|
|
||||||
<%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
|
|
||||||
:html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
|
|
||||||
|
|
||||||
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
|
||||||
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="contextual">
|
|
||||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
|
||||||
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
|
|
||||||
<%= delete_link query_path(@query) %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
|
||||||
<div style="clear:right; ">
|
|
||||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
|
|
||||||
<%= hidden_field_tag 'set_filter', '1' %>
|
|
||||||
|
|
||||||
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
|
|
||||||
<span>---<%= l :label_query_new %>---</span>
|
|
||||||
|
|
||||||
<div id="query_form_content" class="hide-when-print">
|
|
||||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
|
||||||
<legend onclick="toggleFieldset(this);">
|
|
||||||
<%= l(:label_issue_query_condition) %>
|
|
||||||
</legend>
|
|
||||||
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
|
||||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<!--
|
|
||||||
<fieldset class="collapsible collapsed">
|
|
||||||
<legend onclick="toggleFieldset(this);">
|
|
||||||
<%= l(:label_options) %>
|
|
||||||
</legend>
|
|
||||||
<div style="display: none;">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td><%= l(:field_column_names) %></td>
|
|
||||||
<td><%= render_query_columns_selection(@query) %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
|
|
||||||
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><%= l(:button_show) %></td>
|
|
||||||
<td><%= available_block_columns_tags(@query) %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
-->
|
|
||||||
<div class="buttons hide-when-print">
|
|
||||||
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
|
||||||
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= error_messages_for 'query' %>
|
|
||||||
|
|
||||||
<% if @query.valid? %>
|
|
||||||
<% if @issues.empty? %>
|
|
||||||
<p class="nodata">
|
|
||||||
<%= l(:label_no_data) %>
|
|
||||||
</p>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
|
|
||||||
<div class="pagination">
|
|
||||||
<ul><%= pagination_links_full @issue_pages, @issue_count %></ul>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<div style="float: right; padding-top: 30px">
|
|
||||||
<% other_formats_links do |f| %>
|
|
||||||
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
|
|
||||||
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
|
|
||||||
<%= f.link_to 'PDF', :url => params %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="csv-export-options" style="display:none;">
|
|
||||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
|
||||||
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
|
|
||||||
<p>
|
|
||||||
<label>
|
|
||||||
<%= radio_button_tag 'columns', 'all' %>
|
|
||||||
<%= l(:description_all_columns) %>
|
|
||||||
</label>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<label>
|
|
||||||
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
|
|
||||||
<%= l(:field_description) %>
|
|
||||||
</label>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="buttons">
|
|
||||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
|
||||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
|
|
||||||
|
|
||||||
<% content_for :sidebar do %>
|
|
||||||
<%= render :partial => 'issues/sidebar' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
|
||||||
<%= auto_discovery_link_tag(:atom,
|
|
||||||
{:query_id => @query, :format => 'atom',
|
|
||||||
:page => nil, :key => User.current.rss_key},
|
|
||||||
:title => l(:label_issue_plural)) %>
|
|
||||||
<%= auto_discovery_link_tag(:atom,
|
|
||||||
{:controller => 'journals', :action => 'index',
|
|
||||||
:query_id => @query, :format => 'atom',
|
|
||||||
:page => nil, :key => User.current.rss_key},
|
|
||||||
:title => l(:label_changes_details)) %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= context_menu issues_context_menu_path %>
|
|
@ -0,0 +1 @@
|
|||||||
|
$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>');
|
@ -1,22 +1,16 @@
|
|||||||
<div style="margin-left: 20px;">
|
<div class="pr_info_join fl">
|
||||||
|
<!--关注项目-->
|
||||||
<% if ( !(User.current.member_of? @project) && User.current.login?) %> <!--added by linchun-->
|
<% if ( !(User.current.member_of? @project) && User.current.login?) %> <!--added by linchun-->
|
||||||
<span class="icon-fav icon"></span><%= watcher_link(@project, User.current) %>
|
<span><%= watcher_link(@project, User.current) %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
<!--加入项目 -->
|
||||||
<!--添加项目申请-->
|
|
||||||
<div style="margin-left: 20px;">
|
|
||||||
<% if ( !(User.current.member_of? @project) && User.current.login?) %>
|
<% if ( !(User.current.member_of? @project) && User.current.login?) %>
|
||||||
<span class="icon-fav icon"></span>
|
|
||||||
<%= applied_link(@project, User.current) %>
|
<%= applied_link(@project, User.current) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
<!--退出项目-->
|
||||||
|
<% if ((User.current.member_of? @project) &&
|
||||||
<!--添加退出项目-->
|
User.current.login? &&
|
||||||
<div style="margin-left: 20px;">
|
Member.where(:user_id => User.current.id, :project_id=>@project.id).first.roles.first.to_s != "Manager") %>
|
||||||
<% if ((User.current.member_of? @project) &&
|
|
||||||
User.current.login? &&
|
|
||||||
Member.where(:user_id => User.current.id, :project_id=>@project.id).first.roles.first.to_s != "Manager") %>
|
|
||||||
<%= exit_project_link(@project) %>
|
<%= exit_project_link(@project) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
$('#content').html('<%= escape_javascript(render :partial => 'projects/newproject_show') %>');
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.5 KiB |
Loading…
Reference in new issue