教学案例-添加标签的选择、显示

dev_bj
caishi 5 years ago
parent d4ff681b9a
commit b3c341c3e0

@ -12,7 +12,6 @@
</li> </li>
<span class="color-grey-c font-12 fl mt6">简明扼要介绍文档/视频所包含的主要的内容</span> <span class="color-grey-c font-12 fl mt6">简明扼要介绍文档/视频所包含的主要的内容</span>
</div> </div>
</div> </div>
<div class="padding30 bor-top-greyE"> <div class="padding30 bor-top-greyE">
<div class="clearfix"> <div class="clearfix">
@ -24,7 +23,13 @@
<p style="height:22px;line-height:22px;"><span class="color-red none" id="des_notice">请输入描述内容</span></p> <p style="height:22px;line-height:22px;"><span class="color-red none" id="des_notice">请输入描述内容</span></p>
</div> </div>
</div> </div>
<div class="clearfix mb20">
<span class="upload_Title">标签</span>
<ul class="fl libraries_tab">
<li>优秀案例</li>
<li>入库案例</li>
</ul>
</div>
<div style="padding-left: 62px"> <div style="padding-left: 62px">
<%= render partial: 'attachments/from_libraries', locals: { container: @library } %> <%= render partial: 'attachments/from_libraries', locals: { container: @library } %>
<p s <p s
@ -121,5 +126,13 @@
submitForm(); submitForm();
}); });
$('.submit-btn').on('click', submitForm); $('.submit-btn').on('click', submitForm);
$(".libraries_tab").on("click","li",function(){
if($(this).hasClass("active")){
$(this).removeClass("active")
}else{
$(this).addClass("active")
}
})
}); });
</script> </script>

@ -4,7 +4,11 @@
<li class="library_list_item"> <li class="library_list_item">
<%= link_to image_tag(url_to_avatar(library.user), width: 50, height: 50, class: 'radius mr15 mt3'), user_path(library.user) %> <%= link_to image_tag(url_to_avatar(library.user), width: 50, height: 50, class: 'radius mr15 mt3'), user_path(library.user) %>
<div class="flex1"> <div class="flex1">
<p class="task-hide font-16 mb15 lineh-20"><%= link_to library.title, library_path(library) %></p> <p class="clearfix mb15 lineh-20">
<%= link_to library.title, library_path(library),:class => "task-hide font-16 library_l_name" %>
<span class="edu-filter-btn edu-activity-blue fl cdefault ml10">入库案例</span>
<span class="edu-filter-btn edu-activity-red fl cdefault ml10">优秀案例</span>
</p>
<p class="clearfix lineh-20"> <p class="clearfix lineh-20">
<span class="color-grey-3 mr20"><%= link_to library.user.show_real_name, user_path(library.user) %></span> <span class="color-grey-3 mr20"><%= link_to library.user.show_real_name, user_path(library.user) %></span>
<span class="color-grey-c mr20"><%= library.visited_count || 0 %> 浏览</span> <span class="color-grey-c mr20"><%= library.visited_count || 0 %> 浏览</span>

@ -1,3 +1,8 @@
<style>
.markdown-body table td{
word-break: break-all;
}
</style>
<% <%
admin_or_self = admin_or_business? || @library.user_id == User.current.id admin_or_self = admin_or_business? || @library.user_id == User.current.id
%> %>
@ -7,7 +12,11 @@
<span class="color-grey-3">详情</span> <span class="color-grey-3">详情</span>
</p> </p>
<p class="lineh-25 mb20 clearfix"> <p class="lineh-25 mb20 clearfix">
<span class="font-22 fl mr10 task-hide" style="max-width: 800px"><%= @library.title %></span> <span class="font-22 fl mr10 task-hide" style="max-width: 800px">
<%= @library.title %>
</span>
<span class="edu-filter-btn edu-activity-blue fl cdefault mt3">入库案例</span>
<span class="edu-filter-btn edu-activity-red fl cdefault mt3">优秀案例</span>
<% if admin_or_self %> <% if admin_or_self %>
<% if @library.pending? %> <% if @library.pending? %>
<span class="fl edu-filter-btn edu-activity-green mt5">草稿</span> <span class="fl edu-filter-btn edu-activity-green mt5">草稿</span>
@ -40,20 +49,19 @@
</div> </div>
<% end %> <% end %>
<div class="padding30"> <div class="padding30">
<p class="mb10 clearfix">
<span class="color-grey-6 font-16 mr10">详情</span>
<% if admin_or_business? || @library.user_id == User.current.id && @library.pending? %>
<%= link_to '删除', 'javascript:void(0);', data: { id: @library.id },
class: 'white-btn edu-blueline-btn fr ml20 delete-btn' %>
<% end %>
<% if admin_or_self %>
<%= link_to '编辑', edit_library_path(id: @library.id), class: 'white-btn edu-blueline-btn fr' %>
<% end %>
</p>
<div class="df"> <div class="df">
<%= link_to image_tag(url_to_avatar(@library.user), width: 50, height: 50, class: 'radius mr15 mt3'), user_path(@library.user) %> <%= link_to image_tag(url_to_avatar(@library.user), width: 50, height: 50, class: 'radius mr15 mt3'), user_path(@library.user) %>
<div class="flex1"> <div class="flex1">
<li class="font-16"><%= @library.user.show_real_name %></li> <li class="clearfix">
<span class="font-16 fl"><%= @library.user.show_real_name %></span>
<% if admin_or_business? || @library.user_id == User.current.id && @library.pending? %>
<%= link_to '删除', 'javascript:void(0);', data: { id: @library.id },
class: 'white-btn edu-blueline-btn fr ml20 delete-btn' %>
<% end %>
<% if admin_or_self %>
<%= link_to '编辑', edit_library_path(id: @library.id), class: 'white-btn edu-blueline-btn fr' %>
<% end %>
</li>
<li class="clearfix"> <li class="clearfix">
<span class="fl color-grey-9 mr20"><%= @library.user.school_name %></span> <span class="fl color-grey-9 mr20"><%= @library.user.school_name %></span>
<span class="fl color-grey-9"><%= @library.user.identity %></span> <span class="fl color-grey-9"><%= @library.user.identity %></span>

