This commit is contained in:
jomo
2013-10-20 18:19:27 +02:00
parent db1fc7c4ef
commit 7e20ab8de7
6 changed files with 32 additions and 4 deletions

View File

@@ -261,6 +261,30 @@ and (min-width: 0px) //TODO
}
}
.role {
display: inline;
text-decoration: none;
border-bottom: 2px solid;
&.superadmin, &.admin {
border-color: #d22;
}
&.mod {
border-color: #6af;
}
&.donor {
border-color: #fa0;
}
&.default {
border-color: #000;
}
&.unconfirmed {
border-color: #888;
}
&.banned, &.disabled {
border-color: #ccc;
}
}
#comments {
margin: 50px 0 0 40px;
.comment {

View File

@@ -67,5 +67,9 @@ require "open-uri"
yt
end
def link_user(user)
link_to user.name, user, class: "role #{user.role.name}"
end
end

View File

@@ -9,7 +9,7 @@
</span>
</div>
<div class="post-info">
by <%= link_to p.author.name, p.author %> on <%= p.created_at.strftime("%e. %b %Y") %>
by <%= link_user p.author %> on <%= p.created_at.strftime("%e. %b %Y") %>
</div>
<div class="post-content">
<%= Sanitize.clean(GitHub::Markdown.render_gfm(p.content), Sanitize::Config::RELAXED).html_safe %>

View File

@@ -2,7 +2,7 @@
<div class="post-title">
<h1><%= @post.title %></h1>
</div>
<div class="post-info"><%= link_to @post.author.name, @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
<div class="post-info"><%= link_user @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
<% if mod? %>
<%= link_to "edit", edit_blogpost_path(@post.id), class: "post-edit" %>
<% end %>

View File

@@ -1,5 +1,5 @@
<div class="comment <%= "author" if c.author == @post.author %>" id="comment-<%= c.id %>">
<span class="comment-info"><%= link_to c.author.name, c.author %> <%= c.created_at.strftime("%e. %b %Y, %H:%m") %>
<span class="comment-info"><%= link_user c.author %> <%= c.created_at.strftime("%e. %b %Y, %H:%m") %>
<% if mod? || c.author.is?(current_user) %>
<div class="editlink"><%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c) %></div>
<% end %>

View File

@@ -8,7 +8,7 @@
<div id="userlist">
<% @users.each do |u| %>
<div class="list-user">
<%= link_to u, :class => "avatar_url" do %>
<%= link_user u, :class => "avatar_url" do %>
<%= image_tag(avatar_url(u.id, 64), :class => "avatar", :alt => "avatar") %>
<% end %>
<div class="user-info">