thingspeak/app/views/api_keys/index.html.erb

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2011-03-30 06:08:19 +02:00
<h2>
<%= link_to t(:channels), channels_path %> &raquo;
<%= link_to channel_path(@channel.id) do %> <%= t(:channel) %> <%= @channel.id %><% end %> &raquo;
<%= t(:api_keys) %>
</h2>
<h3><%= t(:api_key_write) %></h3>
<%= @write_key %>
2011-03-27 22:56:15 +02:00
<br /><br />
2011-03-30 06:08:19 +02:00
<%= button_to t(:api_key_write_new), channel_api_keys_path(@channel, :write => 1), :confirm => t(:confirm_new_api_key) %>
2011-03-27 22:56:15 +02:00
2011-03-30 06:08:19 +02:00
<br /><br />
<h3><%= t(:api_key_read) %></h3>
2011-03-27 22:56:15 +02:00
<% @read_keys.each do |read_key| %>
2011-03-30 06:08:19 +02:00
<table>
<tr>
<td><%= t(:api_key_key) %>:</td>
<td><%= read_key %></td>
2011-03-30 06:08:19 +02: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| %>
2011-03-30 06:08:19 +02:00
<%= f.text_area :note, :cols => 30, :rows => 4 %>
</td>
</tr>
<tr>
<td></td>
2011-03-30 06:08:19 +02:00
<td>
<div class="FL"><%= f.submit t(:note_save) %></div>
<% end %>
<%= button_to t(:api_key_delete), channel_api_key_path(@channel, read_key) , :method => 'delete', :confirm => t(:confirm_read_key_delete) %></td>
2011-03-30 06:08:19 +02:00
</tr>
</table>
<br /><br />
2011-03-27 22:56:15 +02:00
<% end %>
2011-03-30 06:08:19 +02:00
<%= button_to t(:api_key_read_new), channel_api_keys_path(@channel, :write => 0) %>
2011-03-30 06:08:19 +02:00
<br />