项目动态中,新闻添加快捷操作,所有操作默认显示

This commit is contained in:
huang 2016-07-14 13:57:06 +08:00
parent 00c414c347
commit 8c6fca87c9
2 changed files with 21 additions and 2 deletions

View File

@ -32,6 +32,25 @@
<div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div>
<% if User.current.logged? %>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<% if User.current.logged? %>
<ul class="homepagePostSettiongText">
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li>
<li>
<%= link_to(l(:button_edit), {:controller => 'news', :action => 'edit', :id => activity}, :class => 'postOptionLink') if activity.author == User.current %>
</li>
<li>
<%= delete_link(news_path(activity), :data => {:confirm => l(:text_are_you_sure)}, :class => 'postOptionLink') if activity.author == User.current %>
</li>
</ul>
<% end %>
</li>
</ul>
</div>
<% end %>
</div>
<div class="cl"></div>
</div>

View File

@ -1,4 +1,4 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" onmouseover="$('#message_setting_<%= user_activity_id%>').show();" onmouseout="$('#message_setting_<%= user_activity_id%>').hide();">
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
@ -46,7 +46,7 @@
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div>
<% if User.current.logged? %>
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: block">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">