消息通知中的“同意|拒绝”调整宽度

This commit is contained in:
cxt 2016-05-12 14:59:12 +08:00
parent ca5f03f2ea
commit ac5a9c87ac
6 changed files with 72 additions and 87 deletions

View File

@ -0,0 +1,27 @@
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= link_to image_tag(url_to_avatar(User.find(ma.apply_user_id)), :width => "30", :height => "30"), user_path(User.find(ma.apply_user_id)) %></div></a></li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(ma.apply_user_id).show_name,
user_path(User.find(ma.apply_user_id)), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">申请引用作业:</span>
</li>
<li class="<%=(ma.apply_result == 0 || ma.apply_result.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
<% content = ma.content.nil? ? '' : ''+ ma.content.to_s %>
<%= link_to User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}", student_work_index_path(:homework => ma.course_message.id), :title => User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
<li class="<%=(ma.apply_result == 0 || ma.apply_result.nil?) ? 'homepageHomeworkContentWarn2' : 'homepageHomeworkContentWarn' %> fl">
<span id="deal_info_<%=ma.id%>">
<% if ma.apply_result == 0 || ma.apply_result.nil?%>
<%= link_to '同意',dealwith_apply_homework_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
<%= link_to '拒绝',dealwith_apply_homework_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
<% elsif ma.apply_result == 1%> <!-- 同意 -->
您已经同意了该申请
<% elsif ma.apply_result == 2%> <!-- 拒绝 -->
您已经拒绝了该申请
<%end %>
</span>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>

View File

@ -0,0 +1,37 @@
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
<li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">系统提示</span>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span>
</li>
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
<a href="javascript:void(0);" class="newsGrey">
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
</p>
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
<div class="fl">课程描述:</div>
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe %></div>
<p>申请职位:<%= ma.content == '9' ? "教师" : "教辅"%></p>
</div>
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContentWarn2' : 'homepageHomeworkContentWarn' %> fl">
<span id="deal_info_<%=ma.id%>">
<% if ma.status == 0 || ma.status.nil?%>
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
<% elsif ma.status == 1%> <!-- 同意 -->
您已经同意了该申请
<% elsif ma.status == 2%> <!-- 拒绝 -->
您已经拒绝了该申请
<%end %>
</span>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>

View File

@ -230,34 +230,8 @@
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= link_to image_tag(url_to_avatar(User.find(ma.apply_user_id)), :width => "30", :height => "30"), user_path(User.find(ma.apply_user_id)) %></div></a></li>
<li class="homepageNewsPubType fl">
<%= link_to User.find(ma.apply_user_id).show_name,
user_path(User.find(ma.apply_user_id)), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">申请引用作业:</span>
</li>
<li class="homepageHomeworkContent fl">
<% content = ma.content.nil? ? '' : ''+ ma.content.to_s %>
<%= link_to User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}", student_work_index_path(:homework => ma.course_message.id), :title => User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</li>
<li class="homepageHomeworkContentWarn fl">
<span id="deal_info_<%=ma.id%>">
<% if ma.apply_result == 0 || ma.apply_result.nil?%>
<%= link_to '同意',dealwith_apply_homework_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
<%= link_to '拒绝',dealwith_apply_homework_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
<% elsif ma.apply_result == 1%> <!-- 同意 -->
您已经同意了该申请
<% elsif ma.apply_result == 2%> <!-- 拒绝 -->
您已经拒绝了该申请
<%end %>
</span>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
<ul class="homepageNewsList fl" id="course_message_homework_<%=ma.id %>">
<%= render :partial => 'apply_homework_course_message', :locals => {:ma => ma} %>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 %>
@ -574,43 +548,8 @@
</ul>
<% end %>
<% if ma.course_message_type == "JoinCourseRequest" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
<li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">系统提示</span>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span>
</li>
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
</p>
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
<div class="fl">课程描述:</div>
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe %></div>
<p>申请职位:<%= ma.content == '9' ? "教师" : "教辅"%></p>
</div>
<li class="homepageHomeworkContentWarn fl">
<span id="deal_info_<%=ma.id%>">
<% if ma.status == 0 || ma.status.nil?%>
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
<% elsif ma.status == 1%> <!-- 同意 -->
您已经同意了该申请
<% elsif ma.status == 2%> <!-- 拒绝 -->
您已经拒绝了该申请
<%end %>
</span>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
<ul class="homepageNewsList fl" id="course_message_join_<%=ma.id %>">
<%= render :partial => 'join_course_course_message', :locals => {:ma => ma} %>
</ul>
<% end %>
<% if ma.course_message_type == "CourseRequestDealResult" %>

View File

@ -1,11 +1 @@
$("#deal_info_<%=@msg.id%>").html(
<% if @msg.apply_result == 0 || @msg.apply_result.nil?%>
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>@msg.id),:remote=>'true'%>
'|'
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>@msg.id),:remote=>'true'%>
<% elsif @msg.apply_result == 1%>
'您已经同意了该申请'
<% elsif @msg.apply_result == 2%>
'您已经拒绝了该申请'
<%end %>
);
$("#course_message_homework_<%=@msg.id %>").html('<%= escape_javascript(render :partial => 'users/apply_homework_course_message', :locals => {:ma => @msg}) %>');

View File

@ -1,11 +1 @@
$("#deal_info_<%=@msg.id%>").html(
<% if @msg.status == 0 || @msg.status.nil?%>
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>@msg.id),:remote=>'true'%>
'|'
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>@msg.id),:remote=>'true'%>
<% elsif @msg.status == 1%>
'您已经同意了该申请'
<% elsif @msg.status == 2%>
'您已经拒绝了该申请'
<%end %>
);
$("#course_message_join_<%=@msg.id %>").html('<%= escape_javascript(render :partial => 'users/join_course_course_message', :locals => {:ma => @msg}) %>');

View File

@ -620,6 +620,8 @@ a.homepageMenuControl {float:left; width:180px;}
.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
.homepageHomeworkContentWarn2 {width:60px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
.homepageHomeworkContent2 {width:285px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
a.homepageWhite {color:#ffffff;}