班级各模块在没有数据显示时,显示的黄色框体提示更换成图片形式:成员列表、通知列表

This commit is contained in:
cxt 2017-01-17 09:54:54 +08:00
parent d33977ce4f
commit 8a0833e6cd
5 changed files with 6 additions and 187 deletions

View File

@ -1,118 +0,0 @@
<div style="margin-left: 15px">
<% if User.current.logged? && User.current.member_of_course?(@course) && @group %>
<%= join_in_course_group(@course.course_groups,@group, User.current) unless @canShowCode %>
<span style="font-size: 12px; float: left; margin-right: 5px">
<%= l(:label_current_group)%>:&nbsp;
<%= @group.name %>
</span>
<% end %>
</div>
<div class="cl"></div>
<% if members.any? %>
<% if @result_count %>
<p style="font-size: 18px;">
<%= l(:label_search_member_count) %>
<%= @result_count %>
<%= l(:label_member_people) %>
</p>
<% end %>
<div class="cl"></div>
<div class="st_box">
<ul class="st_box_top" style="margin-left: 17px;">
<% if @subPage_title == l(:label_student_list) %>
<li class="ml358">
<%= link_to '作业积分', member_score_sort_course_path(:sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true%>
<% if @score_sort_by == 'desc' %>
<a id="pic" href="javascript:void(0)" class= "st_down"></a>
<% else %>
<a id="pic" href="javascript:void(0)" class= "st_up"></a>
<% end %>
</li>
<li class="ml50">
<a href="javascript:" >加入时间</a>
</li>
<% else %>
<li class="ml50">
</li>
<li class="ml50" style="margin-left: 470px">
</li>
<li class="ml50" style="margin-left: 80%">
<a href="javascript:" >加入时间</a>
</li>
<% end %>
</ul>
<div id="list_detail" style="margin-left: 17px">
<% members.each do |member| %>
<div class="cl"></div><!--st_box_top end-->
<div class="st_boxlist">
<a href="javascript:" class="st_img" style="float:left;">
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %>
</a>
<ul style="margin-left: 15px">
<% if @canShowCode %>
<% if member.user.show_name == '' && member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% else %>
<% unless member.user.show_name == ''%>
<li>
<%= l(:label_bidding_user_studentname) %> :
<%= link_to member.user.show_name, user_path(member.user) %>
</li>
</br>
<% end %>
<% unless member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_bidding_user_studentcode) %> :
<%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
</li>
<% end %>
<% end %>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% end %>
<!--teacher's code disapeared moified by huang-->
</ul>
<% if @subPage_title == l(:label_student_list) %>
<%= link_to format("%0.2f",member.score.nil? ? 0 : member.score.to_s), {
:action => 'show_member_score',
:member_id => member.id,
:remote => true},
:class => 'ml258 c_red', :style => "color:red;" %>
<% unless member.created_on.nil? %>
<%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey" %>
<% end %>
<% else %>
<% unless member.created_on.nil? %>
<%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey", :style=>"margin-left:195px" %>
<% end %>
<% end %>
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
</div>
<% end; reset_cycle %>
</div>
</div>
<div class="pagination">
<%= pagination_links_full @obj_pages, @obj_count,:per_page_links => false, :remote =>@is_remote %>
</div>
<% else %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% end %>

View File

@ -1,60 +0,0 @@
<% members.each do |member| %>
<div class="cl"></div><!--st_box_top end-->
<div class="st_boxlist">
<% next if member.new_record? %>
<a href="javascript:void(0)" class="st_img" style="float:left;"> <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %></a>
<ul style="margin-left: 15px">
<% if @canShowCode %>
<% if member.user.show_name == '' && member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% else %>
<% unless member.user.show_name == ''%>
<li>
<%= l(:label_bidding_user_studentname) %> :
<%= link_to member.user.show_name, user_path(member.user) %>
</li>
</br>
<% end %>
<% unless member.user.user_extensions.student_id == '' %>
<li>
<%= l(:label_bidding_user_studentcode) %> :
<%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
</li>
<% end %>
<% end %>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
<li>
<%= l(:label_username)%>
<%= link_to(member.user.name, user_path(member.user)) %>
</li>
<% end %>
<!--teacher's code disapeared moified by huang-->
</ul>
<% if @subPage_title == l(:label_student_list) %>
<%= link_to format("%0.2f",member.score.to_s), {
:action => 'show_member_score',
:member_id => member.id,
:remote => true},
:class => 'ml258 c_red', :style => "color:red;" %>
<% unless member.created_on.nil? %>
<%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey" %>
<% end %>
<% else %>
<% unless member.created_on.nil? %>
<%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey", :style=>"margin-left:195px" %>
<% end %>
<% end %>
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
</div>
<% end; reset_cycle %>

View File

@ -162,9 +162,8 @@
</div>
</div>
<% else%>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<div class="icons_tishi"><img src="/images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
<p class="sy_tab_con_p">没有数据可以显示!</p>
<% end %>
<script>

View File

@ -70,9 +70,8 @@
</tbody>
</table>
<% else %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<div class="icons_tishi"><img src="/images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
<p class="sy_tab_con_p">没有数据可以显示!</p>
<% end %>
</div>

View File

@ -1,8 +1,7 @@
<div>
<% if newss.empty? %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<div class="icons_tishi"><img src="/images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
<p class="sy_tab_con_p">没有数据可以显示!</p>
<% else %>
<% newss.each do |news| %>
<div class="problem_main upload_img">