Display table
This commit is contained in:
parent
209f81b0c5
commit
18bafe5ec0
|
@ -5,7 +5,7 @@ class Settings::TelegramContactsController < ApplicationController
|
|||
def index
|
||||
authorize %i[settings account_telegram_contact]
|
||||
|
||||
@telegram_contacts = policy_scope(
|
||||
@account_telegram_contacts = policy_scope(
|
||||
current_account.account_telegram_contacts,
|
||||
policy_scope_class: Settings::AccountTelegramContactPolicy::Scope,
|
||||
)
|
||||
|
|
|
@ -5,6 +5,33 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<%= AccountTelegramContact.human_attribute_name :id %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= TelegramChat.human_attribute_name :remote_id %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= TelegramChat.human_attribute_name :username %>
|
||||
</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @account_telegram_contacts.each do |account_telegram_contact| %>
|
||||
<tr>
|
||||
<td scope="row"><%= account_telegram_contact.id %></td>
|
||||
<td><%= account_telegram_contact.telegram_chat.remote_id %></td>
|
||||
<td><%= truncate account_telegram_contact.telegram_chat.username, length: 20 %></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
en:
|
||||
activerecord:
|
||||
models:
|
||||
account_telegram_contact:
|
||||
one: Telegram contact
|
||||
other: Telegram contacts
|
||||
country_state:
|
||||
one: State
|
||||
other: States
|
||||
|
@ -26,6 +29,8 @@ en:
|
|||
one: User
|
||||
other: Users
|
||||
attributes:
|
||||
account_telegram_contact:
|
||||
id: ID
|
||||
country_state:
|
||||
id: ID
|
||||
membership_apps: Membership applications
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
ru:
|
||||
activerecord:
|
||||
models:
|
||||
account_telegram_contact:
|
||||
one: Контакт Telegram
|
||||
other: Контакты Telegram
|
||||
country_state:
|
||||
one: Регион
|
||||
other: Регионы
|
||||
|
@ -26,6 +29,8 @@ ru:
|
|||
one: Пользователь
|
||||
other: Пользователи
|
||||
attributes:
|
||||
account_telegram_contact:
|
||||
id: ID
|
||||
country_state:
|
||||
id: ID
|
||||
membership_apps: Заявления на вступление
|
||||
|
|
Reference in New Issue