From beb55ac95d962dafc5a3e1e8c7c71c9779e6057f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 17 Jul 2019 14:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 4 +- app/views/libraries/_form.html.erb | 75 ++++++++++++++++++++---- public/stylesheets/educoder/edu-main.css | 25 ++++++++ 3 files changed, 92 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index d89f9a24..ac45f360 100644 --- a/Gemfile +++ b/Gemfile @@ -64,8 +64,8 @@ gem 'elasticsearch-rails' gem 'oauth2' # xlsx -gem 'axlsx', '3.0.0.pre' -gem 'axlsx_rails', '0.3.0' +# gem 'axlsx', '3.0.0.pre' +# gem 'axlsx_rails', '0.3.0' # state machine gem 'aasm' diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb index e1e6aa0b..5b9506b5 100644 --- a/app/views/libraries/_form.html.erb +++ b/app/views/libraries/_form.html.erb @@ -6,6 +6,8 @@ <%= hidden_field_tag :tag_ids, tag_ids.join(',') %>
+ +
标题
  • @@ -14,8 +16,28 @@
  • 简明扼要介绍文档/视频所包含的主要的内容
    -
    -
    + +
    + 作者 +
  • + +

    请输入姓名

    +
  • +
  • + +

    请输入作者单位名称

    +
  • +
    + +
    + 标签 +
      + <% LibraryTag.where(nil).each do |tag| %> +
    • <%= tag.name %>
    • + <% end %> +
    +
    +
    描述
    @@ -25,18 +47,51 @@

    请输入描述内容

    -
    - 标签 -
      - <% LibraryTag.where(nil).each do |tag| %> -
    • <%= tag.name %>
    • - <% end %> -
    -
    + + + + + <%# LibraryTag.where(nil).each do |tag| %> + + <%# end %> + +
    <%= render partial: 'attachments/from_libraries', locals: { container: @library } %>

    请上传附件

    + + +
    + 封面图 (上传尺寸:120*90 px) + <% if File.exist?(disk_filename("Career", career.id)) %> + <%= image_tag(url_to_avatar(career), :class => "w120 h90 ml5 shixun_image_show", :id => "shixun_image_show_#{career.id}") %> + <% else %> + + <% end %> + <%= file_field_tag 'avatar[image]', + :id => "upload_img_#{career.id}", + :style => 'display:none;', + :size => "1", + :multiple => false, + :onchange => 'addInputAvatar(this);', + :data => { + :max_file_size => Setting.authentication_img_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_user_auth_too_big, :max_size => number_to_human_size(Setting.authentication_img_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :file_type => Redmine::Configuration['pic_types'].to_s, + :type_support_message => l(:error_pic_type), + :upload_path => upload_avatar_path(:format => 'js'), + :description_placeholder => nil ,# l(:label_optional_description) + :source_type => "Career", + :source_id => career.id, + :is_direct => 1 + } %> + + <%= File.exist?(disk_filename("Career", career.id)) ? "重新上传" : "上传图片" %> + + +
  • 审核说明
  • diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index 7059dea9..0e21cf82 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -1179,4 +1179,29 @@ html>body #ajax-indicator { position: fixed; } right: 0; bottom: 30px; z-index: 10; +} + +.winput150{ + width:150px; +} + + +.upload_Titles{ + position: relative; + margin-right: 30px; + float: left; + line-height: 35px; + font-size: 16px; + width: 50px; +} + +.lineheight34{ + line-height: 35px; +} + +.w120{ + width:120px; +} +.h90{ + width:90px; } \ No newline at end of file