zen 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gems +17 -15
- data/.gitignore +1 -1
- data/.travis.yml +1 -1
- data/MANIFEST +470 -0
- data/README.md +5 -3
- data/Rakefile +8 -6
- data/bin/zen +2 -7
- data/guide/asset_management.md +1 -0
- data/guide/autosaving_forms.md +1 -0
- data/guide/changelog.md +22 -0
- data/guide/faq.md +1 -0
- data/guide/getting_started.md +1 -0
- data/guide/hacking.md +1 -0
- data/guide/images/sections/revisions.png +0 -0
- data/guide/images/sections/revisions_diff.png +0 -0
- data/guide/images/sections/revisions_diff_multiple.png +0 -0
- data/guide/installation.md +4 -3
- data/guide/javascript.md +1 -0
- data/guide/javascript/zen_autosave.md +1 -0
- data/guide/javascript/zen_editor.md +1 -0
- data/guide/javascript/zen_form.md +1 -0
- data/guide/javascript/zen_hash.md +1 -0
- data/guide/javascript/zen_htmltable.md +1 -0
- data/guide/javascript/zen_tabs.md +1 -0
- data/guide/javascript/zen_window.md +1 -0
- data/guide/zen_compared.md +1 -0
- data/lib/zen.rb +10 -12
- data/lib/zen/event.rb +2 -2
- data/lib/zen/helper/controller.rb +13 -13
- data/lib/zen/helper/message.rb +3 -3
- data/lib/zen/helper/search.rb +4 -4
- data/lib/zen/helper/stacked_aspect.rb +9 -9
- data/lib/zen/html_diff.rb +151 -0
- data/lib/zen/language.rb +9 -7
- data/lib/zen/language/translation.rb +8 -8
- data/lib/zen/markup.rb +1 -1
- data/lib/zen/migrator.rb +2 -2
- data/lib/zen/model/helper.rb +4 -4
- data/lib/zen/model/plugin/events.rb +16 -16
- data/lib/zen/package.rb +2 -2
- data/lib/zen/package/all.rb +1 -1
- data/lib/zen/package/categories/lib/categories/controller/categories.rb +4 -4
- data/lib/zen/package/categories/lib/categories/controller/category_groups.rb +4 -4
- data/lib/zen/package/categories/lib/categories/helper/category.rb +3 -3
- data/lib/zen/package/categories/lib/categories/model/category.rb +9 -9
- data/lib/zen/package/categories/lib/categories/model/category_group.rb +9 -9
- data/lib/zen/package/comments/lib/comments/controller/comments.rb +4 -4
- data/lib/zen/package/comments/lib/comments/controller/comments_form.rb +2 -2
- data/lib/zen/package/comments/lib/comments/helper/comment.rb +1 -1
- data/lib/zen/package/comments/lib/comments/model/comment.rb +13 -13
- data/lib/zen/package/custom_fields/lib/custom_fields/blue_form_parameters.rb +1 -1
- data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_groups.rb +4 -4
- data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_types.rb +6 -6
- data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_fields.rb +5 -5
- data/lib/zen/package/custom_fields/lib/custom_fields/helper/custom_field.rb +3 -3
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field.rb +9 -9
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_group.rb +9 -9
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_type.rb +9 -9
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_value.rb +8 -3
- data/lib/zen/package/custom_fields/migrations/1336171490_revisions.rb +41 -0
- data/lib/zen/package/dashboard/lib/dashboard/controller/dashboard.rb +6 -6
- data/lib/zen/package/dashboard/lib/dashboard/model/widget.rb +3 -3
- data/lib/zen/package/dashboard/lib/dashboard/widget.rb +12 -12
- data/lib/zen/package/extensions/lib/extensions/controller/extensions.rb +3 -3
- data/lib/zen/package/menus/lib/menus/controller/menu_items.rb +5 -5
- data/lib/zen/package/menus/lib/menus/controller/menus.rb +4 -4
- data/lib/zen/package/menus/lib/menus/helper/menu.rb +4 -4
- data/lib/zen/package/menus/lib/menus/model/menu.rb +11 -11
- data/lib/zen/package/menus/lib/menus/model/menu_item.rb +10 -10
- data/lib/zen/package/menus/lib/menus/public/admin/menus/js/lib/nested_sortables.js +13 -13
- data/lib/zen/package/menus/lib/menus/public/admin/menus/js/menu_items.js +1 -1
- data/lib/zen/package/sections/lib/sections.rb +19 -0
- data/lib/zen/package/sections/lib/sections/controller/revisions.rb +184 -0
- data/lib/zen/package/sections/lib/sections/controller/section_entries.rb +5 -5
- data/lib/zen/package/sections/lib/sections/controller/sections.rb +9 -6
- data/lib/zen/package/sections/lib/sections/helper/revision.rb +124 -0
- data/lib/zen/package/sections/lib/sections/helper/section.rb +17 -15
- data/lib/zen/package/sections/lib/sections/helper/section_frontend.rb +104 -6
- data/lib/zen/package/sections/lib/sections/language/en/revisions.rb +34 -0
- data/lib/zen/package/sections/lib/sections/language/en/sections.rb +1 -0
- data/lib/zen/package/sections/lib/sections/language/nl/revisions.rb +35 -0
- data/lib/zen/package/sections/lib/sections/language/nl/sections.rb +1 -0
- data/lib/zen/package/sections/lib/sections/model/revision.rb +76 -0
- data/lib/zen/package/sections/lib/sections/model/section.rb +9 -9
- data/lib/zen/package/sections/lib/sections/model/section_entry.rb +47 -12
- data/lib/zen/package/sections/lib/sections/view/admin/revisions/index.xhtml +89 -0
- data/lib/zen/package/sections/lib/sections/view/admin/section-entries/form.xhtml +1 -1
- data/lib/zen/package/sections/lib/sections/view/admin/section-entries/index.xhtml +14 -0
- data/lib/zen/package/sections/migrations/1335711557_revisions.rb +40 -0
- data/lib/zen/package/settings/lib/settings/controller/settings.rb +12 -4
- data/lib/zen/package/settings/lib/settings/setting.rb +6 -6
- data/lib/zen/package/users/lib/users/controller/user_groups.rb +4 -4
- data/lib/zen/package/users/lib/users/controller/users.rb +12 -12
- data/lib/zen/package/users/lib/users/helper/access.rb +1 -1
- data/lib/zen/package/users/lib/users/helper/acl.rb +4 -4
- data/lib/zen/package/users/lib/users/helper/users.rb +2 -2
- data/lib/zen/package/users/lib/users/model/permission.rb +1 -1
- data/lib/zen/package/users/lib/users/model/user.rb +11 -11
- data/lib/zen/package/users/lib/users/model/user_group.rb +9 -9
- data/lib/zen/package/users/lib/users/model/user_status.rb +2 -2
- data/lib/zen/public/admin/zen/css/general.css +54 -0
- data/lib/zen/public/admin/zen/css/messages.css +6 -3
- data/lib/zen/public/admin/zen/css/tables.css +10 -0
- data/lib/zen/public/admin/zen/images/icons/undo.png +0 -0
- data/lib/zen/public/admin/zen/js/lib/autosave.js +8 -8
- data/lib/zen/public/admin/zen/js/lib/base.js +2 -2
- data/lib/zen/public/admin/zen/js/lib/events.js +2 -2
- data/lib/zen/public/admin/zen/js/lib/form.js +7 -7
- data/lib/zen/public/admin/zen/js/lib/hash.js +7 -7
- data/lib/zen/public/admin/zen/js/lib/tabs.js +3 -3
- data/lib/zen/public/admin/zen/js/lib/window.js +1 -1
- data/lib/zen/security.rb +2 -2
- data/lib/zen/spec/helper.rb +3 -9
- data/lib/zen/spec/helper/capybara.rb +4 -4
- data/lib/zen/spec/helper/general.rb +1 -1
- data/lib/zen/spec/simplecov.rb +1 -5
- data/lib/zen/task/build.rake +22 -16
- data/lib/zen/task/db.rake +3 -2
- data/lib/zen/task/spelling.rake +10 -10
- data/lib/zen/task/test.rake +27 -19
- data/lib/zen/theme.rb +6 -6
- data/lib/zen/version.rb +1 -1
- data/spec/zen/all.rb +4 -0
- data/spec/zen/package/sections/controller/revisions.rb +235 -0
- data/spec/zen/package/sections/model/revision.rb +76 -0
- data/zen.gemspec +23 -21
- metadata +88 -29
- data/lib/zen/model/methods.rb +0 -27
- data/lib/zen/task/clean.rake +0 -20
- data/lib/zen/task/setup.rake +0 -4
- data/pkg/.gitkeep +0 -0
data/README.md
CHANGED
@@ -78,6 +78,7 @@ small portion of what it can do.
|
|
78
78
|
* {Sections Sections & Section Entries}
|
79
79
|
* {Sections::Controller::Sections Managing Sections}
|
80
80
|
* {Sections::Controller::SectionEntries Managing Section Entries}
|
81
|
+
* {Sections::Controller::Revisions Managing And Restoring Revisions}
|
81
82
|
* {Ramaze::Helper::SectionFrontend#get_entries Section Entries & Templates}
|
82
83
|
* {Settings}
|
83
84
|
* {Settings::Controller::Settings Managing Settings}
|
@@ -96,17 +97,18 @@ small portion of what it can do.
|
|
96
97
|
* {Zen::Event Events}
|
97
98
|
* {Zen::Validation Validating Objects}
|
98
99
|
* {Zen::Security.sanitize Sanitizing User Input}
|
99
|
-
* {file:autosaving_forms Automatically Saving Form Data}
|
100
100
|
* {Ramaze::Helper::Locale Working With Dates}
|
101
|
-
* {file:asset_management Asset Management}
|
102
101
|
* {Zen::Markup Converting Markup}
|
102
|
+
* {Zen::HTMLDiff Generating Diffs}
|
103
|
+
* {file:autosaving_forms Automatically Saving Form Data}
|
104
|
+
* {file:asset_management Asset Management}
|
103
105
|
* {file:javascript Javascript API}
|
104
106
|
|
105
107
|
## Community
|
106
108
|
|
107
109
|
* [Website][zen website]
|
108
110
|
* [Mailing list][mailing list]
|
109
|
-
* IRC channel: \#zen
|
111
|
+
* IRC channel: \#zen on Freenode
|
110
112
|
|
111
113
|
## Websites Using Zen
|
112
114
|
|
data/Rakefile
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
Zen::Gemspec = Gem::Specification.load(
|
4
|
-
File.expand_path('../zen.gemspec', __FILE__)
|
5
|
-
)
|
1
|
+
require 'rubygems/package_task'
|
6
2
|
|
7
3
|
task_path = File.expand_path('../lib/zen/task', __FILE__)
|
8
|
-
tasks = ['build', '
|
4
|
+
tasks = ['build', 'proto', 'test', 'spelling']
|
5
|
+
GEMSPEC = Gem::Specification.load('zen.gemspec')
|
9
6
|
|
10
7
|
tasks.each do |task|
|
11
8
|
import File.join(task_path, "#{task}.rake")
|
12
9
|
end
|
10
|
+
|
11
|
+
Gem::PackageTask.new(GEMSPEC) do |pkg|
|
12
|
+
pkg.need_tar = false
|
13
|
+
pkg.need_zip = false
|
14
|
+
end
|
data/bin/zen
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'ramaze'
|
3
|
+
require 'shebang'
|
3
4
|
|
4
|
-
|
5
|
-
gem 'shebang', ['~> 0.1']
|
6
|
-
end
|
7
|
-
|
8
|
-
unless $LOAD_PATH.include?(__DIR__('../lib'))
|
9
|
-
$LOAD_PATH.unshift(__DIR__('../lib'))
|
10
|
-
end
|
5
|
+
$:.unshift(__DIR__('../lib')) unless $:.include?(__DIR__('../lib'))
|
11
6
|
|
12
7
|
require 'zen/version'
|
13
8
|
require 'zen/bin/create'
|
data/guide/asset_management.md
CHANGED
data/guide/autosaving_forms.md
CHANGED
data/guide/changelog.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
|
+
# @title Changelog
|
1
2
|
# Changelog
|
2
3
|
|
4
|
+
## 0.4.3 - June 10th, 2012
|
5
|
+
|
6
|
+
* Fixed various YARD warnings.
|
7
|
+
* Updated the version requirement of Rake.
|
8
|
+
* Simplified the loading of Gems.
|
9
|
+
* Added pg and mysql2 to the gemspec.
|
10
|
+
* Fixed the task for building Gems.
|
11
|
+
* Load specific Ramaze versions.
|
12
|
+
* Updated various version requirements.
|
13
|
+
* Expanded the documentation of `get_entries()`.
|
14
|
+
* Changed `@since` date formats to Y-m-d.
|
15
|
+
* Fixed a minor formatting issue for `get_entries()`.
|
16
|
+
* `:field_values` was renamed to `:custom_field_values`.
|
17
|
+
* Small style changes for messages.
|
18
|
+
* Removed `Sequel::Model.pk_hash`.
|
19
|
+
* Redirect to the dashboard for invalid searches.
|
20
|
+
* Re-organized some parts of the developer guide.
|
21
|
+
* Replaced Raspell with `FFI::Aspell`.
|
22
|
+
* Ability to compare section entry revisions and restore specific revisions.
|
23
|
+
* Escape underscores in Markdown text.
|
24
|
+
|
3
25
|
## 0.4.2 - April 16th, 2012
|
4
26
|
|
5
27
|
* Bugfix for rendering menu items in the backend. Due to a typo the menu items
|
data/guide/faq.md
CHANGED
data/guide/getting_started.md
CHANGED
data/guide/hacking.md
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/guide/installation.md
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# @title Installation
|
1
2
|
# Installation
|
2
3
|
|
3
4
|
Zen can be installed in two different ways, either by using Rubygems or Git. The
|
@@ -11,7 +12,7 @@ your terminal:
|
|
11
12
|
|
12
13
|
$ gem install zen
|
13
14
|
|
14
|
-
If you want to install a specific version of Zen you can provide the
|
15
|
+
If you want to install a specific version of Zen you can provide the `-v`
|
15
16
|
option:
|
16
17
|
|
17
18
|
$ gem install zen -v [VERSION]
|
@@ -28,8 +29,8 @@ be done by a simply cloning the repository:
|
|
28
29
|
|
29
30
|
$ git clone git://github.com/zen-cms/Zen-Core.git zen_core
|
30
31
|
|
31
|
-
This command saves a local copy of Zen in the directory
|
32
|
-
have a local copy there are two ways of using it:
|
32
|
+
This command saves a local copy of Zen in the directory `./zen_core`. Now that
|
33
|
+
you have a local copy there are two ways of using it:
|
33
34
|
|
34
35
|
1. Manually build the Gem each time you've made a change.
|
35
36
|
2. Directly load the Zen installation from your application.
|
data/guide/javascript.md
CHANGED
data/guide/zen_compared.md
CHANGED
data/lib/zen.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
require 'ramaze'
|
2
1
|
require 'json'
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
2
|
+
require 'ramaze'
|
3
|
+
require 'sequel'
|
4
|
+
require 'bcrypt'
|
5
|
+
require 'loofah'
|
6
|
+
require 'ramaze/asset'
|
7
|
+
require 'diff-lcs'
|
10
8
|
|
11
9
|
$:.unshift(__DIR__) unless $:.include?(__DIR__)
|
12
10
|
|
@@ -21,7 +19,7 @@ module Zen
|
|
21
19
|
# Array containing all the translations that should be made available to the
|
22
20
|
# Javascript code.
|
23
21
|
#
|
24
|
-
# @since
|
22
|
+
# @since 2012-02-19
|
25
23
|
#
|
26
24
|
JAVASCRIPT_TRANSLATIONS = [
|
27
25
|
'zen_general.buttons.bold',
|
@@ -73,13 +71,12 @@ module Zen
|
|
73
71
|
# Sets the database connection to use and loads the core packages provided
|
74
72
|
# by Zen.
|
75
73
|
#
|
76
|
-
# @since
|
74
|
+
# @since 2012-03-27
|
77
75
|
#
|
78
76
|
def database=(database)
|
79
77
|
@database = database
|
80
78
|
|
81
79
|
require 'zen/model/init'
|
82
|
-
require 'zen/model/methods'
|
83
80
|
require 'zen/package/all'
|
84
81
|
end
|
85
82
|
|
@@ -87,7 +84,7 @@ module Zen
|
|
87
84
|
# Prepares Zen for the party of its life.
|
88
85
|
#
|
89
86
|
# @since 0.3
|
90
|
-
# @event
|
87
|
+
# @event post\_start Event that is fired after all packages have been loaded,
|
91
88
|
# the cache has been set up, etc. This event is called at the very end of
|
92
89
|
# the method.
|
93
90
|
#
|
@@ -213,6 +210,7 @@ require 'zen/package'
|
|
213
210
|
require 'zen/theme'
|
214
211
|
require 'zen/security'
|
215
212
|
require 'zen/migrator'
|
213
|
+
require 'zen/html_diff'
|
216
214
|
|
217
215
|
# Load all the base controllers
|
218
216
|
require 'zen/controller/base_controller'
|
data/lib/zen/event.rb
CHANGED
@@ -66,7 +66,7 @@ module Zen
|
|
66
66
|
#
|
67
67
|
# @since 0.3
|
68
68
|
# @param [#to_sym] event The name of the event to invoke.
|
69
|
-
# @param [Array]
|
69
|
+
# @param [Array] args An array of arguments to pass to each event.
|
70
70
|
#
|
71
71
|
def call(event, *args)
|
72
72
|
event = event.to_sym
|
@@ -105,7 +105,7 @@ module Zen
|
|
105
105
|
# Zen::Event.delete(:before_new_user, :after_new_user)
|
106
106
|
#
|
107
107
|
# @since 0.3
|
108
|
-
# @param [Array]
|
108
|
+
# @param [Array] names The names of the events to remove. Each name
|
109
109
|
# should be a symbol or something that responds to #to_sym().
|
110
110
|
#
|
111
111
|
def delete(*names)
|
@@ -21,7 +21,7 @@ module Ramaze
|
|
21
21
|
# Returns an anchor tag that points towards the URL that allows users to
|
22
22
|
# manage collections of data.
|
23
23
|
#
|
24
|
-
# @since
|
24
|
+
# @since 2011-12-17
|
25
25
|
# @see Ramaze::Helper::Controller#edit_link
|
26
26
|
# @return [String]
|
27
27
|
#
|
@@ -33,7 +33,7 @@ module Ramaze
|
|
33
33
|
# Returns an anchor tag that should point to a form that allows users to
|
34
34
|
# edit certain resources.
|
35
35
|
#
|
36
|
-
# @since
|
36
|
+
# @since 2011-12-17
|
37
37
|
# @param [#to_s] url The URL for the link.
|
38
38
|
# @param [#to_s] text The text to display in the link tag.
|
39
39
|
# @return [String]
|
@@ -46,7 +46,7 @@ module Ramaze
|
|
46
46
|
# Returns a button that should point to a form that allows users to create
|
47
47
|
# new resources.
|
48
48
|
#
|
49
|
-
# @since
|
49
|
+
# @since 2011-12-17
|
50
50
|
# @see Ramaze::Helper::Controller#edit_link
|
51
51
|
#
|
52
52
|
def new_button(url, text)
|
@@ -56,7 +56,7 @@ module Ramaze
|
|
56
56
|
##
|
57
57
|
# Returns a button that when clicked should delete a set of resources.
|
58
58
|
#
|
59
|
-
# @since
|
59
|
+
# @since 2011-12-17
|
60
60
|
# @param [String] text The text to display on the button.
|
61
61
|
# @return [String]
|
62
62
|
#
|
@@ -69,7 +69,7 @@ module Ramaze
|
|
69
69
|
# Checks if a given object can be paginated and the page count is greater
|
70
70
|
# than 1. If this is the case then the pagination links are displayed.
|
71
71
|
#
|
72
|
-
# @since
|
72
|
+
# @since 2011-12-17
|
73
73
|
# @param [Mixed] object
|
74
74
|
# @return [String]
|
75
75
|
#
|
@@ -84,7 +84,7 @@ module Ramaze
|
|
84
84
|
# values can be returned:
|
85
85
|
#
|
86
86
|
# * firefox
|
87
|
-
# *
|
87
|
+
# * internet\_explorer
|
88
88
|
# * chrome
|
89
89
|
# * safari
|
90
90
|
# * other
|
@@ -92,7 +92,7 @@ module Ramaze
|
|
92
92
|
# Note that this method does a very simple check and thus should not be
|
93
93
|
# relied on for anything mission critical.
|
94
94
|
#
|
95
|
-
# @since
|
95
|
+
# @since 2011-12-23
|
96
96
|
# @param [String] agent String containing the user agent to check, set to
|
97
97
|
# ``request.env['HTTP_USER_AGENT']`` if no custom agent is specified.
|
98
98
|
# @return [String]
|
@@ -124,7 +124,7 @@ module Ramaze
|
|
124
124
|
##
|
125
125
|
# Writes a JSON response.
|
126
126
|
#
|
127
|
-
# @since
|
127
|
+
# @since 2012-02-13
|
128
128
|
# @param [Mixed] data The response data.
|
129
129
|
# @param [Fixnum] status The HTTP status code.
|
130
130
|
#
|
@@ -136,8 +136,8 @@ module Ramaze
|
|
136
136
|
# Returns a hash containing all the given POST fields, similar to
|
137
137
|
# ``Innate::Request#subset``.
|
138
138
|
#
|
139
|
-
# @since
|
140
|
-
# @param [Array]
|
139
|
+
# @since 2012-02-19
|
140
|
+
# @param [Array] keys The POST keys to retrieve.
|
141
141
|
# @return [Hash]
|
142
142
|
#
|
143
143
|
def post_fields(*keys)
|
@@ -150,7 +150,7 @@ module Ramaze
|
|
150
150
|
# Returns a JSON string containing all the translations for the Javascript
|
151
151
|
# code.
|
152
152
|
#
|
153
|
-
# @since
|
153
|
+
# @since 2012-02-19
|
154
154
|
# @return [String]
|
155
155
|
#
|
156
156
|
def javascript_translations
|
@@ -199,7 +199,7 @@ module Ramaze
|
|
199
199
|
# end
|
200
200
|
#
|
201
201
|
# @since 0.3
|
202
|
-
# @param [Array]
|
202
|
+
# @param [Array] actions An array of action names to protect against
|
203
203
|
# CSRF attacks.
|
204
204
|
#
|
205
205
|
def csrf_protection(*actions)
|
@@ -231,7 +231,7 @@ module Ramaze
|
|
231
231
|
# [:name, :description],
|
232
232
|
# :edit_category_group
|
233
233
|
#
|
234
|
-
# @since
|
234
|
+
# @since 2012-02-13
|
235
235
|
# @param [Class] model The model to use for saving data.
|
236
236
|
# @param [Array] columns The columns that can be saved.
|
237
237
|
# @param [#to_sym] permission The permission required for saving
|
data/lib/zen/helper/message.rb
CHANGED
@@ -21,13 +21,13 @@ module Ramaze
|
|
21
21
|
#
|
22
22
|
# This will create and return the HTML for all the messages.
|
23
23
|
#
|
24
|
-
# @since
|
24
|
+
# @since 2011-05-26
|
25
25
|
#
|
26
26
|
module Message
|
27
27
|
##
|
28
28
|
# Adds a new message to the list for the given type.
|
29
29
|
#
|
30
|
-
# @since
|
30
|
+
# @since 2011-05-26
|
31
31
|
# @param [Symbol/String] type The type of message to store (e.g. "error").
|
32
32
|
# @param [String] message The message to display.
|
33
33
|
#
|
@@ -44,7 +44,7 @@ module Ramaze
|
|
44
44
|
##
|
45
45
|
# Renders all the messages for the specified types.
|
46
46
|
#
|
47
|
-
# @since
|
47
|
+
# @since 2011-05-26
|
48
48
|
# @param [Array] types Array containing all the messages to render.
|
49
49
|
#
|
50
50
|
def display_messages(types = [:info, :error, :success])
|
data/lib/zen/helper/search.rb
CHANGED
@@ -4,13 +4,13 @@ module Ramaze
|
|
4
4
|
# The Search helper is a helper that can be used in controllers allowing the
|
5
5
|
# user to search the content of those controllers and models.
|
6
6
|
#
|
7
|
-
# @since
|
7
|
+
# @since 2011-10-16
|
8
8
|
#
|
9
9
|
module Search
|
10
10
|
##
|
11
11
|
# Renders a search form that points to the given URL.
|
12
12
|
#
|
13
|
-
# @since
|
13
|
+
# @since 2011-10-16
|
14
14
|
# @param [#to_s] url The URL to point the search form to.
|
15
15
|
# @return [String]
|
16
16
|
#
|
@@ -33,7 +33,7 @@ module Ramaze
|
|
33
33
|
# Sections::Model::Section.search(query)
|
34
34
|
# end
|
35
35
|
#
|
36
|
-
# @since
|
36
|
+
# @since 2011-10-16
|
37
37
|
# @return [NilClass|Mixed]
|
38
38
|
#
|
39
39
|
def search
|
@@ -46,7 +46,7 @@ module Ramaze
|
|
46
46
|
rescue => e
|
47
47
|
Ramaze::Log.error(e)
|
48
48
|
message(:error, lang('zen_general.errors.invalid_search'))
|
49
|
-
redirect_referrer(::
|
49
|
+
redirect_referrer(Dashboard::Controller::Dashboard.r(:index))
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end # Search
|