Merge branch 'sw_new_course' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course

This commit is contained in:
z9hang 2015-03-27 16:02:28 +08:00
commit acb01e452b
2 changed files with 33 additions and 29 deletions

View File

@ -1,4 +1,5 @@
<span id="attachments_fields" class="attachments_fields"> <div class="fl">
<span id="attachments_fields" class="attachments_fields">
<% if defined?(container) && container && container.saved_attachments %> <% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %> <% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>"> <span id="attachments_p<%= i %>">
@ -22,8 +23,8 @@
<% end %> <% end %>
<% end %> <% end %>
</span> </span>
<% project = project %> <% project = project %>
<span class="add_attachment" style="font-weight:normal;"> <span class="add_attachment" style="font-weight:normal;">
<%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn' %> <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn' %>
<%= file_field_tag 'attachments[dummy][file]', <%= file_field_tag 'attachments[dummy][file]',
:id => '_file', :id => '_file',
@ -49,8 +50,10 @@
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span> </span>
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %> <%= javascript_include_tag 'attachments' %>
<% end %> <% end %>
</div>

View File

@ -5,13 +5,14 @@
</li> </li>
<li class="ml45"> <li class="ml45">
<label class="fl" ><span class="c_red">*</span>&nbsp;<%= l(:field_description) %>&nbsp;&nbsp;</label> <label class="fl" ><span class="c_red">*</span>&nbsp;<%= l(:field_description) %>&nbsp;&nbsp;</label>
<textarea id="news_description" name="news[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="hwork_text fl" onkeyup="regexDescription();"><%= is_new ? '' : @news.description %></textarea> <textarea id="news_description" name="news[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="hwork_text fl" onkeyup="regexDescription();" maxlength="6000"><%= is_new ? '' : @news.description %></textarea>
<span id="description_notice_span" class="ml55"></span> <span id="description_notice_span" class="ml55"></span>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
<li class="ml45"> <li class="ml45">
<label>&nbsp;&nbsp;<%= l(:label_attachment_plural) %>&nbsp;&nbsp;</label> <label class="fl">&nbsp;&nbsp;<%= l(:label_attachment_plural) %>&nbsp;&nbsp;</label>
<%= render :partial => 'attachments/form', :locals => {:container => @news} %> <%= render :partial => 'attachments/new_form', :locals => {:container => @news} %>
<div class="cl"></div>
</li> </li>
<li class=" ml90" > <li class=" ml90" >
<% if is_new %> <% if is_new %>