update channels index page
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
//= require ./updateChart.js
|
//= require ./updateChart.js
|
||||||
//= require ./timeago.min.js
|
//= require ./timeago.min.js
|
||||||
//= require ./jquery.shorten.min.js
|
//= require ./jquery.shorten.min.js
|
||||||
|
//= require ./tablesorter.js
|
||||||
//= require ./nested_form.js
|
//= require ./nested_form.js
|
||||||
//= require ./noapi.js
|
//= require ./noapi.js
|
||||||
//= require ./rest.js
|
//= require ./rest.js
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -4,6 +4,11 @@ code { word-wrap: break-word; white-space: normal; }
|
|||||||
.breadcrumb { margin-top: 10px; margin-bottom: 20px; } /* margins to make sure breadcrumb and h4.breadcrumb line up properly */
|
.breadcrumb { margin-top: 10px; margin-bottom: 20px; } /* margins to make sure breadcrumb and h4.breadcrumb line up properly */
|
||||||
.table td { word-break: break-word; }
|
.table td { word-break: break-word; }
|
||||||
|
|
||||||
|
/* table sorting */
|
||||||
|
.tablesorter thead { cursor: pointer; background-color: #f0f0f0; }
|
||||||
|
.tablesorter thead i { float: right; margin-top: 2px; visibility: hidden; }
|
||||||
|
.tablesorter thead tr th:hover i { visibility: visible; }
|
||||||
|
|
||||||
/* homepage */
|
/* homepage */
|
||||||
#home-motto { font-size: 2em; padding-top: 100px; }
|
#home-motto { font-size: 2em; padding-top: 100px; }
|
||||||
#home-motto h1 { font-size: 2em; color: #fff; }
|
#home-motto h1 { font-size: 2em; color: #fff; }
|
||||||
|
|||||||
@@ -7,53 +7,48 @@
|
|||||||
|
|
||||||
<% if @channels.length > 0 %>
|
<% if @channels.length > 0 %>
|
||||||
|
|
||||||
<table class="nicetable-borderless">
|
<table class="table table-striped table-bordered tablesorter">
|
||||||
|
<thead>
|
||||||
<% @channels.each do |channel| %>
|
<tr>
|
||||||
<% if !channel.social %>
|
<th><%= t(:channel_name) %> <i class="fa fa-unsorted"></i></th>
|
||||||
|
<th><%= t(:created) %> <i class="fa fa-unsorted"></i></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @channels.where(:social => false).each do |channel| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<h3 class="signed_in_channel_header" ><%= link_to channel.name, channel_path(channel.id), :id => "showsite_#{channel.id}" %></h3>
|
|
||||||
<div class="public_private_icon">
|
|
||||||
<%= channel.public_flag ? image_tag('icons/Unlocked.png', :title=> t(:public_true)) : image_tag('icons/Locked.png', :title=> t(:channel_not_public)) %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<a href="/channels/<%= channel.id %>">
|
||||||
|
<i class="fa fa-<%= 'un' if channel.public_flag == true %>lock fa-fw"></i>
|
||||||
|
<%= channel.name %>
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<%= link_to t(:private_link), channel_path(channel.id, :anchor => 'privateview') %> |
|
||||||
|
<%= link_to t(:public_link), channel_path(channel.id, :anchor => 'publicview') %> |
|
||||||
|
<%= link_to t(:settings_link), channel_path(channel.id, :anchor => 'channelsettings') %> |
|
||||||
|
<%= link_to t(:api_key_link), channel_path(channel.id, :anchor => 'apikeys') %> |
|
||||||
|
<%= link_to t(:data_import_link), channel_path(channel.id, :anchor => 'dataimport') %>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
<td><%= channel.created_at.strftime("%Y-%m-%d") %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><p><%= link_to t(:private_link), channel_path(channel.id, :anchor => 'privateview') %> |
|
|
||||||
<%= link_to t(:public_link), channel_path(channel.id, :anchor => 'publicview') %> |
|
|
||||||
<%= link_to t(:settings_link), channel_path(channel.id, :anchor => 'channelsettings') %> |
|
|
||||||
<%= link_to t(:api_key_link), channel_path(channel.id, :anchor => 'apikeys') %> |
|
|
||||||
<%= link_to t(:data_import_link), channel_path(channel.id, :anchor => 'dataimport') %> </p></td></tr>
|
|
||||||
<tr><td><p><%= channel.description %></p></td></tr>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= form_for :channel do |d| %>
|
<%= button_to t(:channel_create), channels_path, :method => :post, :class => 'btn btn-primary' %>
|
||||||
<input name='userlogin' class='userlogin' />
|
|
||||||
<%= d.submit t(:channel_create), :class => 'btn btn-primary' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if current_admin_user.present? %>
|
<% if current_admin_user.present? %>
|
||||||
|
|
||||||
<br><br><br>
|
<br><br><br>
|
||||||
|
|
||||||
<% @channels.each do |c| %>
|
<% @channels.each do |c| %>
|
||||||
<% if c.social %>
|
<% if c.social %>
|
||||||
<%= t(:social_channel) %>: <%= link_to c.name, (Rails.env == 'production') ? "http://www.socialsensornetwork.com/#{c.slug}" : "/s/#{c.slug}" %>
|
<%= t(:social_channel) %>: <%= link_to c.name, (Rails.env == 'production') ? "http://www.socialsensornetwork.com/#{c.slug}" : "/s/#{c.slug}" %>
|
||||||
<br>
|
<br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<%= link_to t(:social_channel_create), :controller => 'channels', :action => 'social_new' %>
|
<%= link_to t(:social_channel_create), :controller => 'channels', :action => 'social_new' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
@@ -77,3 +72,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.tablesorter').tablesorter();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user