2014-02-17 18:05:39 +01:00
|
|
|
<div class="FL">
|
|
|
|
<h3><%= t(:api_key_write) %></h3>
|
2014-07-31 21:35:21 +02:00
|
|
|
<code class="large"><%= @write_key %></code>
|
2014-03-14 00:16:35 +01:00
|
|
|
<br><br>
|
2014-02-17 18:05:39 +01:00
|
|
|
|
2014-07-31 21:35:21 +02:00
|
|
|
<%= button_to t(:api_key_write_new), channel_api_keys_path(@channel, :write => 1), :data => { :confirm => t(:confirm_new_api_key) }, class: 'btn btn-warning btn-sm' %>
|
2014-02-17 18:05:39 +01:00
|
|
|
|
2014-03-14 00:16:35 +01:00
|
|
|
<br><br>
|
2014-02-17 18:05:39 +01:00
|
|
|
|
|
|
|
<h3><%= t(:api_key_read) %></h3>
|
|
|
|
<% @read_keys.each do |read_key| %>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td><%= t(:api_key_key) %>:</td>
|
2014-07-31 21:35:21 +02:00
|
|
|
<td><code class="large"><%= read_key %></code></td>
|
2014-02-17 18:05:39 +01:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="VAT"><%= t(:note) %>:</td>
|
|
|
|
<td>
|
|
|
|
<%= form_for read_key, :as => :api_key, :url => channel_api_key_path(@channel, read_key), :html => {:method => 'put'} do |f| %>
|
|
|
|
<%= f.text_area :note, :cols => 30, :rows => 4 %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<td>
|
2014-07-31 21:35:21 +02:00
|
|
|
<div class="FL"><%= f.submit t(:note_save), class: 'btn btn-primary btn-sm btn-margin' %></div>
|
2014-02-17 18:05:39 +01:00
|
|
|
<% end %>
|
2014-07-31 21:35:21 +02:00
|
|
|
<%= button_to t(:api_key_delete), channel_api_key_path(@channel, read_key), :method => 'delete', :data => { :confirm => t(:confirm_read_key_delete) }, class: 'btn btn-danger btn-sm btn-margin' %></td>
|
2014-02-17 18:05:39 +01:00
|
|
|
</tr>
|
|
|
|
</table>
|
2014-03-14 00:16:35 +01:00
|
|
|
<br><br>
|
2014-02-17 18:05:39 +01:00
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
2014-07-31 21:35:21 +02:00
|
|
|
<%= button_to t(:api_key_read_new), channel_api_keys_path(@channel, :write => 0), class: 'btn btn-warning btn-sm' %>
|
2014-03-14 00:16:35 +01:00
|
|
|
<br>
|
2014-02-17 18:05:39 +01:00
|
|
|
</div>
|
2014-02-18 01:51:30 +01:00
|
|
|
<div id="sidebar_old">
|
2014-02-17 18:05:39 +01:00
|
|
|
<ul>
|
|
|
|
<li>
|
2014-02-28 19:57:58 +01:00
|
|
|
<div class="helplink">(<a target="_blank" href="/docs/channels#api_keys"><%= t(:help_options) %></a>)</div>
|
2014-02-17 18:05:39 +01:00
|
|
|
<h2><%= t(:help) %></h2>
|
|
|
|
<%= t(:help_channel_write_key) %>
|
2014-03-14 00:16:35 +01:00
|
|
|
<br><br>
|
2014-02-17 18:05:39 +01:00
|
|
|
<%= t(:help_channel_read_key) %>
|
2014-03-14 00:16:35 +01:00
|
|
|
<br><br>
|
2014-02-17 18:05:39 +01:00
|
|
|
<%= t(:help_channel_read_key_note) %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|