merb-words 0.4.2 → 0.4.3

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/Rakefile CHANGED
@@ -15,7 +15,7 @@ spec = Gem::Specification.new do |s|
15
15
  s.name = 'merb-words'
16
16
  s.rubyforge_project = 'uipoet'
17
17
  s.summary = 'Word Management for Merb'
18
- s.version = '0.4.2'
18
+ s.version = '0.4.3'
19
19
  end
20
20
 
21
21
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -3,13 +3,13 @@ require 'cgi'
3
3
  class MerbWords::Pages < MerbWords::Application
4
4
 
5
5
  before(:mui_window_referer, :only => [:create, :update, :delete])
6
- before(:merb_words_password_redirect, :exclude => [:index, :feed, :read], :unless => :merb_words_password?)
6
+ before(:merb_words_password_redirect, :exclude => [:index, :feed, :read], :unless => :mui_password?)
7
7
  before(:merb_words_orders, :only => [:index])
8
8
 
9
9
  def index
10
10
  if Page
11
11
  filters = {}
12
- filters[:publish] = true unless merb_words_password?
12
+ filters[:publish] = true unless mui_password?
13
13
  @order_property = params[:order_property] || MerbWords[:order] || 'created_at'
14
14
  if @order_property == 'title'
15
15
  filters[:order] = [@order_property.intern.asc]
@@ -35,7 +35,7 @@ class MerbWords::Pages < MerbWords::Application
35
35
  @orders = Order.all
36
36
  display @pages
37
37
  else
38
- session[:mui_message] = url(:merb_ui_message, :title => 'Create the first page') if merb_words_password?
38
+ session[:mui_message] = url(:merb_ui_message, :title => 'Create the first page') if mui_password?
39
39
  session[:mui_window] = slice_url(:create)
40
40
  render
41
41
  end
@@ -1,7 +1,7 @@
1
1
  class MerbWords::Passwords < MerbWords::Application
2
2
 
3
3
  before(:mui_window_referer, :only => [:exit, :create, :read, :update, :delete])
4
- before(:merb_words_password_redirect, :exclude => [:exit, :create, :read], :unless => :merb_words_password?)
4
+ before(:merb_words_password_redirect, :exclude => [:exit, :create, :read], :unless => :mui_password?)
5
5
 
6
6
  def exit
7
7
  session.delete(:mui_password_id)
@@ -20,26 +20,14 @@ module Merb::MerbWords::ApplicationHelper
20
20
  end
21
21
  end
22
22
 
23
- def merb_words_password?
24
- session[:mui_password_id] ? true : false
25
- end
26
-
27
23
  def merb_words_password_redirect
28
- if Password.first
24
+ if Password
29
25
  redirect slice_url(:password_read)
30
26
  else
31
27
  redirect slice_url(:password_create)
32
28
  end
33
29
  end
34
30
 
35
- def merb_words_password_status
36
- if merb_words_password?
37
- update_button = mui_button(:title => 'Update Password', :title_size => '0.75em', :url => slice_url(:password_update), :window => 'open')
38
- exit_button = mui_button(:title => 'Exit', :title_size => '0.75em', :tone => 'positive', :url => slice_url(:password_exit))
39
- mui_status{"#{update_button} #{exit_button}"}
40
- end
41
- end
42
-
43
31
  def merb_words_paragraph(body)
44
32
  body.gsub(/\r\n|\r|\n/, '<br/>')
45
33
  end
@@ -8,7 +8,7 @@
8
8
  <%= mui_cell(:width => '100%') do %>
9
9
  <div class="mui_title" style="font-size:1em">Categories</div>
10
10
  <% end =%>
11
- <% if merb_words_password? %>
11
+ <% if mui_password? %>
12
12
  <%= mui_cell(:align => 'right', :valign => 'bottom') do %>
13
13
  <%= mui_button(:title => 'Create', :title_size => '0.75em', :url => slice_url(:category_create), :window => 'open') %>
14
14
  <% end =%>
@@ -30,7 +30,7 @@
30
30
  <%= mui_link(:title => category.title, :title_size => '0.85em', :url => slice_url(:index, attributes)) %>
31
31
  <% end %>
32
32
  <% end =%>
33
- <% if merb_words_password? %>
33
+ <% if mui_password? %>
34
34
  <%= mui_cell(:align => 'right', :wrap => false) do %>
35
35
  &nbsp;
36
36
  <%= mui_button(:title => 'Update', :title_size => '0.75em', :url => slice_url(:category_update, :category_id => category.id), :window => 'open') %>
@@ -9,7 +9,7 @@
9
9
  <%= mui_date_span(:created => page.created_at, :updated => page.updated_at) %>
10
10
  <% end =%>
11
11
  <% end =%>
12
- <% if merb_words_password? %>
12
+ <% if mui_password? %>
13
13
  <%= mui_cell(:wrap => false) do %>
14
14
  <%= mui_block do %>
15
15
  <% if page.publish == false %>
@@ -1,11 +1,10 @@
1
- <%= merb_words_password_status %>
2
1
  <%= mui_grid(:cell_valign => 'top', :columns => 2, :width => '100%') do %>
3
2
  <%= mui_cell(:width => '75%') do %>
4
3
  <%= mui_grid(:cell_valign => 'bottom', :columns => 2) do %>
5
4
  <%= mui_cell(:width => '100%') do %>
6
5
  <%= mui_block(:title => merb_words_title, :title_size => '3em')%>
7
6
  <% end =%>
8
- <% if merb_words_password? %>
7
+ <% if mui_password? %>
9
8
  <%= mui_cell(:wrap => false) do %>
10
9
  <%= mui_block do %>
11
10
  <%= mui_button(:title => 'Create', :url => slice_url(:create), :window => 'open') %>
@@ -1,14 +1,13 @@
1
1
  <% throw_content :feeds do %>
2
2
  <link href="<%= slice_url :feed %>" rel="alternate" title="RSS" type="application/rss+xml"/>
3
3
  <% end %>
4
- <%= merb_words_password_status %>
5
4
  <%= mui_grid(:cell_valign => 'bottom', :columns => 2) do %>
6
5
  <%= mui_cell(:width => '100%') do %>
7
6
  <%= mui_block(:title => @page.title, :title_size => '3em') %>
8
7
  <% end =%>
9
8
  <%= mui_cell(:wrap => false) do %>
10
9
  <%= mui_button(:title => '&larr; Back', :url => slice_url(:index)) %>
11
- <% if merb_words_password? %>
10
+ <% if mui_password? %>
12
11
  <%= mui_button(:title => 'Update', :url => slice_url(:update, :page_id => @page.id), :window => 'open') %>
13
12
  <%= mui_button(:title => '&#215;', :tone => 'negative', :url => slice_url(:delete, :page_id => @page.id), :window => 'open') %>
14
13
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-words
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - UiPoet
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-22 00:00:00 -08:00
12
+ date: 2008-12-24 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency