2011-03-30 06:08:19 +02:00
|
|
|
<h2>
|
|
|
|
<%= link_to t(:channels), channels_path %> »
|
|
|
|
<%= t(:channel) %> <%= @channel.id %>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<% if current_user && current_user.id == @channel.user_id %>
|
2011-04-05 22:26:52 +02:00
|
|
|
<ul>
|
|
|
|
<li><%= link_to t(:channel_edit), edit_channel_path(@channel.id) %></li>
|
|
|
|
<li><%= link_to t(:api_keys_manage), channel_api_keys_path(@channel) %></li>
|
|
|
|
<li><%= link_to "#{t(:charts_view)}", channel_charts_path(@channel) %></li>
|
|
|
|
<li><%= link_to "#{t(:channel_feed)} (json)", channel_feed_index_path(@channel, :key => @key, :format => :json) %></li>
|
|
|
|
<li><%= link_to "#{t(:channel_feed)} (xml)", channel_feed_index_path(@channel, :key => @key, :format => :xml) %></li>
|
|
|
|
<li><%= link_to "#{t(:channel_feed)} (csv)", channel_feed_index_path(@channel, :key => @key, :format => :csv) %></li>
|
|
|
|
<li><%= link_to t(:import_data), channel_import_path(@channel) %></li>
|
|
|
|
</ul>
|
|
|
|
|
2011-03-30 06:08:19 +02:00
|
|
|
<br /><br />
|
|
|
|
|
|
|
|
<table class="table_no_header">
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:channel_id) %>:</td>
|
|
|
|
<td><%= @channel.id %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:channel_name) %>:</td>
|
|
|
|
<td><%= @channel.name %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:api_key_write) %>:</td>
|
|
|
|
<td><%= @key %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:channel_description) %>:</td>
|
|
|
|
<td><%= @channel.description %></td>
|
|
|
|
</tr>
|
2011-04-05 22:26:52 +02:00
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:entries) %>:</td>
|
|
|
|
<td><%= (@channel.last_entry_id) ? @channel.last_entry_id : '0' %></td>
|
|
|
|
</tr>
|
2011-03-30 06:08:19 +02:00
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:created) %>:</td>
|
|
|
|
<td><%= l @channel.created_at, :format => :pretty %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:latitude) %>:</td>
|
|
|
|
<td><%= @channel.latitude %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:longitude) %>:</td>
|
|
|
|
<td><%= @channel.longitude %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:elevation) %>:</td>
|
|
|
|
<td><%= @channel.elevation %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% @channel.attribute_names.each do |attr| %>
|
|
|
|
<% if attr.index('field') and @channel[attr] and !@channel[attr].empty? %>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:field) %> <%= attr[-1] %>:</td>
|
|
|
|
<td><%= @channel[attr] %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2011-03-27 22:56:15 +02:00
|
|
|
<% else %>
|
2011-03-30 06:08:19 +02:00
|
|
|
<% if @channel.public_flag %>
|
|
|
|
<%= t(:channel_public) %>
|
|
|
|
<br /><br />
|
|
|
|
<table class="table_no_header">
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:channel_name) %>:</td>
|
|
|
|
<td><%= @channel.name %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:channel_description) %>:</td>
|
|
|
|
<td><%= @channel.description %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% @channel.attribute_names.each do |attr| %>
|
|
|
|
<% if attr.index('field') and @channel[attr] and !@channel[attr].empty? %>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="left"><%= t(:field) %> <%= attr[-1] %>:</td>
|
|
|
|
<td><%= @channel[attr] %></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<% @channel.attribute_names.each do |attr| %>
|
|
|
|
<% if attr.index('field') and @channel[attr] and !@channel[attr].empty? %>
|
|
|
|
|
|
|
|
<br /><br />
|
|
|
|
<iframe width="450" height="250" style="border: 1px solid #cccccc;" src="<%= "#{@domain}channels/#{@channel.id}/charts/#{attr[-1]}" %>"></iframe>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= t(:channel_not_public) %>
|
|
|
|
<% end %>
|
|
|
|
|
2011-03-27 22:56:15 +02:00
|
|
|
<% end %>
|