添加修订附件
This commit is contained in:
parent
8d505b85bf
commit
fd51b02e16
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="fl">
|
||||||
|
<div class="cl"></div>
|
||||||
|
<span style="font-weight:normal;">
|
||||||
|
<a href="javascript:void(0);" class="blueCir ml5" onclick="$('#_file<%=work.id %>').click();">上传附件</a>
|
||||||
|
<%#= button_tag "上传附件", :type=>"button", :onclick=>"$('#_file#{work.id}').click();",:onmouseover => 'this.focus()',:class => 'blueCir ml5' %>
|
||||||
|
<%= file_field_tag 'attachments[dummy][file]',
|
||||||
|
:id => "_file#{work.id}",
|
||||||
|
:class => 'file_selector',
|
||||||
|
:multiple => true,
|
||||||
|
:onchange => "addReviseFiles(this, '#{work.id}');",
|
||||||
|
:style => 'display:none',
|
||||||
|
:data => {
|
||||||
|
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||||
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
|
:upload_path => uploads_path(:format => 'js'),
|
||||||
|
:description_placeholder => l(:label_optional_description),
|
||||||
|
:field_is_public => l(:field_is_public),
|
||||||
|
:are_you_sure => l(:text_are_you_sure),
|
||||||
|
:file_count => l(:label_file_count),
|
||||||
|
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||||
|
:delete_all_files => l(:text_are_you_sure_all),
|
||||||
|
:containerid => "#{work.id}"
|
||||||
|
} %>
|
||||||
|
</span>
|
||||||
|
<% content_for :header_tags do %>
|
||||||
|
<%= javascript_include_tag 'attachments' %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
|
@ -61,6 +61,31 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<!--<div class="resubAtt">
|
||||||
|
<span class="resubTitle">追加修订附件</span>
|
||||||
|
</div>
|
||||||
|
<div class="mt15">
|
||||||
|
<span class="tit_fb"> 追加附件:</span>
|
||||||
|
<a href="javascript:void(0);" class="link_file fl" >socket实验-123456-王强revise.zip</a>
|
||||||
|
<span id="attachments_fields<%= work.id%>" xmlns="http://www.w3.org/1999/html">
|
||||||
|
<span id="attachments_p<%= work.id %>">-->
|
||||||
|
<%#= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
|
||||||
|
<%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||||
|
<!--<span class="ispublic-label"><%#= l(:field_is_public)%>:</span>-->
|
||||||
|
<%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||||
|
<%#= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||||
|
<%#= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||||
|
<!--</span>
|
||||||
|
</span>
|
||||||
|
<span class="ml5">(123KB)</span><br />
|
||||||
|
<span class="tit_fb">追加时间:</span>2015-12-03 11:00 (此时其他同学作品尚未公开)
|
||||||
|
</div>
|
||||||
|
<div class="mt5">
|
||||||
|
<%#= render :partial => 'student_work/revise_attachments', :locals => {:work => work } %>
|
||||||
|
<a href="javascript:void(0);" class="blueCir ml5" title="请选择文件上传">上传附件</a>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>-->
|
||||||
|
|
||||||
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||||
<%student_work_scores.each do |student_score|%>
|
<%student_work_scores.each do |student_score|%>
|
||||||
<div id="work_score_<%= student_score.id%>">
|
<div id="work_score_<%= student_score.id%>">
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
# encoding: utf-8
|
||||||
|
class AddAttachmentType < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
Attachmentstype.create(typeId:3,typeName:'修订附件')
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20151202064455) do
|
ActiveRecord::Schema.define(:version => 20151203030635) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
|
|
@ -1192,3 +1192,8 @@ a:hover.memberBtn{background: url(/images/course/hwork_icon.png) -80px -90px no-
|
||||||
.addMemberCP {width:514px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; z-index:1000;}
|
.addMemberCP {width:514px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; z-index:1000;}
|
||||||
.rightArrow {margin:50px 15px 0px 15px; float:left;}
|
.rightArrow {margin:50px 15px 0px 15px; float:left;}
|
||||||
.relateText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight: bold;}
|
.relateText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight: bold;}
|
||||||
|
|
||||||
|
.resubAtt {border-top:1px solid #dddddd; position:relative; margin-top:15px;}
|
||||||
|
.resubTitle {position:absolute; top:-10px; left:5px; background-color:#ffffff; display:block; font-weight:bold; padding:0px 2px;}
|
||||||
|
a.blueCir{ display:inline-block; padding:2px 5px; background-color:#ffffff;border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||||
|
a:hover.blueCir{ background:#3598db; color:#fff;}
|
||||||
|
|
Loading…
Reference in New Issue