commit
27ad952c50
@ -1,9 +1,15 @@
|
||||
<%= error_messages_for @board %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p style="width:666;"><%= f.text_field :name, :required => true %></p><!--by young-->
|
||||
<p><%= f.text_field :description, :required => true, :size => 30 %></p><!--by young-->
|
||||
<p style="width:666;">
|
||||
<%= f.text_field :name, :required => true %>
|
||||
</p><!--by young-->
|
||||
<p>
|
||||
<%= f.text_field :description, :required => true, :size => 30 %>
|
||||
</p><!--by young-->
|
||||
<% if @board.valid_parents.any? %>
|
||||
<p><%= f.select :parent_id, boards_options_for_select(@board.valid_parents), :include_blank => true, :label => :field_board_parent %></p>
|
||||
<p>
|
||||
<%= f.select :parent_id, boards_options_for_select(@board.valid_parents), :include_blank => true, :label => :field_board_parent %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -1,18 +1,25 @@
|
||||
<!-- <h4><%= link_to h(document.title), document_path(document) %></h4>
|
||||
<p><em><%= format_time(document.updated_on) %></em></p>
|
||||
|
||||
<div class="wiki">
|
||||
<%= textilizable(truncate_lines(document.description), :object => document) %>
|
||||
</div> -->
|
||||
|
||||
<!--add by huang-->
|
||||
<table width="660px" align="center">
|
||||
<tr><td class="font_title_document"><%= link_to h(document.title), document_path(document) %></td></tr>
|
||||
<tr><td colspan="2">
|
||||
<tr>
|
||||
<td class="font_title_document">
|
||||
<%= link_to h(document.title), document_path(document) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="font_description">
|
||||
<%= textilizable(truncate_lines(document.description), :object => document) %>
|
||||
</div>
|
||||
</td></tr>
|
||||
<tr><td align="right"><p class="font_lighter"><%= format_time(document.updated_on) %></p></td></tr>
|
||||
<tr><td class="line_under"></td></tr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<p class="font_lighter">
|
||||
<%= format_time(document.updated_on) %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line_under"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -0,0 +1,249 @@
|
||||
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
|
||||
<% if @isproject %>
|
||||
<%= render :partial => 'project_file', locals: {project: @project} %>
|
||||
<% else %>
|
||||
<%= render :partial => 'course_file', locals: {course: @course} %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<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,13 +1,13 @@
|
||||
<% if @attachtype==0 && @contenttype=='0' %>
|
||||
<% if @project%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>');
|
||||
<% elsif @course%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "course_show_all_attachment")%>');
|
||||
<%end%>
|
||||
<% if @project%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>');
|
||||
<% elsif @course%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "course_show_all_attachment")%>');
|
||||
<%end%>
|
||||
<%else%>
|
||||
<% if @project%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "sort_by_attachtypel")%>')
|
||||
<% elsif @course%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "course_sort_by_attachtypel")%>')
|
||||
<%end%>;
|
||||
<% if @project%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "sort_by_attachtypel")%>')
|
||||
<% elsif @course%>
|
||||
$("#all_browse_div").html('<%= j(render partial: "course_sort_by_attachtypel")%>')
|
||||
<%end%>;
|
||||
<%end%>
|
||||
|
@ -1,48 +1,86 @@
|
||||
<script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function regexSubject()
|
||||
{
|
||||
var content = $.trim($("#message_subject").val());
|
||||
if(content.length ==0)
|
||||
{
|
||||
$("#subject_span").text("<%= l(:label_subject_empty) %>");
|
||||
$("#subject_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#subject_span").text("<%= l(:label_field_correct) %>");
|
||||
$("#subject_span").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function regexContent()
|
||||
{
|
||||
var content = $.trim($("#message_content").val());
|
||||
if(content.length ==0)
|
||||
{
|
||||
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
||||
$("#message_content_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
||||
$("#message_content_span").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<%= error_messages_for 'message' %>
|
||||
<% replying ||= false %>
|
||||
|
||||
<div class="box ph10_5">
|
||||
<!--[form:message]-->
|
||||
<% extra_option = replying ? { readonly: true} : { maxlength: 254 } %>
|
||||
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
|
||||
<p>
|
||||
<label for="message_subject">
|
||||
<%= l(:field_subject) %>
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<br/>
|
||||
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject" }.merge(extra_option) %>
|
||||
<% if replying %>
|
||||
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject" }.merge(extra_option) %>
|
||||
<% else %>
|
||||
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject", onblur: "regexSubject();" }.merge(extra_option) %>
|
||||
<% end %>
|
||||
<span id="subject_span"></span>
|
||||
</p>
|
||||
<p>
|
||||
<% unless replying %>
|
||||
<% if @message.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @message.safe_attribute? 'locked' %>
|
||||
<%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<%= f.check_box :locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<label for="message_subject"><%= l(:field_description) %>
|
||||
<span class="required"> * </span></label>
|
||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
<label for="message_subject">
|
||||
<%= l(:field_description) %>
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onblur => "regexContent();" %>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onblur => "regexContent();", :maxlength => 5000 %>
|
||||
<span id="message_content_span"></span>
|
||||
</p>
|
||||
|
||||
<!--[eoform:message]-->
|
||||
|
||||
<p>
|
||||
<%= l(:label_attachment_plural) %>
|
||||
<br />
|
||||
<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<%#= wikitoolbar_for 'message_content' %>
|
@ -1,28 +1,28 @@
|
||||
<%= javascript_tag do %>
|
||||
var operatorLabels = <%= raw_json Query.operators_labels %>;
|
||||
var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
|
||||
var availableFilters = <%= raw_json query.available_filters_as_json %>;
|
||||
var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
|
||||
var allProjects = <%= raw query.all_projects_values.to_json %>;
|
||||
$(document).ready(function(){
|
||||
initFilters();
|
||||
<% query.filters.each do |field, options| %>
|
||||
addFilter("<%= field %>", <%= raw_json query.operator_for(field) %>, <%= raw_json query.values_for(field) %>);
|
||||
<% end %>
|
||||
});
|
||||
var operatorLabels = <%= raw_json Query.operators_labels %>;
|
||||
var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
|
||||
var availableFilters = <%= raw_json query.available_filters_as_json %>;
|
||||
var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
|
||||
var allProjects = <%= raw query.all_projects_values.to_json %>;
|
||||
$(document).ready(function(){
|
||||
initFilters();
|
||||
<% query.filters.each do |field, options| %>
|
||||
addFilter("<%= field %>", <%= raw_json query.operator_for(field) %>, <%= raw_json query.values_for(field) %>);
|
||||
<% end %>
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table id="filters-table">
|
||||
</table>
|
||||
</td>
|
||||
<td class="add-filter">
|
||||
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
|
||||
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table id="filters-table">
|
||||
</table>
|
||||
</td>
|
||||
<td class="add-filter">
|
||||
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
|
||||
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%= hidden_field_tag 'f[]', '' %>
|
||||
<% include_calendar_headers_tags %>
|
||||
|
@ -1,14 +1,14 @@
|
||||
<% case show_flag%>
|
||||
<% when '1' then %>
|
||||
(<%= User.tagged_with("#{sg}").size %>)
|
||||
(<%= User.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||
<%when '2' then %>
|
||||
(<%= Project.tagged_with(sg).size %>)
|
||||
(<%= Project.tagged_with(sg.name,{},selected_tag_ids).size %>)
|
||||
<% when '3' then %>
|
||||
(<%= Issue.tagged_with("#{sg}").size %>)
|
||||
(<%= Issue.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||
<% when '4' then %>
|
||||
(<%= Bid.tagged_with("#{sg}").size %>)
|
||||
(<%= Bid.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||
<% when '5' then %>
|
||||
(<%= Forum.tagged_with("#{sg}").size %>)
|
||||
(<%= Forum.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||
<% when '6' then %>
|
||||
(<%= Attachment.tagged_with("#{sg}").size %>)
|
||||
(<%= Attachment.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||
<% end %>
|
||||
|
@ -1,6 +1,8 @@
|
||||
<h3><%=l(:label_version_new)%></h3>
|
||||
<h3>
|
||||
<%=l(:label_version_new)%>
|
||||
</h3>
|
||||
|
||||
<%= labelled_form_for @version, :url => project_versions_path(@project) do |f| %>
|
||||
<%= render :partial => 'versions/form', :locals => { :f => f } %>
|
||||
<%= render :partial => 'versions/form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<% end %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
<% id = "journal_reply_ul_" + journal.id.to_s%>
|
||||
<ul class="messages-for-user-reply" id = '<%= id %>' >
|
||||
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply} %>
|
||||
<% end %>
|
||||
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply} %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
Loading…
Reference in new issue