ruling_timer/app/views/admin/ruling_timers/timer_management.html.erb

47 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-07-21 07:37:06 +00:00
<style type="text/css">
.span20-percent{
width: 20%;
float: left;
text-align: center;
font-size: 1.5em;
margin: 0;
border: 2px solid #333333;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.span20-percent img{
width: 100%;
}
.status-tags > *{
font-weight: bold;
}
.working_label{
color: #3ec700;
}
.rest_label{
color: #5a5a5a;
}
.offline_label{
color: #cd1643;
}
</style>
<h3><%= t("ruling_timer.member") %></h3>
<% timer_temps = @timer_temps.to_a%>
<% @active_users.each_with_index do |user,i| %>
<div class="span20-percent">
<% name = user.name %>
<% link = work_history_admin_ruling_timer_path(:id=>user.id) %>
2022-10-21 07:29:03 +00:00
<a href="<%=link%>" title="<%=name%>"><img src="<%=user.get_avatar%>"></a>
2021-07-21 07:37:06 +00:00
<div class="status-tags">
<% timer_temp = timer_temps[i] %>
<% if timer_temp.status != "stop" %>
<span class="<%=timer_temp.status%>_label"><%=t("ruling_timer.#{timer_temp.status}")%></span>
<% else %>
<span class="offline_label"><%=t("ruling_timer.offline")%></span>
<% end %>
</div>
<a href="<%=link%>" title="<%=name%>"><%=name%></a>
</div>
<%= '<div style=\"clear: both;\"></div>'.html_safe if (i % 5 == 4) %>
<% end %>
<%= paginate(@timer_temps)%>