@ -3467,6 +3467,7 @@ line-height: 16px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
.library_list_item{ .library_list_item{
background: #fff;padding:30px;margin-bottom: 15px;display: flex; background: #fff;padding:30px;margin-bottom: 15px;display: flex;
} }
.library_list_item .library_l_name{max-width: 900px;float: left;}
.upload_Title{ .upload_Title{
position: relative;margin-right: 30px;float: left;line-height: 35px;font-size: 16px;width: 32px; position: relative;margin-right: 30px;float: left;line-height: 35px;font-size: 16px;width: 32px;
} }
@ -3477,6 +3478,11 @@ line-height: 16px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
width: 100%;background: #F2F9FF;justify-content: center;align-items: center;display: -webkit-flex;text-align: center; width: 100%;background: #F2F9FF;justify-content: center;align-items: center;display: -webkit-flex;text-align: center;
height: 120px;border-radius: 4px;border:1px dashed #4cacff; height: 120px;border-radius: 4px;border:1px dashed #4cacff;
} }
.libraries_tab li{
width: 120px;height: 35px;line-height: 35px;border-radius:18px;border:1px solid #4C98FF;color: #4C98FF;cursor: pointer;
margin-right: 30px;float: left;text-align: center;
}
.libraries_tab li.active{background:#4C98FF;color: #fff; }
.private_reason{overflow: hidden;max-height:163px;} .private_reason{overflow: hidden;max-height:163px;}
.private_reason li{margin-bottom: 10px;} .private_reason li{margin-bottom: 10px;}
.successPage{ .successPage{

@ -763,6 +763,7 @@ html>body #ajax-indicator { position: fixed; }
.edu-activity-grey{background-color:#747A7F;color:#fff!important;cursor: pointer;border: 1px solid #747A7F;}/*匿评作品*/ .edu-activity-grey{background-color:#747A7F;color:#fff!important;cursor: pointer;border: 1px solid #747A7F;}/*匿评作品*/
.edu-activity-green{background-color:#29BD8B;color:#fff!important;cursor: pointer;border: 1px solid #29BD8B;}/*查看作品、查看实战、查看答题*/ .edu-activity-green{background-color:#29BD8B;color:#fff!important;cursor: pointer;border: 1px solid #29BD8B;}/*查看作品、查看实战、查看答题*/
.edu-activity-light-grey{background-color:#cbcbcb;color:#fff!important;cursor: pointer;border: 1px solid #cbcbcb;}/*取消关联*/ .edu-activity-light-grey{background-color:#cbcbcb;color:#fff!important;cursor: pointer;border: 1px solid #cbcbcb;}/*取消关联*/
.edu-activity-red{background-color:#FC2B6A;color:#fff!important;cursor: pointer;border: 1px solid #FC2B6A;}
/*课堂设置页面*/ /*课堂设置页面*/
.course-ul-nav{width: 100%;border-bottom: 1px solid #EBEBEB;} .course-ul-nav{width: 100%;border-bottom: 1px solid #EBEBEB;}
.course-ul-nav a{display: inline-block;padding: 20px;font-size: 18px;text-align: center;width: 94px;position: relative} .course-ul-nav a{display: inline-block;padding: 20px;font-size: 18px;text-align: center;width: 94px;position: relative}

Loading…
Cancel
Save