pluto-admin 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -81,7 +81,7 @@ class Server < Sinatra::Base
81
81
  # Controllers / Routing / Request Handlers
82
82
 
83
83
  get '/' do
84
- redirect( sites_path )
84
+ redirect( feeds_path )
85
85
  end
86
86
 
87
87
  get '/sites' do
@@ -1,4 +1,4 @@
1
1
 
2
2
  module PlutoAdmin
3
- VERSION = '0.1.0'
3
+ VERSION = '0.2.0'
4
4
  end
@@ -2,13 +2,60 @@
2
2
  <h2><%= Feed.count %> Feeds</h2>
3
3
 
4
4
  <table>
5
- <% Feed.all.each do |feed| %>
5
+ <% Feed.latest.all.each do |feed| %>
6
6
  <tr>
7
7
  <td class='key'><%= feed.key %></td>
8
- <td><%= feed.title %>
9
- <span class='count'>(<%= feed.items.count %>)</span>
8
+ <td>
9
+ <a href='<%= feed.url %>'>
10
+ <b><%= feed.title %></b>
11
+ </a>
12
+ <span class='count'>(<%= feed.items.count %>)</span> <br>
13
+ <% if feed.summary || feed.title2 %>
14
+ <%= feed.summary %> <!-- rss/description -->
15
+ <%= feed.title2 %> <!-- atom/subtitle -->
16
+ <% else %>
17
+ --no-summary--
18
+ <% end %>
19
+ </td>
20
+ <td><%= feed.format %> <a href='<%= feed.feed_url %>'>
21
+ <img src='<%= url( "/feed-icon-10x10.png" )%>'></img>
22
+ </a>
23
+ </td>
24
+ <td>
25
+ <% if feed.published_at? %>
26
+ <%= feed.published_at.strftime( '%b %d, %Y %H:%M' ) %>
27
+ <% else %>
28
+ --no-published--
29
+ <% end %>
30
+ </td>
31
+ <td>
32
+ <% if feed.touched_at %>
33
+ <%= feed.touched_at.strftime( '%b %d, %Y %H:%M' ) %>
34
+ <% else %>
35
+ --no-updated--
36
+ <% end %>
37
+ </td>
38
+ <td>
39
+ <% if feed.built_at %>
40
+ <%= feed.built_at.strftime( '%b %d, %Y %H:%M' ) %>
41
+ <% else %>
42
+ --no-last-build--
43
+ <% end %>
44
+ </td>
45
+ <td>
46
+ <% if feed.generator %>
47
+ <%= feed.generator %>
48
+ <% else %>
49
+ --no-generator--
50
+ <% end %>
51
+ </td>
52
+ <td>
53
+ <% if feed.fetched_at %>
54
+ <%= feed.fetched_at.strftime( '%b %d, %Y %H:%M' ) %>
55
+ <% else %>
56
+ --no-fetched--
57
+ <% end %>
10
58
  </td>
11
- <td><%= feed.format %></td>
12
59
  <td><%= feed.etag %></td>
13
60
  </tr>
14
61
  <% end %>
@@ -2,11 +2,59 @@
2
2
  <h2><%= Item.count %> Items</h2>
3
3
 
4
4
  <table>
5
- <% Item.all.each do |item| %>
5
+ <% Item.latest.all.each do |item| %>
6
6
  <tr>
7
- <td><%= item.title %></td>
7
+ <td><a href='<%= item.url %>'>
8
+ <%= item.title %>
9
+ </a>
10
+ </td>
11
+
12
+ <td>
13
+ <% if item.summary? %>
14
+ <%= item.summary.length %>
15
+ <% else %>
16
+ --no-summary--
17
+ <% end %>
18
+ </td>
19
+
20
+ <td>
21
+ <% if item.content? %>
22
+ <%= item.content.length %>
23
+ <% else %>
24
+ --no-content--
25
+ <% end %>
26
+ </td>
27
+
8
28
  <td class='key'><%= item.guid %></td>
9
- <td><%= item.feed.title %></td>
29
+
30
+ <td>
31
+ <% if item.published_at? %>
32
+ <%= item.published_at.strftime( '%b %d, %Y %H:%M' ) %>
33
+ <% else %>
34
+ --no-published--
35
+ <% end %>
36
+ </td>
37
+ <td>
38
+ <% if item.touched_at %>
39
+ <%= item.touched_at.strftime( '%b %d, %Y %H:%M' ) %>
40
+ <% else %>
41
+ --no-updated--
42
+ <% end %>
43
+ </td>
44
+ <td><a href='<%= item.feed.url %>'>
45
+ <%= item.feed.title %>
46
+ </a>
47
+ <a href='<%= item.feed.feed_url %>'>
48
+ <img src='<%= url( "/feed-icon-10x10.png" )%>'></img>
49
+ </a>
50
+ </td>
51
+ <td>
52
+ <% if item.fetched_at %>
53
+ <%= item.fetched_at.strftime( '%b %d, %Y %H:%M' ) %>
54
+ <% else %>
55
+ --no-fetched--
56
+ <% end %>
57
+ </td>
10
58
  </tr>
11
59
  <% end %>
12
60
  </table>
@@ -2,15 +2,15 @@
2
2
  <h2>Timeline</h2>
3
3
 
4
4
  <table>
5
- <% Action.all.each do |action| %>
5
+ <% Action.order( 'created_at DESC' ).all.each do |action| %>
6
6
  <tr>
7
7
  <td><%= action.title %></td>
8
8
  <td><%= action.object %></td>
9
- <td><%= action.created_at %></td>
9
+ <td><%= action.created_at.strftime( '%b %d, %Y %H:%M' ) %></td>
10
10
  <td>
11
11
  <!-- only show if different from created_at -->
12
12
  <% unless action.created_at == action.updated_at %>
13
- <%= action.updated_at %>
13
+ <%= action.updated_at.strftime( '%b %d, %Y %H:%M' ) %>
14
14
  <% end %>
15
15
  </td>
16
16
  </tr>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluto-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-20 00:00:00.000000000 Z
12
+ date: 2013-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: logutils
16
- requirement: &83711660 !ruby/object:Gem::Requirement
16
+ requirement: &68931870 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.5'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *83711660
24
+ version_requirements: *68931870
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rdoc
27
- requirement: &83710660 !ruby/object:Gem::Requirement
27
+ requirement: &68931620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.10'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *83710660
35
+ version_requirements: *68931620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hoe
38
- requirement: &83710250 !ruby/object:Gem::Requirement
38
+ requirement: &68931310 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.3'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *83710250
46
+ version_requirements: *68931310
47
47
  description: planet web admin - sintara web app ready to get mounted into your web
48
48
  app
49
49
  email: webslideshow@googlegroups.com