adding csv import to channels
This commit is contained in:
16
app/views/channels/import.html.erb
Normal file
16
app/views/channels/import.html.erb
Normal file
@ -0,0 +1,16 @@
|
||||
<h2>
|
||||
<%= link_to t(:channels), channels_path %> »
|
||||
<%= link_to channel_path(@channel.id) do %> <%= t(:channel) %> <%= @channel.id %><% end %> »
|
||||
<%= t(:import) %>
|
||||
</h2>
|
||||
|
||||
<%= t(:upload_select) %>
|
||||
<br /><br />
|
||||
<%= form_for :upload, :url => {:controller => 'channels', :action => 'upload', :channel_id => params[:channel_id]}, :html => { :multipart => true } do |f| %>
|
||||
<%= f.file_field :csv %>
|
||||
<br /><br />
|
||||
<%= t(:time_zone) %>
|
||||
<%= time_zone_select 'feed', 'time_zone', nil, :default => 'UTC' %>
|
||||
<br /><br />
|
||||
<%= f.submit t(:upload), :disable_with => t(:uploading) %>
|
||||
<% end %>
|
@ -4,13 +4,16 @@
|
||||
</h2>
|
||||
|
||||
<% if current_user && current_user.id == @channel.user_id %>
|
||||
<%= link_to t(:channel_edit), edit_channel_path(@channel.id) %> |
|
||||
<%= link_to t(:api_keys_manage), channel_api_keys_path(@channel) %> |
|
||||
<%= link_to "#{t(:charts_view)}", channel_charts_path(@channel) %> |
|
||||
<%= link_to "#{t(:channel_feed)} (json)", channel_feed_index_path(@channel, :key => @key, :format => :json) %> |
|
||||
<%= link_to "#{t(:channel_feed)} (xml)", channel_feed_index_path(@channel, :key => @key, :format => :xml) %> |
|
||||
<%= link_to "#{t(:channel_feed)} (csv)", channel_feed_index_path(@channel, :key => @key, :format => :csv) %>
|
||||
|
||||
<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>
|
||||
|
||||
<br /><br />
|
||||
|
||||
<table class="table_no_header">
|
||||
@ -30,6 +33,10 @@
|
||||
<td class="left"><%= t(:channel_description) %>:</td>
|
||||
<td><%= @channel.description %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left"><%= t(:entries) %>:</td>
|
||||
<td><%= (@channel.last_entry_id) ? @channel.last_entry_id : '0' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left"><%= t(:created) %>:</td>
|
||||
<td><%= l @channel.created_at, :format => :pretty %></td>
|
||||
|
Reference in New Issue
Block a user