noodall-ui 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/app/controllers/noodall/nodes_controller.rb +6 -6
- data/config/application.rb +2 -0
- data/lib/noodall/ui/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
module Noodall
|
|
2
2
|
class NodesController < ApplicationController
|
|
3
3
|
def show
|
|
4
|
-
if published_states_changed_since_global_update? or stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
|
|
4
|
+
if flash.any? or published_states_changed_since_global_update? or stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
|
|
5
5
|
permalink = params[:permalink].is_a?(String) ? params[:permalink] : params[:permalink].join('/')
|
|
6
6
|
|
|
7
7
|
@node = Node.find_by_permalink(permalink)
|
|
8
8
|
@page_title = @node.title
|
|
9
9
|
@page_description = @node.description
|
|
10
10
|
@page_keywords = @node.keywords
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
respond_to do |format|
|
|
13
13
|
format.html { render "nodes/#{@node.class.name.underscore}" }
|
|
14
14
|
format.rss { render "nodes/#{@node.class.name.underscore}" }
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
def sitemap
|
|
20
20
|
if stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
|
|
21
21
|
@page_title = 'Sitemap'
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
def search
|
|
26
26
|
@nodes = Node.search(params[:q], :per_page => 10, :page => params[:page], :published_at => { :$lte => Time.zone.now }, :published_to => { :$gte => Time.zone.now })
|
|
27
27
|
@page_title = 'Searching: '+ params[:q]
|
|
28
28
|
end
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
protected
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
def published_states_changed_since_global_update?
|
|
33
33
|
if Node.count(:published_at => { :$gte => GlobalUpdateTime::Stamp.read, :$lte => Time.zone.now }).zero? and Node.count(:published_to => { :$gte => GlobalUpdateTime::Stamp.read, :$lte => Time.zone.now }).zero?
|
|
34
34
|
false
|
data/config/application.rb
CHANGED
data/lib/noodall/ui/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: noodall-ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 17
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 7
|
|
10
|
+
version: 0.0.7
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Steve England
|