Commit 2d2bf8cb authored by 神楽坂玲奈's avatar 神楽坂玲奈

用户组模型初步

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@82 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 2704d967
class Role < ActiveRecord::Base
def to_s
"<em>#{name}</em>".html_safe
end
end
......@@ -71,11 +71,11 @@
<label>&nbsp;</label>
<span id="thread_<%= topic.id %>"><%= topic %></span>
<%= link_to(t('topic.control.delete'), control_topic_path(topic, :deleted => 1)) %>
<%= link_to(t('topic.control.digest'), control_topic_path(topic, :digest => 1)) %>
<%= link_to(t('topic.control.displayorder'), control_topic_path(topic, :displayorder => 1)) %>
<%= link_to(t('topic.control.lock'), control_topic_path(topic, :locked => 1)) %>
<%= link_to(t('topic.control.highlight'), control_topic_path(topic, :highlight => 0xFF0000)) %>
<%= link_to(t('topic.control.delete'), control_topic_path(topic, :deleted => 1)) if @corrent_user.role.topic_delete %>
<%= link_to(t('topic.control.digest'), control_topic_path(topic, :digest => 1)) if @corrent_user.role.topic_digest > 0 %>
<%= link_to(t('topic.control.displayorder'), control_topic_path(topic, :displayorder => 1)) if @corrent_user.role.topic_displayorder > 0 %>
<%= link_to(t('topic.control.lock'), control_topic_path(topic, :locked => 1)) if @corrent_user.role.topic_lock %>
<%= link_to(t('topic.control.highlight'), control_topic_path(topic, :highlight => 0xFF0000)) if @corrent_user.role.topic_highlight %>
</th>
<td class="author">
......
<ul class="popupmenu_popup headermenu_popup inlinelist" id="modopt_menu" style="width: 180px; display: none"><li class="wide"><a href="javascript:;" onclick="modthreads(3, 'delete')">删除主题</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(3, 'down')">提升下沉</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'stick')">主题置顶</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'highlight')">高亮显示</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(1, 'digest')">设置精华</a></li><li class="wide"><a href="javascript:;" onclick="modaction('stamp')">主题鉴定</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(4)">关闭打开</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(2, 'move')">移动主题</a></li><li class="wide"><a href="javascript:;" onclick="modthreads(2, 'type')">主题分类</a></li><li class="wide"><a href="javascript:;" onclick="modaction('copy')">复制主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('merge')">合并主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('split')">分割主题</a></li><li class="wide"><a href="javascript:;" onclick="modaction('repair')">修复主题</a></li><li class="wide"><a href="plugin.php?id=dps_postawards:postawards&amp;tid=29727" onclick="showWindow('paward', this.href);return false;">楼层奖惩</a></li></ul>
<div id="modlayer" style="display:none;position:position;width:165px;">
<div id="modlayer" style="display:none;position:position;width:165px;">
<span>选中</span><strong id="modcount"></strong><span>篇: </span>
<a href="javascript:;" onclick="modaction('warn')">警告</a>
<a href="javascript:;" onclick="modaction('banpost')">屏蔽</a>
<a href="javascript:;" onclick="modaction('delpost')">删除</a>
</div>
</div>
<div id="wrap" class="wrap s_clear threadfix">
<div id="wrap" class="wrap s_clear threadfix">
<div class="forumcontrol">
<table cellspacing="0" cellpadding="0">
<tbody><tr>
......@@ -58,8 +58,8 @@
</div>-->
<div>
<div class="avatar" onmouseover="showauthor(this, 'userinfo751931')"><%= post.user.avatar %></div>
<p>
<em><%= post.user.nickname %></em>
<p><%= post.user.role %></p>
<p><em><%= post.user.nickname %></em></p>
</div>
<p><%= image_tag 'common/star_level2.gif', :alt => 'Rank:2' %></p>
......@@ -200,7 +200,7 @@
</tr>
</tbody></table>
<%= hidden_field_tag 'post[topic_id]', @topic.id%>
<% end %>
<% end %>
</div>
<div id="authornewfeed_menu" style="display:none"></div><script type="text/javascript" src="http://www.touhou.cc/blog/api/discuz.php?pagetype=viewthread&amp;status=3&amp;uid=359&amp;infosidestatus=0&amp;feedpostnum=14&amp;updateuid=14806&amp;pid=751906&amp;plugin=1"></script><script language="javascript">
$("modopt_menu").innerHTML+="<li class=\"wide\"><a href=\"plugin.php?id=dps_postawards:postawards&tid=29727\" onclick=\"showWindow('paward', this.href);return false;\">楼层奖惩</a></li>";
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment