etabliocms_core 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +38 -0
  4. data/app/assets/images/admin/background-heading.png +0 -0
  5. data/app/assets/images/admin/background-main.gif +0 -0
  6. data/app/assets/images/admin/background-sidebar-bottom.png +0 -0
  7. data/app/assets/images/admin/background-sidebar-item.png +0 -0
  8. data/app/assets/images/admin/background-sidebar-top.png +0 -0
  9. data/app/assets/images/admin/background-sidebar.png +0 -0
  10. data/app/assets/images/admin/background-th.png +0 -0
  11. data/app/assets/images/admin/background.gif +0 -0
  12. data/app/assets/images/admin/bullet.gif +0 -0
  13. data/app/assets/images/admin/icon-close.png +0 -0
  14. data/app/assets/images/admin/line-heading.gif +0 -0
  15. data/app/assets/images/admin/line-heading.png +0 -0
  16. data/app/assets/images/admin/lock.gif +0 -0
  17. data/app/assets/images/admin/news.png +0 -0
  18. data/app/assets/images/admin/sidebar-users.png +0 -0
  19. data/app/assets/images/icons/arrow_refresh.png +0 -0
  20. data/app/assets/images/icons/icon-add-email.gif +0 -0
  21. data/app/assets/images/icons/icon-add-heading.gif +0 -0
  22. data/app/assets/images/icons/icon-add-image.gif +0 -0
  23. data/app/assets/images/icons/icon-add-news.gif +0 -0
  24. data/app/assets/images/icons/icon-add-text.gif +0 -0
  25. data/app/assets/images/icons/icon-add-video.gif +0 -0
  26. data/app/assets/images/icons/icon-add.gif +0 -0
  27. data/app/assets/images/icons/icon-backward.gif +0 -0
  28. data/app/assets/images/icons/icon-board.gif +0 -0
  29. data/app/assets/images/icons/icon-cart.gif +0 -0
  30. data/app/assets/images/icons/icon-comments.gif +0 -0
  31. data/app/assets/images/icons/icon-delete.gif +0 -0
  32. data/app/assets/images/icons/icon-down-dark.gif +0 -0
  33. data/app/assets/images/icons/icon-down-down.gif +0 -0
  34. data/app/assets/images/icons/icon-down.gif +0 -0
  35. data/app/assets/images/icons/icon-edit.gif +0 -0
  36. data/app/assets/images/icons/icon-information.gif +0 -0
  37. data/app/assets/images/icons/icon-news.gif +0 -0
  38. data/app/assets/images/icons/icon-pack.gif +0 -0
  39. data/app/assets/images/icons/icon-pages.gif +0 -0
  40. data/app/assets/images/icons/icon-pause.gif +0 -0
  41. data/app/assets/images/icons/icon-pdf.gif +0 -0
  42. data/app/assets/images/icons/icon-play.gif +0 -0
  43. data/app/assets/images/icons/icon-print.gif +0 -0
  44. data/app/assets/images/icons/icon-refresh.gif +0 -0
  45. data/app/assets/images/icons/icon-sound.png +0 -0
  46. data/app/assets/images/icons/icon-stop.gif +0 -0
  47. data/app/assets/images/icons/icon-unpack.gif +0 -0
  48. data/app/assets/images/icons/icon-up-dark.gif +0 -0
  49. data/app/assets/images/icons/icon-up-up.gif +0 -0
  50. data/app/assets/images/icons/icon-up.gif +0 -0
  51. data/app/assets/images/icons/newspaper_add.png +0 -0
  52. data/app/assets/images/icons/printer.png +0 -0
  53. data/app/assets/javascripts/admin-core.js +6 -0
  54. data/app/assets/javascripts/admin.js +11 -0
  55. data/app/assets/javascripts/shared.js +12 -0
  56. data/app/assets/stylesheets/admin-core.css +13 -0
  57. data/app/assets/stylesheets/admin.css.scss +190 -0
  58. data/app/assets/stylesheets/shared.css.scss +28 -0
  59. data/app/controllers/etabliocms_core/admin/base_controller.rb +13 -0
  60. data/app/controllers/etabliocms_core/admin/static_controller.rb +14 -0
  61. data/app/controllers/etabliocms_core/admin/users_controller.rb +49 -0
  62. data/app/controllers/etabliocms_core/application_controller_extension.rb +29 -0
  63. data/app/helpers/etabliocms_core/admin/table_tree_helper.rb +90 -0
  64. data/app/helpers/etabliocms_core/application_helper.rb +52 -0
  65. data/app/helpers/etabliocms_core/output_helper.rb +33 -0
  66. data/app/helpers/etabliocms_core/pages_helper.rb +33 -0
  67. data/app/models/etabliocms_core/user.rb +9 -0
  68. data/app/views/etabliocms_core/admin/static/index.html.erb +3 -0
  69. data/app/views/etabliocms_core/admin/static/textile.html.erb +250 -0
  70. data/app/views/etabliocms_core/admin/users/_form.html.erb +25 -0
  71. data/app/views/etabliocms_core/admin/users/edit.html.erb +7 -0
  72. data/app/views/etabliocms_core/admin/users/index.html.erb +35 -0
  73. data/app/views/etabliocms_core/admin/users/new.html.erb +7 -0
  74. data/app/views/layouts/_errors.html.erb +10 -0
  75. data/app/views/layouts/_flashes.html.erb +11 -0
  76. data/app/views/layouts/_footer.html.erb +39 -0
  77. data/app/views/layouts/_sidebar_core.html.erb +5 -0
  78. data/app/views/layouts/admin.html.erb +72 -0
  79. data/app/views/layouts/email.html.erb +93 -0
  80. data/config/initializers/configatron.rb +1 -0
  81. data/config/initializers/devise.rb +223 -0
  82. data/config/locales/core.cs.yml +48 -0
  83. data/config/locales/cs.rb +229 -0
  84. data/config/locales/devise.cs.yml +55 -0
  85. data/config/routes.rb +14 -0
  86. data/db/migrate/20120222142355_create_users.etabliocms_core_engine.rb +26 -0
  87. data/lib/etabliocms_core/engine.rb +29 -0
  88. data/lib/etabliocms_core/version.rb +3 -0
  89. data/lib/etabliocms_core.rb +14 -0
  90. data/lib/form_helper.rb +40 -0
  91. metadata +190 -0
@@ -0,0 +1,26 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+
3
+ def change
4
+ create_table :users do |t|
5
+ t.string :email, :default => "", :null => false
6
+ t.string :encrypted_password, :limit => 128, :default => "", :null => false
7
+ t.string :reset_password_token
8
+ t.datetime :reset_password_sent_at
9
+ t.datetime :remember_created_at
10
+ t.integer :sign_in_count, :default => 0
11
+ t.datetime :current_sign_in_at
12
+ t.datetime :last_sign_in_at
13
+ t.string :current_sign_in_ip
14
+ t.string :last_sign_in_ip
15
+ t.datetime :created_at
16
+ t.datetime :updated_at
17
+ end
18
+
19
+ add_index :users, ["email"], :name => "index_users_on_email", :unique => true
20
+ add_index :users, ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
21
+
22
+ EtabliocmsCore::User.create(:email => "patrikjira@gmail.com", :password => "heslo1", :password_confirmation => "heslo1")
23
+ end
24
+
25
+ end
26
+
@@ -0,0 +1,29 @@
1
+ module EtabliocmsCore
2
+
3
+ class Engine < ::Rails::Engine
4
+
5
+ initializer "etabliocms_core.initialize" do |app|
6
+ EtabliocmsCore.setup do |config|
7
+ config.modules ||= []
8
+ config.modules << :core
9
+ end
10
+ end
11
+
12
+ initializer "etabliocms_core.configure_app" do |app|
13
+ app.config.i18n.default_locale = :cs
14
+ end
15
+
16
+ initializer "etabliocms_core.load_static_assets" do |app|
17
+ app.middleware.use ::ActionDispatch::Static, "#{root}/public"
18
+ end
19
+
20
+ initializer 'etabliocms_core.application_controller' do |app|
21
+ ActiveSupport.on_load(:action_controller) do
22
+ include EtabliocmsCore::ApplicationControllerExtension
23
+ end
24
+ end
25
+
26
+
27
+ end
28
+
29
+ end
@@ -0,0 +1,3 @@
1
+ module EtabliocmsCore
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,14 @@
1
+ require "active_support/dependencies"
2
+
3
+ module EtabliocmsCore
4
+
5
+ mattr_accessor :modules
6
+
7
+ def self.setup
8
+ yield self
9
+ end
10
+
11
+ end
12
+
13
+ require "etabliocms_core/engine"
14
+ require "devise"
@@ -0,0 +1,40 @@
1
+ module ActionView
2
+ module Helpers
3
+ module FormOptionsHelper
4
+
5
+ DEFAULT_TEXTAREA_WIDTH = 550
6
+ DEFAULT_TEXTAREA_HEIGHT = 200
7
+
8
+ def boolean_yes_no_select(object_name, method, options = {}, html_options = {})
9
+ choices = {
10
+ 'Ne' => false,
11
+ 'Ano' => true
12
+ }
13
+ InstanceTag.new(object_name, method, self, options.delete(:object)).to_select_tag(choices, options, html_options)
14
+ end
15
+
16
+ def textile_text_area(object_name, method, options = {})
17
+ obj = self.instance_variable_get("@#{object_name}")
18
+ html = InstanceTag.new(object_name, method, self, options.delete(:object)).to_text_area_tag(options)
19
+ html << javascript_tag do
20
+ %Q(
21
+ $(function() {
22
+ $('##{object_name}_#{method}').markItUp(mySettings);
23
+ });
24
+ )
25
+ end
26
+ html
27
+ end
28
+ end
29
+
30
+ class FormBuilder
31
+ def boolean_yes_no_select(method, options = {}, html_options = {})
32
+ @template.boolean_yes_no_select(@object_name, method, objectify_options(options), @default_options.merge(html_options))
33
+ end
34
+
35
+ def textile_text_area(method, options = {}, html_options = {})
36
+ @template.textile_text_area(@object_name, method, objectify_options(options))
37
+ end
38
+ end
39
+ end
40
+ end
metadata ADDED
@@ -0,0 +1,190 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: etabliocms_core
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - papricek
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &8806460 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *8806460
25
+ - !ruby/object:Gem::Dependency
26
+ name: devise
27
+ requirement: &8805920 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 2.0.4
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *8805920
36
+ - !ruby/object:Gem::Dependency
37
+ name: configatron
38
+ requirement: &8805520 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *8805520
47
+ - !ruby/object:Gem::Dependency
48
+ name: RedCloth
49
+ requirement: &8753380 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - =
53
+ - !ruby/object:Gem::Version
54
+ version: 4.2.9
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *8753380
58
+ - !ruby/object:Gem::Dependency
59
+ name: sqlite3
60
+ requirement: &8752920 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *8752920
69
+ description: Small CMS
70
+ email:
71
+ - patrikjira@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - app/views/layouts/_footer.html.erb
77
+ - app/views/layouts/_sidebar_core.html.erb
78
+ - app/views/layouts/_errors.html.erb
79
+ - app/views/layouts/_flashes.html.erb
80
+ - app/views/layouts/admin.html.erb
81
+ - app/views/layouts/email.html.erb
82
+ - app/views/etabliocms_core/admin/static/textile.html.erb
83
+ - app/views/etabliocms_core/admin/static/index.html.erb
84
+ - app/views/etabliocms_core/admin/users/_form.html.erb
85
+ - app/views/etabliocms_core/admin/users/new.html.erb
86
+ - app/views/etabliocms_core/admin/users/edit.html.erb
87
+ - app/views/etabliocms_core/admin/users/index.html.erb
88
+ - app/assets/javascripts/shared.js
89
+ - app/assets/javascripts/admin.js
90
+ - app/assets/javascripts/admin-core.js
91
+ - app/assets/stylesheets/shared.css.scss
92
+ - app/assets/stylesheets/admin.css.scss
93
+ - app/assets/stylesheets/admin-core.css
94
+ - app/assets/images/admin/background-sidebar-top.png
95
+ - app/assets/images/admin/line-heading.gif
96
+ - app/assets/images/admin/lock.gif
97
+ - app/assets/images/admin/background-sidebar-bottom.png
98
+ - app/assets/images/admin/news.png
99
+ - app/assets/images/admin/background-sidebar-item.png
100
+ - app/assets/images/admin/background.gif
101
+ - app/assets/images/admin/background-main.gif
102
+ - app/assets/images/admin/background-sidebar.png
103
+ - app/assets/images/admin/background-heading.png
104
+ - app/assets/images/admin/icon-close.png
105
+ - app/assets/images/admin/background-th.png
106
+ - app/assets/images/admin/line-heading.png
107
+ - app/assets/images/admin/sidebar-users.png
108
+ - app/assets/images/admin/bullet.gif
109
+ - app/assets/images/icons/icon-board.gif
110
+ - app/assets/images/icons/icon-information.gif
111
+ - app/assets/images/icons/icon-up.gif
112
+ - app/assets/images/icons/icon-play.gif
113
+ - app/assets/images/icons/icon-stop.gif
114
+ - app/assets/images/icons/icon-edit.gif
115
+ - app/assets/images/icons/icon-add-news.gif
116
+ - app/assets/images/icons/icon-add-video.gif
117
+ - app/assets/images/icons/icon-add-heading.gif
118
+ - app/assets/images/icons/icon-unpack.gif
119
+ - app/assets/images/icons/icon-pack.gif
120
+ - app/assets/images/icons/icon-down-down.gif
121
+ - app/assets/images/icons/icon-pdf.gif
122
+ - app/assets/images/icons/icon-add-image.gif
123
+ - app/assets/images/icons/icon-comments.gif
124
+ - app/assets/images/icons/icon-news.gif
125
+ - app/assets/images/icons/icon-up-dark.gif
126
+ - app/assets/images/icons/newspaper_add.png
127
+ - app/assets/images/icons/icon-add.gif
128
+ - app/assets/images/icons/icon-down-dark.gif
129
+ - app/assets/images/icons/icon-delete.gif
130
+ - app/assets/images/icons/icon-sound.png
131
+ - app/assets/images/icons/icon-add-text.gif
132
+ - app/assets/images/icons/icon-backward.gif
133
+ - app/assets/images/icons/arrow_refresh.png
134
+ - app/assets/images/icons/icon-pause.gif
135
+ - app/assets/images/icons/icon-add-email.gif
136
+ - app/assets/images/icons/icon-down.gif
137
+ - app/assets/images/icons/icon-cart.gif
138
+ - app/assets/images/icons/icon-up-up.gif
139
+ - app/assets/images/icons/printer.png
140
+ - app/assets/images/icons/icon-print.gif
141
+ - app/assets/images/icons/icon-refresh.gif
142
+ - app/assets/images/icons/icon-pages.gif
143
+ - app/controllers/etabliocms_core/admin/static_controller.rb
144
+ - app/controllers/etabliocms_core/admin/users_controller.rb
145
+ - app/controllers/etabliocms_core/admin/base_controller.rb
146
+ - app/controllers/etabliocms_core/application_controller_extension.rb
147
+ - app/models/etabliocms_core/user.rb
148
+ - app/helpers/etabliocms_core/output_helper.rb
149
+ - app/helpers/etabliocms_core/admin/table_tree_helper.rb
150
+ - app/helpers/etabliocms_core/pages_helper.rb
151
+ - app/helpers/etabliocms_core/application_helper.rb
152
+ - config/routes.rb
153
+ - config/initializers/configatron.rb
154
+ - config/initializers/devise.rb
155
+ - config/locales/devise.cs.yml
156
+ - config/locales/core.cs.yml
157
+ - config/locales/cs.rb
158
+ - db/migrate/20120222142355_create_users.etabliocms_core_engine.rb
159
+ - lib/form_helper.rb
160
+ - lib/etabliocms_core/version.rb
161
+ - lib/etabliocms_core/engine.rb
162
+ - lib/etabliocms_core.rb
163
+ - MIT-LICENSE
164
+ - Rakefile
165
+ - README.rdoc
166
+ homepage: https://github.com/papricek/etabliocms_core
167
+ licenses: []
168
+ post_install_message:
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ none: false
174
+ requirements:
175
+ - - ! '>='
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ required_rubygems_version: !ruby/object:Gem::Requirement
179
+ none: false
180
+ requirements:
181
+ - - ! '>='
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ requirements: []
185
+ rubyforge_project:
186
+ rubygems_version: 1.8.5
187
+ signing_key:
188
+ specification_version: 3
189
+ summary: Small CMS
190
+ test_files: []