Display Contact#send_security_notifications
This commit is contained in:
parent
4fe39ce8a2
commit
ac78717d6b
4 changed files with 18 additions and 0 deletions
|
@ -46,6 +46,18 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def bool_badge(value)
|
||||||
|
if value
|
||||||
|
tag.span class: 'badge badge-pill badge-success' do
|
||||||
|
translate :yes
|
||||||
|
end
|
||||||
|
else
|
||||||
|
tag.span class: 'badge badge-pill badge-secondary' do
|
||||||
|
translate :no
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def translate_enum(type, value)
|
def translate_enum(type, value)
|
||||||
translate value, scope: [:enums, type]
|
translate value, scope: [:enums, type]
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<%= Contact.human_attribute_name :value %>
|
<%= Contact.human_attribute_name :value %>
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
<%= Contact.human_attribute_name :send_security_notifications %>
|
||||||
|
</th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -16,6 +19,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= contact.contact_network.name %></td>
|
<td><%= contact.contact_network.name %></td>
|
||||||
<td><%= truncate contact.value %></td>
|
<td><%= truncate contact.value %></td>
|
||||||
|
<td><%= bool_badge contact.send_security_notifications %></td>
|
||||||
<td>
|
<td>
|
||||||
<% if policy([:settings, contact]).destroy? %>
|
<% if policy([:settings, contact]).destroy? %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
|
|
|
@ -49,6 +49,7 @@ en:
|
||||||
id: ID
|
id: ID
|
||||||
contact_network: Contact network
|
contact_network: Contact network
|
||||||
value: Value
|
value: Value
|
||||||
|
send_security_notifications: Security notifications
|
||||||
contact_network:
|
contact_network:
|
||||||
id: ID
|
id: ID
|
||||||
codename: Codename
|
codename: Codename
|
||||||
|
|
|
@ -49,6 +49,7 @@ ru:
|
||||||
id: ID
|
id: ID
|
||||||
contact_network: Сеть контактов
|
contact_network: Сеть контактов
|
||||||
value: Значение
|
value: Значение
|
||||||
|
send_security_notifications: Уведомления безопасности
|
||||||
contact_network:
|
contact_network:
|
||||||
id: ID
|
id: ID
|
||||||
codename: Кодовое имя
|
codename: Кодовое имя
|
||||||
|
|
Reference in a new issue