-
Notifications
You must be signed in to change notification settings - Fork 2
/
_screen_link.html.erb
46 lines (45 loc) · 1.72 KB
/
_screen_link.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<%# This partial will be read in the context of the main Concerto app. %>
<%# URL helpers require use of the 'hardware' routing helper. %>
<%# ConcertoHardware authorization rules are automatically provided. %>
<section class="viewblock">
<header class="viewblock-header">
<div class="viewblock-header_right">
<div class="button-padding">
<% if (!@player.nil?) && (can? :update, @player) %>
<%= link_to t('.player_settings'), hardware.edit_player_path(@player), :class => "btn" %>
<% end %>
</div>
</div>
<div class="default-padding">
<h1><%= t('.concerto_player') %></h1>
</div>
</header>
<div class="viewblock-cont">
<div class="default-padding">
<% if @player.nil? %>
<div class="alert alert-block alert-zero">
<p class="alert-heading"><%= t('.no_player_header') %></p>
<p><%= t('.no_player_msg') %></p>
</div>
<% else %>
<h3><%= @screen.name + " Player" %></h3>
<p><b><%= @player.activated ? t('.is_activated') : t('.not_activated') %></b></p>
<br />
<% if can? :read, @player %>
<% if current_user %>
<p>
<b><%= ConcertoHardware::Player.human_attribute_name(:ip_address)%>:</b>
<%= @player.ip_address %>
</p>
<% end %>
<p><b><%= ConcertoHardware::Player.human_attribute_name(:screen_on_off_times)%>:</b></p>
<ul>
<% @player.describe_screen_on_off.each do |rule| %>
<li><%= rule %></li>
<% end %>
</ul>
<% end %>
<% end %>
</div>
</div>
</section>