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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- noodall-ui (0.0.6)
4
+ noodall-ui (0.0.7)
5
5
  dynamic_form
6
6
  noodall-core
7
7
  thoughtbot-sortable_table (= 0.0.6)
@@ -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
@@ -12,6 +12,8 @@ Bundler.require(:default, Rails.env) if defined?(Bundler)
12
12
 
13
13
  require 'noodall-core'
14
14
  require 'lib/noodall/permalinks'
15
+ require 'lib/noodall/ui'
16
+ require 'lib/noodall/canable'
15
17
 
16
18
  module Noodall
17
19
  class Application < Rails::Application
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module UI
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
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: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steve England