added comp mod council to staff page

This commit is contained in:
Absurdon 2017-07-02 16:31:36 +02:00
parent 8579d0b569
commit 3edf8cc5e7
3 changed files with 38 additions and 1 deletions

View file

@ -5,7 +5,7 @@
.tabbed {
$tabs-border-width: 1px;
$tabs-border-colour: $light-blue;
$tabs-padding-horizontal: 16px;
$tabs-padding-horizontal: 13px;
$tabs-height: 35px;
ul.tabs {

View file

@ -22,6 +22,7 @@ class Group < ActiveRecord::Base
PREDICTORS = 8
STAFF = 10
GATHER_MODERATORS = 14
COMP_MOD_COUNCIL = 16
attr_protected :id, :updated_at, :created_at, :founder_id
validates_length_of :name, :maximum => 20
@ -94,4 +95,12 @@ class Group < ActiveRecord::Base
end
gathermods
end
def self.compmodcouncil
compmodcouncil = []
(find(COMP_MOD_COUNCIL).groupers).each do |g|
compmodcouncil << g unless compmodcouncil.include? g
end
compmodcouncil
end
end

View file

@ -22,6 +22,7 @@
<li><a href="#referees">Referees</a></li>
<li><a href="#casters">Casters</a></li>
<li><a href="#gathermods">Gather Mods</a></li>
<li><a href="#compmodcouncil">Comp. Mod Council</a></li>
<li><a href="#extras">Extras</a></li>
<li><a href="#support">Support</a></li>
</ul>
@ -134,6 +135,33 @@
<% end %>
</table>
</div>
<div class="tab" id="compmodcouncil">
<h3>COMP. MOD COUNCIL</h3>
<table class="striped staff">
<tr>
<th></th>
<th>Username</th>
<th>Email</th>
<th>Task</th>
<th>Age</th>
</tr>
<% Group.compmodcouncil.each do |grouper| %>
<tr>
<td class="country"><%= flag grouper.user.country %></td>
<td class="username"><%= namelink grouper.user %></td>
<td><%= h grouper.user.email_s %></td>
<td>
<% if grouper.task %>
<%= h grouper.task %>
<% else %>
<%= h grouper.group.name.singularize %>
<% end %>
</td>
<td class="age"><%= h grouper.user.age %></td>
</tr>
<% end %>
</table>
</div>
<div class="tab" id="extras">
<h3>Extras</h3>
<table class="striped staff">