etabliocms_core 0.0.1

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.
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,93 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
+ <head>
4
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
5
+ <title><%= @title %></title>
6
+ <!--general stylesheet-->
7
+ <style type="text/css">
8
+ p {
9
+ padding: 0;
10
+ margin: 0;
11
+ }
12
+
13
+ h2, h3, p, li {
14
+ font-family: Georgia, Serif;
15
+ }
16
+
17
+ td {
18
+ vertical-align: top;
19
+ }
20
+
21
+ ul, ol {
22
+ margin: 0;
23
+ padding: 0;
24
+ }
25
+
26
+ h3 a {color: #535353;}
27
+ </style>
28
+ </head>
29
+ <body marginheight="0" topmargin="0" marginwidth="0" leftmargin="0" background=""
30
+ style="margin: 0px; background-color: #ffffff;" bgcolor="#ffffff">
31
+ <table cellspacing="0" border="0" cellpadding="0" width="100%">
32
+ <tbody>
33
+ <tr valign="top">
34
+ <td><!--container-->
35
+ <table cellspacing="0" cellpadding="0" border="0" align="center" width="750" bgcolor="#ffffff">
36
+ <tbody>
37
+ <tr>
38
+ <td valign="top" bgcolor="#ffffff" align="center">
39
+ <table cellspacing="0" border="0" cellpadding="0" width="700">
40
+ <tbody>
41
+ <tr>
42
+ <td valign="top" height="37" style="height: 37px;">&nbsp;</td>
43
+ </tr>
44
+ <tr>
45
+ <td valign="top" colspan="2" style="text-align: left;">
46
+ <h1 style="margin: 0; padding: 0; font-size: 36px; color: #e6601a; font-weight: bold;font-family: 'Arial Black', Gadget, sans-serif;">
47
+ <a href="http://<%= configatron.host %>" style="color: #e6601a;text-decoration:none;font-family: 'Arial Black', Gadget, sans-serif;" title="<%= configatron.description %>">
48
+ <%= configatron.name %></a>
49
+ </h1>
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <td valign="top" height="27" style="height: 15px;">&nbsp;</td>
54
+ </tr>
55
+ <tr>
56
+ <td valign="top" width="100%">
57
+ <table cellspacing="0" border="0" cellpadding="0" width="100%">
58
+ <tr>
59
+ <td valign="top">
60
+ <%= yield %>
61
+ </td>
62
+ </tr>
63
+ </table>
64
+
65
+
66
+ </td>
67
+ </tr>
68
+ <tr>
69
+ <td valign="top" height="40" bgcolor="#ffffff" style="height: 40px;">&nbsp;</td>
70
+ </tr>
71
+ <tr>
72
+ <td valign="middle" height="38"
73
+ style="height: 38px; vertical-align: middle; border-top-color: #d6d6d6; border-top-width: 1px; border-top-style: solid;">
74
+ <p style="font-size: 11px; font-weight: bold; color: #8a8a8a; text-align: center;">
75
+ Tým <strong><a href="http://<%= configatron.host %>" style="color:#e6601a;text-decoration:none"><%= configatron.name %></a></strong>
76
+ <a href="mailto:<%= configatron.email %>" style="color:#e6601a;text-decoration:none"><%= configatron.email %></a>
77
+ </p>
78
+ </td>
79
+ </tr>
80
+ </tbody>
81
+ </table>
82
+ </td>
83
+ <!--/content-->
84
+ </tr>
85
+ </tbody>
86
+ </table>
87
+ <!--/container-->
88
+ </td>
89
+ </tr>
90
+ </tbody>
91
+ </table>
92
+ </body>
93
+ </html>
@@ -0,0 +1 @@
1
+ #TODO make configatron work
@@ -0,0 +1,223 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # ==> Mailer Configuration
5
+ # Configure the e-mail address which will be shown in Devise::Mailer,
6
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
8
+
9
+ # Configure the class responsible to send e-mails.
10
+ # config.mailer = "Devise::Mailer"
11
+
12
+ # Automatically apply schema changes in tableless databases
13
+ config.apply_schema = false
14
+
15
+ # ==> ORM configuration
16
+ # Load and configure the ORM. Supports :active_record (default) and
17
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
18
+ # available as additional gems.
19
+ require 'devise/orm/active_record'
20
+
21
+ # ==> Configuration for any authentication mechanism
22
+ # Configure which keys are used when authenticating a user. The default is
23
+ # just :email. You can configure it to use [:username, :subdomain], so for
24
+ # authenticating a user, both parameters are required. Remember that those
25
+ # parameters are used only when authenticating and not when retrieving from
26
+ # session. If you need permissions, you should implement that in a before filter.
27
+ # You can also supply a hash where the value is a boolean determining whether
28
+ # or not authentication should be aborted when the value is not present.
29
+ # config.authentication_keys = [ :email ]
30
+
31
+ # Configure parameters from the request object used for authentication. Each entry
32
+ # given should be a request method and it will automatically be passed to the
33
+ # find_for_authentication method and considered in your model lookup. For instance,
34
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
35
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
36
+ # config.request_keys = []
37
+
38
+ # Configure which authentication keys should be case-insensitive.
39
+ # These keys will be downcased upon creating or modifying a user and when used
40
+ # to authenticate or find a user. Default is :email.
41
+ config.case_insensitive_keys = [ :email ]
42
+
43
+ # Configure which authentication keys should have whitespace stripped.
44
+ # These keys will have whitespace before and after removed upon creating or
45
+ # modifying a user and when used to authenticate or find a user. Default is :email.
46
+ config.strip_whitespace_keys = [ :email ]
47
+
48
+ # Tell if authentication through request.params is enabled. True by default.
49
+ # It can be set to an array that will enable params authentication only for the
50
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
51
+ # enable it only for database (email + password) authentication.
52
+ # config.params_authenticatable = true
53
+
54
+ # Tell if authentication through HTTP Basic Auth is enabled. False by default.
55
+ # It can be set to an array that will enable http authentication only for the
56
+ # given strategies, for example, `config.http_authenticatable = [:token]` will
57
+ # enable it only for token authentication.
58
+ # config.http_authenticatable = false
59
+
60
+ # If http headers should be returned for AJAX requests. True by default.
61
+ # config.http_authenticatable_on_xhr = true
62
+
63
+ # The realm used in Http Basic Authentication. "Application" by default.
64
+ # config.http_authentication_realm = "Application"
65
+
66
+ # It will change confirmation, password recovery and other workflows
67
+ # to behave the same regardless if the e-mail provided was right or wrong.
68
+ # Does not affect registerable.
69
+ # config.paranoid = true
70
+
71
+ # By default Devise will store the user in session. You can skip storage for
72
+ # :http_auth and :token_auth by adding those symbols to the array below.
73
+ # Notice that if you are skipping storage for all authentication paths, you
74
+ # may want to disable generating routes to Devise's sessions controller by
75
+ # passing :skip => :sessions to `devise_for` in your config/routes.rb
76
+ config.skip_session_storage = [:http_auth]
77
+
78
+ # ==> Configuration for :database_authenticatable
79
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
80
+ # using other encryptors, it sets how many times you want the password re-encrypted.
81
+ #
82
+ # Limiting the stretches to just one in testing will increase the performance of
83
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
84
+ # a value less than 10 in other environments.
85
+ config.stretches = Rails.env.test? ? 1 : 10
86
+
87
+ # Setup a pepper to generate the encrypted password.
88
+ # config.pepper = <%= SecureRandom.hex(64).inspect %>
89
+
90
+ # ==> Configuration for :confirmable
91
+ # A period that the user is allowed to access the website even without
92
+ # confirming his account. For instance, if set to 2.days, the user will be
93
+ # able to access the website for two days without confirming his account,
94
+ # access will be blocked just in the third day. Default is 0.days, meaning
95
+ # the user cannot access the website without confirming his account.
96
+ # config.allow_unconfirmed_access_for = 2.days
97
+
98
+ # If true, requires any email changes to be confirmed (exctly the same way as
99
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
100
+ # db field (see migrations). Until confirmed new email is stored in
101
+ # unconfirmed email column, and copied to email column on successful confirmation.
102
+ config.reconfirmable = true
103
+
104
+ # Defines which key will be used when confirming an account
105
+ # config.confirmation_keys = [ :email ]
106
+
107
+ # ==> Configuration for :rememberable
108
+ # The time the user will be remembered without asking for credentials again.
109
+ # config.remember_for = 2.weeks
110
+
111
+ # If true, extends the user's remember period when remembered via cookie.
112
+ # config.extend_remember_period = false
113
+
114
+ # If true, uses the password salt as remember token. This should be turned
115
+ # to false if you are not using database authenticatable.
116
+ config.use_salt_as_remember_token = true
117
+
118
+ # Options to be passed to the created cookie. For instance, you can set
119
+ # :secure => true in order to force SSL only cookies.
120
+ # config.rememberable_options = {}
121
+
122
+ # ==> Configuration for :validatable
123
+ # Range for password length. Default is 6..128.
124
+ # config.password_length = 6..128
125
+
126
+ # Email regex used to validate email formats. It simply asserts that
127
+ # an one (and only one) @ exists in the given string. This is mainly
128
+ # to give user feedback and not to assert the e-mail validity.
129
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
130
+
131
+ # ==> Configuration for :timeoutable
132
+ # The time you want to timeout the user session without activity. After this
133
+ # time the user will be asked for credentials again. Default is 30 minutes.
134
+ # config.timeout_in = 30.minutes
135
+
136
+ # ==> Configuration for :lockable
137
+ # Defines which strategy will be used to lock an account.
138
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
139
+ # :none = No lock strategy. You should handle locking by yourself.
140
+ # config.lock_strategy = :failed_attempts
141
+
142
+ # Defines which key will be used when locking and unlocking an account
143
+ # config.unlock_keys = [ :email ]
144
+
145
+ # Defines which strategy will be used to unlock an account.
146
+ # :email = Sends an unlock link to the user email
147
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
148
+ # :both = Enables both strategies
149
+ # :none = No unlock strategy. You should handle unlocking by yourself.
150
+ # config.unlock_strategy = :both
151
+
152
+ # Number of authentication tries before locking an account if lock_strategy
153
+ # is failed attempts.
154
+ # config.maximum_attempts = 20
155
+
156
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
157
+ # config.unlock_in = 1.hour
158
+
159
+ # ==> Configuration for :recoverable
160
+ #
161
+ # Defines which key will be used when recovering the password for an account
162
+ # config.reset_password_keys = [ :email ]
163
+
164
+ # Time interval you can reset your password with a reset password key.
165
+ # Don't put a too small interval or your users won't have the time to
166
+ # change their passwords.
167
+ config.reset_password_within = 6.hours
168
+
169
+ # ==> Configuration for :encryptable
170
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
171
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
172
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
173
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
174
+ # REST_AUTH_SITE_KEY to pepper)
175
+ # config.encryptor = :sha512
176
+
177
+ # ==> Configuration for :token_authenticatable
178
+ # Defines name of the authentication token params key
179
+ # config.token_authentication_key = :auth_token
180
+
181
+ # ==> Scopes configuration
182
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
183
+ # "users/sessions/new". It's turned off by default because it's slower if you
184
+ # are using only default views.
185
+ # config.scoped_views = false
186
+
187
+ # Configure the default scope given to Warden. By default it's the first
188
+ # devise role declared in your routes (usually :user).
189
+ config.default_scope = :"etabliocms_core/user"
190
+
191
+ # Configure sign_out behavior.
192
+ # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
193
+ # The default is true, which means any logout action will sign out all active scopes.
194
+ # config.sign_out_all_scopes = true
195
+
196
+ # ==> Navigation configuration
197
+ # Lists the formats that should be treated as navigational. Formats like
198
+ # :html, should redirect to the sign in page when the user does not have
199
+ # access, but formats like :xml or :json, should return 401.
200
+ #
201
+ # If you have any extra navigational formats, like :iphone or :mobile, you
202
+ # should add them to the navigational formats lists.
203
+ #
204
+ # The "*/*" below is required to match Internet Explorer requests.
205
+ # config.navigational_formats = ["*/*", :html]
206
+
207
+ # The default HTTP method used to sign out a resource. Default is :delete.
208
+ config.sign_out_via = :delete
209
+
210
+ # ==> OmniAuth
211
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
212
+ # up on your models and hooks.
213
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
214
+
215
+ # ==> Warden configuration
216
+ # If you want to use other strategies, that are not supported by Devise, or
217
+ # change the failure app, you can configure them inside the config.warden block.
218
+ #
219
+ # config.warden do |manager|
220
+ # manager.intercept_401 = false
221
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
222
+ # end
223
+ end
@@ -0,0 +1,48 @@
1
+ cs:
2
+ common:
3
+ logout: Odhlásit
4
+ logged: Přihlášen
5
+ login: Přihlásit
6
+ more: Více
7
+ error_explanation: "Vámi zadaná data nejsou ve správném formátu:"
8
+ obligatory_fields: Povinné položky jsou označeny hvězdičkou.
9
+ send: Odeslat
10
+ close: Zavřít
11
+ admin:
12
+ admin: Administrační rozhraní
13
+ destroy: Odstranit
14
+ edit: Editovat
15
+ save: Uložit
16
+ refresh: Obnovit
17
+ back_to_admin: Zpět do administrace
18
+ created_at: Vytvořeno
19
+ actions: Akce
20
+ locales:
21
+ cs: Česky
22
+ en: Anglicky
23
+ de: Německy
24
+ hierarchy:
25
+ up: Nahoru
26
+ top: Navrch
27
+ down: Dolů
28
+ bottom: Dospod
29
+ top_level: Nejvyšší úroveň
30
+ etabliocms_core_user:
31
+ users: Uživatelé
32
+ users_count: "Uživatelé (%{count})"
33
+ add: Přidat uživatele
34
+ created: Uživatel byl úspěšně vytvořen.
35
+ updated: Uživatel byl úspěšně upraven.
36
+ destroyed: Uživatel byl úspěšně odstraněn.
37
+ destroy_confirmation: Skutečně chcete smazat tohoto uživatele?
38
+ admin_legend: Základní údaje o uživateli
39
+ edit: "Editace uživatele %{title}"
40
+ new: Nový uživatel
41
+ activerecord:
42
+ attributes:
43
+ "etabliocms_core/user":
44
+ email: Email
45
+ password: Heslo
46
+ password_confirmation: Potvrzení hesla
47
+ last_sign_in_at: Poslední přihlášení
48
+ remember_me: Trvalé přihlášení
@@ -0,0 +1,229 @@
1
+ # Czech translations for Ruby on Rails
2
+ # by Karel Minařík (karmi@karmi.cz)
3
+ # contributors:
4
+ # - Vít Krchov - http://github.com/vita - Rails 3 update
5
+
6
+ unless defined?(CzechLocaleI18n::ERROR_MESSAGES)
7
+ module CzechLocaleI18n
8
+ ERROR_MESSAGES = {
9
+ :inclusion => "není v seznamu povolených hodnot",
10
+ :exclusion => "je vyhrazeno pro jiný účel",
11
+ :invalid => "není platná hodnota",
12
+ :confirmation => "nebylo potvrzeno",
13
+ :accepted => "musí být potvrzeno",
14
+ :empty => "nesmí být prázdný/á/é",
15
+ :blank => "je povinná položka", # alternate formulation: "is required"
16
+ :too_long => "je příliš dlouhý/á/é (max. %{count} znaků)",
17
+ :too_short => "je příliš krátký/á/é (min. %{count} znaků)",
18
+ :wrong_length => "nemá správnou délku (očekáváno %{count} znaků)",
19
+ :not_a_number => "není číslo",
20
+ :greater_than => "musí být větší než %{count}",
21
+ :greater_than_or_equal_to => "musí být větší nebo rovno %{count}",
22
+ :equal_to => "musí být rovno %{count}",
23
+ :less_than => "musí být méně než %{count}",
24
+ :less_than_or_equal_to => "musí být méně nebo rovno %{count}",
25
+ :odd => "musí být liché číslo",
26
+ :even => "musí být sudé číslo",
27
+ :not_an_integer => "musí být celé číslo"
28
+ }
29
+ end
30
+ end
31
+
32
+ { :'cs' => {
33
+
34
+ # ActiveSupport
35
+ :support => {
36
+ :array => {
37
+ :two_words_connector => ' a ',
38
+ :last_word_connector => ' a ',
39
+ :words_connector => ', '
40
+ },
41
+ :select => {
42
+ :prompt => 'Prosím vyberte si',
43
+ }
44
+ },
45
+
46
+ # Date
47
+ :date => {
48
+ :formats => {
49
+ :default => "%d. %m. %Y",
50
+ :short => "%d %b",
51
+ :long => "%d. %B %Y",
52
+ },
53
+ :day_names => %w{Neděle Pondělí Úterý Středa Čtvrtek Pátek Sobota},
54
+ :abbr_day_names => %w{Ne Po Út St Čt Pá So},
55
+ :month_names => %w{~ Leden Únor Březen Duben Květen Červen Červenec Srpen Září Říjen Listopad Prosinec},
56
+ :abbr_month_names => %w{~ Led Úno Bře Dub Kvě Čvn Čvc Srp Zář Říj Lis Pro},
57
+ :order => [:day, :month, :year]
58
+ },
59
+
60
+ # Time
61
+ :time => {
62
+ :formats => {
63
+ :default => "%a %d. %B %Y %H:%M %z",
64
+ :short => "%d. %m. %H:%M",
65
+ :long => "%A %d. %B %Y %H:%M",
66
+ },
67
+ :am => 'am',
68
+ :pm => 'pm'
69
+ },
70
+
71
+ # Numbers
72
+ :number => {
73
+ :format => {
74
+ :precision => 3,
75
+ :separator => '.',
76
+ :delimiter => ',',
77
+ :significant => false,
78
+ :strip_insignificant_zeros => false
79
+ },
80
+ :currency => {
81
+ :format => {
82
+ :unit => 'Kč',
83
+ :precision => 2,
84
+ :format => '%n %u',
85
+ :separator => ",",
86
+ :delimiter => " ",
87
+ :significant => false,
88
+ :strip_insignificant_zeros => false
89
+ }
90
+ },
91
+ :human => {
92
+ :format => {
93
+ :precision => 1,
94
+ :delimiter => '',
95
+ :significant => false,
96
+ :strip_insignificant_zeros => false
97
+ },
98
+ :storage_units => {
99
+ :format => "%n %u",
100
+ :units => {
101
+ :byte => "B",
102
+ :kb => "KB",
103
+ :mb => "MB",
104
+ :gb => "GB",
105
+ :tb => "TB",
106
+ }
107
+ },
108
+ :decimal_units => {
109
+ :format => "%n %u",
110
+ :units => {
111
+ :unit => "",
112
+ :thousand => "Tisíc",
113
+ :million => "Milion",
114
+ :billion => "Miliarda",
115
+ :trillion => "Bilion",
116
+ :quadrillion => "Kvadrilion"
117
+ }
118
+ }
119
+ },
120
+ :percentage => {
121
+ :format => {
122
+ :delimiter => ''
123
+ }
124
+ },
125
+ :precision => {
126
+ :format => {
127
+ :delimiter => ''
128
+ }
129
+ }
130
+ },
131
+
132
+ # Distance of time ... helper
133
+ # NOTE: In Czech language, these values are different for the past and for the future. Preference has been given to past here.
134
+ :datetime => {
135
+ :prompts => {
136
+ :second => "Sekunda",
137
+ :minute => "Minuta",
138
+ :hour => "Hodina",
139
+ :day => "Den",
140
+ :month => "Měsíc",
141
+ :year => "Rok"
142
+ },
143
+ :distance_in_words => {
144
+ :half_a_minute => 'půl minutou',
145
+ :less_than_x_seconds => {
146
+ :one => 'necelou sekundou',
147
+ :other => 'ani ne %{count} sekundami'
148
+ },
149
+ :x_seconds => {
150
+ :one => 'sekundou',
151
+ :other => '%{count} sekundami'
152
+ },
153
+ :less_than_x_minutes => {
154
+ :one => 'necelou minutou',
155
+ :other => 'ani ne %{count} minutami'
156
+ },
157
+ :x_minutes => {
158
+ :one => 'minutou',
159
+ :other => '%{count} minutami'
160
+ },
161
+ :about_x_hours => {
162
+ :one => 'asi hodinou',
163
+ :other => 'asi %{count} hodinami'
164
+ },
165
+ :x_days => {
166
+ :one => '24 hodinami',
167
+ :other => '%{count} dny'
168
+ },
169
+ :about_x_months => {
170
+ :one => 'asi měsícem',
171
+ :other => 'asi %{count} měsíci'
172
+ },
173
+ :x_months => {
174
+ :one => 'měsícem',
175
+ :other => '%{count} měsíci'
176
+ },
177
+ :about_x_years => {
178
+ :one => 'asi rokem',
179
+ :other => 'asi %{count} roky'
180
+ },
181
+ :over_x_years => {
182
+ :one => 'více než rokem',
183
+ :other => 'více než %{count} roky'
184
+ },
185
+ :almost_x_years => {
186
+ :one => 'téměř rokem',
187
+ :other => 'téměř %{count} roky'
188
+ }
189
+ }
190
+ },
191
+
192
+ :helpers => {
193
+ :select => {
194
+ :prompt => "Prosím vyberte si"
195
+ },
196
+
197
+ :submit => {
198
+ :create => "Vytvořit %{model}",
199
+ :update => "Aktualizovat %{model}",
200
+ :submit => "Uložit %{model}"
201
+ }
202
+ },
203
+
204
+ :errors => {
205
+ :format => "%{attribute} %{message}",
206
+ :messages => CzechLocaleI18n::ERROR_MESSAGES
207
+ },
208
+
209
+ # ActiveRecord validation messages
210
+ :activerecord => {
211
+ :errors => {
212
+ :messages => {
213
+ :taken => "již databáze obsahuje",
214
+ :record_invalid => "Validace je neúspešná: %{errors}"
215
+ }.merge(CzechLocaleI18n::ERROR_MESSAGES),
216
+ :template => {
217
+ :header => {
218
+ :one => "Při ukládání objektu %{model} došlo k chybám a nebylo jej možné uložit",
219
+ :other => "Při ukládání objektu %{model} došlo ke %{count} chybám a nebylo možné jej uložit"
220
+ },
221
+ :body => "Následující pole obsahují chybně vyplněné údaje:"
222
+ },
223
+ :full_messages => {
224
+ :format => "%{attribute} %{message}"
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
@@ -0,0 +1,55 @@
1
+ # Additional translations at http://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ cs:
4
+ errors:
5
+ messages:
6
+ expired: "vypršelo, zkuste se přihlásit znovu"
7
+ not_found: "nenalezeno"
8
+ already_confirmed: "je potvrzen, zkuste se přihlásit"
9
+ not_locked: "nebyl zamčen"
10
+ not_saved:
11
+ one: "Uložení tohoto účtu brání 1 chyba:"
12
+ other: "Uložení tohoto účtu brání %{count} chyb:"
13
+
14
+ devise:
15
+ failure:
16
+ already_authenticated: "Jste už přihlášen."
17
+ unauthenticated: "Pro pokračování se musíte přihlásit nebo zaregistrovat."
18
+ unconfirmed: "Pro pokračování musíte potvrdit Váš účet."
19
+ locked: "Váš účet je uzamčen."
20
+ invalid: "Neplatný email nebo heslo."
21
+ invalid_token: "Neplatný autentizační kód."
22
+ timeout: "Vaše přihlášení vypršelo, pro pokračování se znovu přihlašte."
23
+ inactive: "Váš účet ještě nebyl aktivován."
24
+ sessions:
25
+ signed_in: "Přihlášení proběhlo úspěšně."
26
+ signed_out: "Odhlášení proběhlo úspěšně."
27
+ passwords:
28
+ send_instructions: "Během několika minut obdržíte email s návodem, jak znovuobnovit Vaše heslo."
29
+ updated: "Vaše heslo bylo úspěšně změněno. Nyní se můžete přihlásit."
30
+ send_paranoid_instructions: "Pokud máme tento Váš email v databázi, obdržíte zanedlouho email s odkazem pro obnovení hesla."
31
+ confirmations:
32
+ send_instructions: "Během několika minut obdržíte email s návodem, jak potvrdit Váš účet."
33
+ send_paranoid_instructions: "Pokud máme tento Váš email v databázi, obdržíte zanedlouho návod, jak potvrdit Váš účet."
34
+ confirmed: "Váš účet byl úspěšně potvrzen. Byli jste přihlášeni."
35
+ registrations:
36
+ signed_up: "Vítejte! Vaše registrace byla úspěšná."
37
+ updated: "Aktualizace Vašeho účtu proběhla úspěšně."
38
+ destroyed: "Váš účet byl úspěšně zrušen. Na shledanou!"
39
+ signed_up_but_unconfirmed: "Během několika minut obdržíte email s potvrzovacím odkazem. Klikněte prosím na tento odkaz pro potvrzení účtu."
40
+ signed_up_but_inactive: "Vaše registrace proběhla správně. Nyní se ale nemůžete přihlásit, protože Váš účet ještě nebyl potvrzen."
41
+ signed_up_but_locked: "Vaše registrace proběhla správně. Nyní se ale nemůžete přihlásit, protože Váš účet ještě byl zablokován."
42
+ unlocks:
43
+ send_instructions: "Během několika minut obdržíte email s návodem, jak odemknout Váš účet."
44
+ unlocked: "Váš účet byl úspěšně odemknut. Byli jste přihlášeni."
45
+ send_paranoid_instructions: "Pokud Váš účet skutečně existuje, zanedlouho obdržíte email s návodem, jak odemknout tento Váš účet."
46
+ omniauth_callbacks:
47
+ success: "Byli jste úspěšně přihlášení pomocí účtu na službě %{kind}."
48
+ failure: "Nemohli jste být přihlášení pomocí účtu na službě %{kind}, protože: %{reason}."
49
+ mailer:
50
+ confirmation_instructions:
51
+ subject: "Potvrzení účtu"
52
+ reset_password_instructions:
53
+ subject: "Znovunastavení hesla"
54
+ unlock_instructions:
55
+ subject: "Odemknutí účtu"
data/config/routes.rb ADDED
@@ -0,0 +1,14 @@
1
+ Rails.application.routes.draw do
2
+
3
+ devise_for :"etabliocms_core/users", :path => ""
4
+
5
+ match "/admin", :to => "etabliocms_core/admin/static#index"
6
+ match "/admin/textile_parser", :to => "etabliocms_core/admin/static#textile_parser", :as => "textile_parser"
7
+
8
+ scope :module => "etabliocms_core" do
9
+ namespace :admin do
10
+ resources :users
11
+ end
12
+ end
13
+
14
+ end