weeler 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.rspec +1 -1
- data/.travis.yml +7 -2
- data/CHANGELOG.md +149 -1
- data/LICENSE.txt +2 -2
- data/README.md +83 -1
- data/app/.DS_Store +0 -0
- data/app/assets/javascripts/weeler/init.js.coffee +13 -2
- data/app/assets/javascripts/weeler/lib/notify.js +18 -0
- data/app/assets/javascripts/weeler/lib/sortable.js +9 -0
- data/app/assets/stylesheets/weeler/init.css.erb +2 -1
- data/app/assets/stylesheets/weeler/style.css.scss +22 -0
- data/app/controllers/concerns/weeler/section_seo.rb +16 -0
- data/app/controllers/weeler/administration_controller.rb +11 -0
- data/app/controllers/weeler/application_controller.rb +5 -0
- data/app/controllers/weeler/base_controller.rb +16 -12
- data/app/controllers/weeler/configuration_controller.rb +9 -0
- data/app/controllers/weeler/content_controller.rb +12 -0
- data/app/controllers/weeler/home_controller.rb +5 -2
- data/app/controllers/weeler/seo_items_controller.rb +24 -0
- data/app/controllers/weeler/settings_controller.rb +21 -0
- data/app/controllers/weeler/static_sections_controller.rb +19 -0
- data/app/controllers/weeler/translations_controller.rb +36 -18
- data/app/models/concerns/weeler/seoable.rb +61 -0
- data/app/models/concerns/weeler/sluger.rb +32 -0
- data/app/models/settings.rb +2 -0
- data/app/models/weeler/seo.rb +9 -0
- data/app/views/kaminari/{_first_page.html.erb → weeler/_first_page.html.erb} +1 -1
- data/app/views/kaminari/{_gap.html.erb → weeler/_gap.html.erb} +1 -1
- data/app/views/kaminari/{_last_page.html.erb → weeler/_last_page.html.erb} +1 -1
- data/app/views/kaminari/{_next_page.html.erb → weeler/_next_page.html.erb} +1 -1
- data/app/views/kaminari/{_page.html.erb → weeler/_page.html.erb} +0 -0
- data/app/views/kaminari/{_paginator.html.erb → weeler/_paginator.html.erb} +1 -1
- data/app/views/kaminari/{_prev_page.html.erb → weeler/_prev_page.html.erb} +1 -1
- data/app/views/layouts/weeler/base.html.haml +22 -0
- data/{lib/generators/weeler/templates/views/weeler/example/index.html.erb → app/views/weeler/administration/_filter.html.haml} +0 -0
- data/app/views/weeler/administration/_header_row.html.haml +5 -0
- data/app/views/weeler/administration/_row.html.haml +5 -0
- data/app/views/weeler/administration/_side_navbar.html.haml +8 -0
- data/app/views/weeler/administration/index.html.haml +17 -0
- data/app/views/weeler/administration/welcome.html.haml +5 -0
- data/app/views/weeler/base/_flash.html.haml +3 -0
- data/app/views/weeler/base/_footer.html.haml +2 -0
- data/app/views/weeler/base/_header_navbar.html.haml +19 -0
- data/app/views/weeler/base/_side_navbar.html.haml +2 -0
- data/app/views/weeler/configuration/_side_navbar.html.haml +12 -0
- data/app/views/weeler/configuration/index.html.haml +3 -0
- data/app/views/weeler/content/_error_messages.html.haml +5 -0
- data/app/views/weeler/content/_form.html.haml +6 -0
- data/app/views/weeler/content/_list.html.haml +23 -0
- data/app/views/weeler/content/_object_seo.html.haml +31 -0
- data/app/views/weeler/content/_side_navbar.html.haml +17 -0
- data/app/views/weeler/content/_sortable_list.html.haml +24 -0
- data/app/views/weeler/content/edit.html.haml +2 -0
- data/app/views/weeler/content/index.html.haml +10 -0
- data/app/views/weeler/content/new.html.haml +2 -0
- data/app/views/weeler/content/welcome.html.haml +3 -0
- data/app/views/weeler/home/_side_navbar.html.haml +8 -0
- data/app/views/weeler/home/about.html.haml +15 -0
- data/app/views/weeler/home/index.html.haml +3 -0
- data/app/views/weeler/seo_items/edit.html.haml +28 -0
- data/app/views/weeler/seo_items/index.html.haml +15 -0
- data/app/views/weeler/settings/index.html.haml +19 -0
- data/app/views/weeler/static_sections/show.html.haml +26 -0
- data/app/views/weeler/translations/_form.html.haml +27 -0
- data/app/views/weeler/translations/_translation.html.haml +11 -0
- data/app/views/weeler/translations/edit.html.haml +14 -0
- data/app/views/weeler/translations/index.html.haml +76 -0
- data/app/views/weeler/translations/new.html.haml +13 -0
- data/lib/.DS_Store +0 -0
- data/lib/generators/weeler/.DS_Store +0 -0
- data/lib/generators/weeler/install_generator.rb +30 -26
- data/lib/generators/weeler/templates/assets/javascripts/weeler/app/index.js +2 -0
- data/lib/generators/weeler/templates/assets/stylesheets/weeler/app/index.css +4 -0
- data/lib/generators/weeler/templates/controllers/weeler/application_controller.rb +6 -0
- data/lib/generators/weeler/templates/initializers/weeler.rb +30 -2
- data/lib/generators/weeler/templates/migrations/create_weeler_seos.rb +14 -0
- data/lib/generators/weeler/templates/migrations/create_weeler_settings.rb +17 -0
- data/lib/generators/weeler/templates/migrations/translate_weeler_seos.rb +15 -0
- data/lib/generators/weeler/templates/views/weeler/.keep +0 -0
- data/lib/i18n/backend/weeler.rb +102 -22
- data/lib/i18n/backend/weeler/dedupe.rb +31 -0
- data/lib/i18n/backend/weeler/exporter.rb +67 -5
- data/lib/i18n/backend/weeler/html_checker.rb +41 -0
- data/lib/i18n/backend/weeler/importer.rb +30 -13
- data/lib/i18n/backend/weeler/translation.rb +12 -7
- data/lib/i18n/humanize_missing_translations.rb +1 -0
- data/lib/i18n/weeler.rb +8 -2
- data/lib/tasks/weeler.rake +8 -0
- data/lib/weeler.rb +80 -7
- data/lib/weeler/.DS_Store +0 -0
- data/lib/weeler/action_controller/acts/restful.rb +185 -0
- data/lib/weeler/action_dispatch/routing/mapper.rb +87 -0
- data/lib/weeler/action_view/helpers/form_helper.rb +13 -0
- data/lib/weeler/action_view/helpers/image_form_helper.rb +84 -0
- data/lib/weeler/action_view/helpers/translation_helper.rb +15 -0
- data/lib/weeler/deprecator.rb +9 -0
- data/lib/weeler/engine.rb +18 -4
- data/lib/weeler/version.rb +7 -1
- data/rspec.html +426 -147
- data/spec/.DS_Store +0 -0
- data/spec/controllers/translations_controller_spec.rb +76 -5
- data/spec/dummy/app/controllers/weeler/posts_controller.rb +3 -7
- data/spec/dummy/app/models/post.rb +17 -0
- data/spec/dummy/app/models/translation.rb +2 -0
- data/spec/dummy/config/locales/en.yml +4 -1
- data/spec/dummy/config/routes.rb +3 -3
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20140123083704_create_weeler_seos.rb +14 -0
- data/spec/dummy/db/migrate/20140123083705_create_weeler_settings.rb +17 -0
- data/spec/dummy/db/migrate/{20131015144900_create_weeler_translations.rb → 20140123083706_create_weeler_translations.rb} +0 -0
- data/spec/dummy/db/migrate/20140123083707_translate_weeler_seos.rb +15 -0
- data/spec/dummy/db/migrate/20140718103237_create_posts.rb +12 -0
- data/spec/dummy/db/migrate/20140726151210_create_translations.rb +12 -0
- data/spec/dummy/db/schema.rb +59 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +221 -0
- data/spec/factories/dummy_posts.rb +6 -0
- data/spec/fixtures/.DS_Store +0 -0
- data/spec/routing/routes_spec.rb +4 -4
- data/spec/spec_helper.rb +14 -3
- data/spec/weeler/action_controller/acts/restful_spec.rb +155 -0
- data/spec/weeler/action_view/helpers/form_helper_spec.rb +26 -0
- data/spec/weeler/action_view/helpers/translation_helper_spec.rb +16 -0
- data/spec/weeler/i18n/backend/weeler/dedupe_spec.rb +21 -0
- data/spec/weeler/i18n/backend/weeler/exporter_spec.rb +2 -4
- data/spec/weeler/i18n/backend/weeler/importer_spec.rb +5 -2
- data/spec/weeler/i18n/backend/weeler_spec.rb +121 -23
- data/weeler.gemspec +15 -7
- metadata +207 -85
- data/.DS_Store +0 -0
- data/app/assets/stylesheets/weeler/vendor/bootstrap.css +0 -6086
- data/app/views/layouts/weeler/base.html.erb +0 -40
- data/app/views/weeler/home/about.html.erb +0 -16
- data/app/views/weeler/home/index.html.erb +0 -4
- data/app/views/weeler/shared/_flash.html.erb +0 -17
- data/app/views/weeler/shared/_footer.html.erb +0 -3
- data/app/views/weeler/shared/_header_navbar.html.erb +0 -18
- data/app/views/weeler/shared/_side_navbar.html.erb +0 -14
- data/app/views/weeler/translations/_form.html.erb +0 -43
- data/app/views/weeler/translations/_translation.html.erb +0 -11
- data/app/views/weeler/translations/edit.html.erb +0 -19
- data/app/views/weeler/translations/index.html.erb +0 -103
- data/app/views/weeler/translations/new.html.erb +0 -19
- data/lib/generators/weeler/templates/controllers/weeler/example_controller.rb.example +0 -7
- data/lib/i18n/backend/weeler/exporter/active_record.rb +0 -37
- data/lib/i18n/backend/weeler/exporter/active_record_relation.rb +0 -38
- data/lib/i18n/backend/weeler/store_procs.rb +0 -39
- data/lib/weeler/route_mapper.rb +0 -41
- data/spec/dummy/db/production.sqlite3 +0 -0
- data/spec/dummy/log/test.log +0 -88454
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1af4487ad746ad1a9edba4600540de518b902417
|
4
|
+
data.tar.gz: 4a01aa97572b6426a66802ac824f6cce32d5e566
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f76fa7b4c441bc6ec0e2186467cfabad86cd52af8af928661893bff808f1028e63ec6a73235e07105f3daa29066bfc3d927090bbb9c906fd6be7605987941d5
|
7
|
+
data.tar.gz: 3e48a4e28d2d85db0568b0e733f2bd47a9a21025ee35d372cec66f3c7885af98d9f1d41f74153720dd63a52a55ab370854869e7b55d19288259837f836eb86f2
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--color
|
1
|
+
--color
|
data/.travis.yml
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- "1.9.3"
|
4
3
|
- "2.0.0"
|
4
|
+
- "2.1.0"
|
5
|
+
- "2.1.1"
|
6
|
+
- "2.1.2"
|
7
|
+
- "2.1.3"
|
8
|
+
- "2.1.4"
|
9
|
+
- "2.1.5"
|
5
10
|
# uncomment this line if your project needs to run something other than `rake`:
|
6
|
-
script: bundle exec rspec spec
|
11
|
+
script: bundle exec rspec spec
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,151 @@
|
|
1
|
+
## 1.0.0
|
2
|
+
|
3
|
+
### Features & Enhancements
|
4
|
+
|
5
|
+
* Refactored <tt>image_upload_field</tt>
|
6
|
+
* Tested on production apps.
|
7
|
+
* Add <tt>Weeler.translations</tt> method for accessing I18n translation model.
|
8
|
+
|
9
|
+
### Contributors
|
10
|
+
|
11
|
+
* Arturs Braucs
|
12
|
+
|
13
|
+
## 1.0.0.alpha3
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
* Fixed translation helper bug. No instance session (only fake one) in mailer templates.
|
18
|
+
|
19
|
+
### Contributors
|
20
|
+
|
21
|
+
* Arturs Braucs
|
22
|
+
|
23
|
+
## 1.0.0.alpha2
|
24
|
+
|
25
|
+
* Fixed a turbolinks bug
|
26
|
+
|
27
|
+
### Contributors
|
28
|
+
|
29
|
+
* Artis Raugulis
|
30
|
+
|
31
|
+
## 1.0.0.alpha1
|
32
|
+
|
33
|
+
Starting prepering for 1.0.0 version
|
34
|
+
|
35
|
+
### Features & Enhancements
|
36
|
+
* Removed <tt>globalize_fields_for</tt> implementation
|
37
|
+
* Write tests for showint translaiton keys
|
38
|
+
* Improving documentation coverage.
|
39
|
+
|
40
|
+
### Contributors
|
41
|
+
|
42
|
+
* Arturs Braucs
|
43
|
+
|
44
|
+
## 0.2.5
|
45
|
+
|
46
|
+
* Option for showing translation keys, for easier translation key lookup
|
47
|
+
|
48
|
+
### Contributors
|
49
|
+
|
50
|
+
* Arturs Braucs, Artis Raugulis
|
51
|
+
|
52
|
+
## 0.2.4
|
53
|
+
|
54
|
+
* Fixed a bug when using two words in a model name caused a missing required param
|
55
|
+
|
56
|
+
### Contributors
|
57
|
+
|
58
|
+
* Artis Raugulis
|
59
|
+
|
60
|
+
## 0.2.3
|
61
|
+
|
62
|
+
* Support for multileve seo keys
|
63
|
+
* Order by in acts as restful
|
64
|
+
* Removed unused code
|
65
|
+
* Version indicator
|
66
|
+
|
67
|
+
### Contributors
|
68
|
+
|
69
|
+
* Artis Raugulis
|
70
|
+
|
71
|
+
## 0.2.2
|
72
|
+
|
73
|
+
### Features & Enhancements
|
74
|
+
|
75
|
+
* 'acts_as_restful' - no more unpirmetted by default
|
76
|
+
|
77
|
+
### Contributors
|
78
|
+
|
79
|
+
* Arturs Braucs
|
80
|
+
|
81
|
+
## 0.2.1
|
82
|
+
|
83
|
+
### Features & Enhancements
|
84
|
+
|
85
|
+
* Remove GlobilzeFormBuilder and add globalize_fields_for in ActionView FormBuilder. Also method is depricated and will be removed in 1.0.0 version.
|
86
|
+
* Refacture Weeler image_upload_field and add some tests.
|
87
|
+
|
88
|
+
### Contributors
|
89
|
+
|
90
|
+
* Arturs Braucs
|
91
|
+
|
92
|
+
## 0.2.0
|
93
|
+
|
94
|
+
### Features & Enhancements
|
95
|
+
|
96
|
+
* Add administration section
|
97
|
+
* Refactured app section
|
98
|
+
* Create acts_as_restful
|
99
|
+
* Improve test covarage
|
100
|
+
* Refactured lib section
|
101
|
+
* Remove Newsletter section
|
102
|
+
* Weeler.menu_items -> Weeler.content_menu_items
|
103
|
+
|
104
|
+
### Contributors
|
105
|
+
|
106
|
+
* Arturs Braucs
|
107
|
+
|
108
|
+
## 0.1.2
|
109
|
+
|
110
|
+
### Bug Fixes
|
111
|
+
|
112
|
+
* Fixed routing error for Rails 4.1
|
113
|
+
|
114
|
+
### Contributors
|
115
|
+
|
116
|
+
* Arturs Braucs
|
117
|
+
|
118
|
+
## 0.1.1
|
119
|
+
|
120
|
+
### Features & Enhancements
|
121
|
+
|
122
|
+
* Cache weeler backend translations
|
123
|
+
* Exclude unused keys in translations
|
124
|
+
* Static sections
|
125
|
+
* SEO in seperate sections
|
126
|
+
|
127
|
+
### Contributors
|
128
|
+
|
129
|
+
* Arturs Braucs
|
130
|
+
|
131
|
+
## 0.1.0
|
132
|
+
|
133
|
+
### Features & Enhancements
|
134
|
+
|
135
|
+
* Improve menu item routing. Now it is possible to add item with params, custom action or scope.
|
136
|
+
* Update menu structure. Add content and configurations section.
|
137
|
+
* Add SEO module for static and dynamic SEO content.
|
138
|
+
* Add slug generator module.
|
139
|
+
* Add dynamic sort feature.
|
140
|
+
* Add error_messages, list, sortable_list, section_seo templates (must extend content controller to use those).
|
141
|
+
* Improve install generator (add assets, migrations for SEO). Also add SEO generator.
|
142
|
+
* Append weeler assets to precompile path.
|
143
|
+
* Adds existing fallback backend translation data in database (I18n::Backend::Weeler)
|
144
|
+
|
145
|
+
### Contributors
|
146
|
+
|
147
|
+
* Arturs Braucs
|
148
|
+
|
1
149
|
## 0.0.4
|
2
150
|
|
3
151
|
### Features & Enhancements
|
@@ -65,4 +213,4 @@ Translations not tested yet
|
|
65
213
|
|
66
214
|
### Contributors
|
67
215
|
|
68
|
-
* Arturs Braucs
|
216
|
+
* Arturs Braucs
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2014 Artūrs Braučs, Artis Raugulis
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -21,9 +21,91 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
$ gem install weeler
|
23
23
|
|
24
|
+
|
25
|
+
## Setup
|
26
|
+
|
27
|
+
Run weeler generator:
|
28
|
+
|
29
|
+
$ rails g weeler:install
|
30
|
+
|
31
|
+
It will generate:
|
32
|
+
* weeler.rb setting file in config/initializers folder;
|
33
|
+
* migrations for translation, settings and object seos;
|
34
|
+
* application_controller.rb in weeler controller scope. It is the parent controller of all weeler controllers;
|
35
|
+
* assets in lib/assets for modify, append new javascript or style for weeler backend.
|
36
|
+
|
37
|
+
And then migrate database:
|
38
|
+
|
39
|
+
$ rake db:migrate
|
40
|
+
|
24
41
|
## Usage
|
25
42
|
|
26
|
-
|
43
|
+
### Adding controllers and views
|
44
|
+
|
45
|
+
Create controllers and views in <tt>app/controller/weeler</tt> and <tt>app/view/weeler</tt> and then add routes in <tt>mount_weeler_at</tt> block in <tt>config/routes.rb</tt> file. There is no limitation or DCL for that. Also you need to extend at least <tt>Weeler::BaseController</tt> if you expect that weeler work as expected.
|
46
|
+
|
47
|
+
### Menu
|
48
|
+
|
49
|
+
If you want your controller work under menu section, you should extend one of:
|
50
|
+
* <tt>Weeler::AdministrationController</tt> - for administration section;
|
51
|
+
* <tt>Weeler::ContentController</tt> - for content section;
|
52
|
+
|
53
|
+
Then you should append <tt>config.content_menu_items</tt> or <tt>config.administration_menu_items</tt> array with hash that contains: <tt>name</tt> for submenu name and <tt>weeler_path</tt> as string for relative weeler path. E.g.:
|
54
|
+
|
55
|
+
config.content_menu_items = [
|
56
|
+
{name: "Posts", weeler_path: "posts"},
|
57
|
+
{name: "Post comments", weeler_path: "comments"}
|
58
|
+
]
|
59
|
+
|
60
|
+
### acts_as_restful
|
61
|
+
|
62
|
+
Weeler action controller method.
|
63
|
+
It creates all restful actions for action controller. Create a controller for your
|
64
|
+
model (e.g. Post) what you want to administrate in weeler. Add method <tt>acts_as_restful Post</tt>
|
65
|
+
and permit params for your resource - option <tt>permit_params</tt>. Also you can paginate - add
|
66
|
+
option <tt>paginate</tt>
|
67
|
+
e.g.
|
68
|
+
|
69
|
+
class Weeler::PostController < Weeler::ContentController
|
70
|
+
acts_as_restful Post, permit_params: [:title, :body], paginate: 50
|
71
|
+
end
|
72
|
+
|
73
|
+
It will handle <tt>:index</tt>, <tt>:new</tt>, <tt>:edit</tt>, <tt>:update</tt>,
|
74
|
+
<tt>:destroy</tt>, <tt>:order</tt>, <tt>:activation</tt> and <tt>:remove_image</tt> actions
|
75
|
+
|
76
|
+
For permiting custom by role or permiting all params (permit!),
|
77
|
+
you must add block <tt>permit_params: -> (params) { params.require(:post).permit! }</tt>
|
78
|
+
|
79
|
+
You should implement form file with your own active record attributes.
|
80
|
+
To do that, create <tt>_form.html.haml</tt> in <tt>views/weeler/_YOUR_RESOURCE_/_form.html.haml</tt>
|
81
|
+
where <tt>_YOUR_RESOURCE_</tt> is name of your resource.
|
82
|
+
|
83
|
+
Also you can override all standart restful action view and implement, if you need,
|
84
|
+
<tt>_filter.html.haml</tt>
|
85
|
+
|
86
|
+
### View partials for restful controllers:
|
87
|
+
|
88
|
+
Weeler have default views for index, new, edit actions. You should override <tt>_form.html.haml</tt> partial.
|
89
|
+
|
90
|
+
### View helper image_upload_field :
|
91
|
+
|
92
|
+
Weeler action view helper method.
|
93
|
+
It creates file upload field with info and preview for image.
|
94
|
+
|
95
|
+
e.g.
|
96
|
+
|
97
|
+
<%= f.image_upload_field :image, size_info: "270x294" %>
|
98
|
+
|
99
|
+
It creates:
|
100
|
+
|
101
|
+
<div class="col-lg-10 col-md-10">
|
102
|
+
<label class="col-lg-2 col-md-2 control-label" for="object_image">Image</label><div class="col-lg-5 col-md-5"><div class="row"><div class="col-lg-12 col-md-12"><input class="form-control" id="object_image" name="object[image]" type="file"></div></div><div class="row"><div class="col-lg-12 col-md-12">Size should be 270x294</div></div></div><div class="col-lg-5 col-md-5"><div class="row"><div class="col-lg-12 col-md-12"><img alt="Name" src="/images/name.jpg" style="height: 80px;"></div></div></div>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
If you use another image handler than Paperclip, you can also pass <tt>image_url_method</tt> for image preview.
|
106
|
+
|
107
|
+
Also with remove_image action in controller and route for that,
|
108
|
+
it removes only image from object.
|
27
109
|
|
28
110
|
## Contributing
|
29
111
|
|
data/app/.DS_Store
CHANGED
Binary file
|
@@ -1,8 +1,19 @@
|
|
1
1
|
#= require jquery
|
2
|
+
#= require jquery-ui
|
2
3
|
#= require jquery_ujs
|
3
|
-
#=
|
4
|
+
#= require turbolinks
|
5
|
+
#= require_tree ./vendor
|
6
|
+
#= require_tree ./lib
|
4
7
|
#= require weeler/app
|
5
8
|
#= require_self
|
6
9
|
|
10
|
+
app = {
|
11
|
+
boot: () ->
|
12
|
+
$('.weeler-file-inputs').bootstrapFileInput()
|
13
|
+
sortable.init()
|
14
|
+
$('[data-provide="rowlink"],[data-provides="rowlink"]').each () ->
|
15
|
+
$(this).rowlink($(this).data())
|
16
|
+
}
|
17
|
+
|
7
18
|
$(document).ready () ->
|
8
|
-
|
19
|
+
app.boot()
|
@@ -0,0 +1,18 @@
|
|
1
|
+
var notify = {
|
2
|
+
notice: null,
|
3
|
+
show: function(name, message) {
|
4
|
+
$(function(){
|
5
|
+
$.pnotify({
|
6
|
+
type: name, // 'notice', 'info', 'success', 'error'
|
7
|
+
title: name,
|
8
|
+
text: message,
|
9
|
+
styling: 'bootstrap',
|
10
|
+
shadow: false,
|
11
|
+
animation: 'fade',
|
12
|
+
closer: true,
|
13
|
+
history: false,
|
14
|
+
auto_display: true
|
15
|
+
})
|
16
|
+
});
|
17
|
+
}
|
18
|
+
}
|
@@ -56,4 +56,26 @@ footer {
|
|
56
56
|
top: 0;
|
57
57
|
width: 50%; /* 6 columns */
|
58
58
|
}
|
59
|
+
}
|
60
|
+
|
61
|
+
/*
|
62
|
+
* List
|
63
|
+
* ----------
|
64
|
+
*
|
65
|
+
*/
|
66
|
+
.sortable.list-group {
|
67
|
+
.list-group-item {
|
68
|
+
cursor: move;
|
69
|
+
min-height: 42px;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
a.navbar-brand.weeler{
|
74
|
+
padding-bottom:3px;
|
75
|
+
color:#fff;
|
76
|
+
}
|
77
|
+
span.weeler_version{
|
78
|
+
vertical-align: super;
|
79
|
+
font-size:10px;
|
80
|
+
color:#C2C2C2;
|
59
81
|
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Weeler
|
2
|
+
module SectionSeo
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
before_filter :initialize_seo_for_section
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def initialize_seo_for_section
|
12
|
+
@seo = Weeler::Seo.find_or_create_by section: controller_name
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -1,16 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
before_filter :run_weeler_required_user_method
|
1
|
+
class Weeler::BaseController < Weeler::ApplicationController
|
2
|
+
before_filter :set_current_menu_item
|
3
|
+
before_filter :run_weeler_required_user_method
|
5
4
|
|
6
|
-
|
5
|
+
protected
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def default_url_options(options={})
|
8
|
+
{}
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def set_current_menu_item
|
14
|
+
@current_menu_item = "content"
|
15
|
+
end
|
11
16
|
|
12
|
-
|
13
|
-
|
14
|
-
end
|
17
|
+
def run_weeler_required_user_method
|
18
|
+
eval(Weeler.required_user_method.to_s) if Weeler.required_user_method.present?
|
15
19
|
end
|
16
|
-
end
|
20
|
+
end
|