<%= t(:api_key_write) %>

<%= button_to t(:api_key_write_new), channel_api_keys_path(@channel, :write => 1), :confirm => t(:confirm_new_api_key) %>
<%= @key %>

<%= t(:api_key_read) %>

<%= button_to t(:api_key_read_new), channel_api_keys_path(@channel, :write => 0), %>
<% @read_keys.each do |read_key| %>
<%= t(:api_key_key) %>: <%= read_key.api_key %>
<%= t(:note) %>: <%= form_for read_key, :as => :api_key, :url => { :controller => 'api_keys', :action => 'update' }, :html => {:method => 'put'} do |f| %> <%= f.text_area :note, :cols => 30, :rows => 4 %>
<%= f.hidden_field :api_key, :value => read_key.api_key %>
<%= f.submit t(:note_save) %>
<% end %> <%= button_to t(:api_key_delete), :controller => 'api_keys', :action => 'destroy', :api_key => read_key.api_key %>


<% end %>