trusty-cms 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +23 -0
- data/CHANGELOG.md +754 -0
- data/CONTRIBUTORS.md +263 -0
- data/Gemfile +40 -0
- data/Gemfile.lock +177 -0
- data/INSTALL.md +10 -0
- data/LICENSE.md +21 -0
- data/README.md +85 -0
- data/Rakefile +7 -0
- data/app/controllers/admin/configuration_controller.rb +50 -0
- data/app/controllers/admin/extensions_controller.rb +11 -0
- data/app/controllers/admin/layouts_controller.rb +8 -0
- data/app/controllers/admin/page_fields_controller.rb +9 -0
- data/app/controllers/admin/page_parts_controller.rb +9 -0
- data/app/controllers/admin/pages_controller.rb +89 -0
- data/app/controllers/admin/preferences_controller.rb +46 -0
- data/app/controllers/admin/references_controller.rb +7 -0
- data/app/controllers/admin/resource_controller.rb +245 -0
- data/app/controllers/admin/users_controller.rb +40 -0
- data/app/controllers/admin/welcome_controller.rb +48 -0
- data/app/controllers/application_controller.rb +114 -0
- data/app/controllers/site_controller.rb +97 -0
- data/app/helpers/admin/configuration_helper.rb +80 -0
- data/app/helpers/admin/export_helper.rb +2 -0
- data/app/helpers/admin/extensions_helper.rb +2 -0
- data/app/helpers/admin/layouts_helper.rb +21 -0
- data/app/helpers/admin/node_helper.rb +96 -0
- data/app/helpers/admin/pages_helper.rb +117 -0
- data/app/helpers/admin/preferences_helper.rb +3 -0
- data/app/helpers/admin/references_helper.rb +46 -0
- data/app/helpers/admin/regions_helper.rb +28 -0
- data/app/helpers/admin/resource_helper.rb +2 -0
- data/app/helpers/admin/users_helper.rb +8 -0
- data/app/helpers/admin/welcome_helper.rb +2 -0
- data/app/helpers/application_helper.rb +241 -0
- data/app/helpers/site_helper.rb +2 -0
- data/app/models/deprecated_tags.rb +42 -0
- data/app/models/file_not_found_page.rb +32 -0
- data/app/models/layout.rb +15 -0
- data/app/models/menu_renderer.rb +140 -0
- data/app/models/page.rb +377 -0
- data/app/models/page_context.rb +53 -0
- data/app/models/page_field.rb +3 -0
- data/app/models/page_part.rb +20 -0
- data/app/models/standard_tags.rb +1318 -0
- data/app/models/status.rb +41 -0
- data/app/models/text_filter.rb +36 -0
- data/app/models/trusty_cms/config.rb +313 -0
- data/app/models/trusty_cms/page_response_cache_director.rb +43 -0
- data/app/models/user.rb +96 -0
- data/app/models/user_action_observer.rb +25 -0
- data/app/views/admin/configuration/edit.html.haml +38 -0
- data/app/views/admin/configuration/show.html.haml +58 -0
- data/app/views/admin/extensions/index.html.haml +41 -0
- data/app/views/admin/layouts/_form.html.haml +39 -0
- data/app/views/admin/layouts/edit.html.haml +9 -0
- data/app/views/admin/layouts/index.html.haml +35 -0
- data/app/views/admin/layouts/new.html.haml +7 -0
- data/app/views/admin/layouts/remove.html.haml +16 -0
- data/app/views/admin/page_fields/_page_field.html.haml +12 -0
- data/app/views/admin/page_parts/_page_part.html.haml +18 -0
- data/app/views/admin/pages/_fields.html.haml +71 -0
- data/app/views/admin/pages/_meta_row.html.haml +8 -0
- data/app/views/admin/pages/_node.html.haml +26 -0
- data/app/views/admin/pages/_popups.html.haml +27 -0
- data/app/views/admin/pages/children.html.haml +2 -0
- data/app/views/admin/pages/edit.html.haml +12 -0
- data/app/views/admin/pages/index.html.haml +26 -0
- data/app/views/admin/pages/new.html.haml +10 -0
- data/app/views/admin/pages/remove.html.haml +18 -0
- data/app/views/admin/preferences/edit.html.haml +44 -0
- data/app/views/admin/references/_tag_reference.haml +3 -0
- data/app/views/admin/references/filters.haml +6 -0
- data/app/views/admin/references/tags.haml +30 -0
- data/app/views/admin/users/_avatar.html.haml +5 -0
- data/app/views/admin/users/_form.html.haml +53 -0
- data/app/views/admin/users/_password_fields.html.haml +18 -0
- data/app/views/admin/users/edit.html.haml +9 -0
- data/app/views/admin/users/index.html.haml +39 -0
- data/app/views/admin/users/new.html.haml +6 -0
- data/app/views/admin/users/remove.html.haml +16 -0
- data/app/views/admin/welcome/login.html.haml +23 -0
- data/app/views/layouts/application.html.haml +50 -0
- data/app/views/site/not_found.html.haml +3 -0
- data/bin/ci/before_script +15 -0
- data/bin/trusty_cms +53 -0
- data/config/application.rb +124 -0
- data/config/boot.rb +9 -0
- data/config/compass.config +15 -0
- data/config/database.db2.yml +20 -0
- data/config/database.mysql.yml +25 -0
- data/config/database.postgresql.yml +25 -0
- data/config/database.sqlite.yml +16 -0
- data/config/database.sqlserver.yml +20 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +19 -0
- data/config/environments/production.rb +27 -0
- data/config/environments/test.rb +35 -0
- data/config/initializers/active_record_extensions.rb +1 -0
- data/config/initializers/configuration_extensions.rb +0 -0
- data/config/initializers/haml.rb +2 -0
- data/config/initializers/object_extensions.rb +1 -0
- data/config/initializers/radiant_config.rb +16 -0
- data/config/initializers/rails_patch.rb +2 -0
- data/config/initializers/response_cache_timeout.rb +3 -0
- data/config/initializers/string_extensions.rb +1 -0
- data/config/initializers/symbol_extensions.rb +1 -0
- data/config/initializers/tmp.rb +2 -0
- data/config/locales/en.yml +230 -0
- data/config/locales/en_available_tags.yml +625 -0
- data/config/preinitializer.rb +18 -0
- data/config/routes.rb +30 -0
- data/db/migrate/001_create_radiant_tables.rb +75 -0
- data/db/migrate/002_insert_initial_data.rb +12 -0
- data/db/migrate/003_rename_behavior_column.rb +9 -0
- data/db/migrate/004_rename_filter_column.rb +11 -0
- data/db/migrate/005_add_virtual_column_to_page.rb +9 -0
- data/db/migrate/006_integer_columns_to_boolean.rb +36 -0
- data/db/migrate/007_remove_virtual_column_from_page.rb +9 -0
- data/db/migrate/008_add_virtual_column_to_page_again.rb +9 -0
- data/db/migrate/009_add_content_type_field_to_layout.rb +9 -0
- data/db/migrate/010_merge_behaviors_and_pages.rb +57 -0
- data/db/migrate/011_rename_type_column_on_page_to_class_name.rb +9 -0
- data/db/migrate/012_create_extension_meta.rb +13 -0
- data/db/migrate/013_add_notes_field_to_user.rb +9 -0
- data/db/migrate/014_rename_config_default_parts_key.rb +17 -0
- data/db/migrate/015_add_optimistic_locking.rb +15 -0
- data/db/migrate/016_add_sessions.rb +16 -0
- data/db/migrate/017_rename_created_by_updated_by_columns.rb +15 -0
- data/db/migrate/018_add_description_and_keywords_to_pages.rb +11 -0
- data/db/migrate/019_add_salt_to_users.rb +11 -0
- data/db/migrate/020_add_session_info_to_users.rb +11 -0
- data/db/migrate/021_remove_session_expire_from_users.rb +9 -0
- data/db/migrate/20081203140407_add_indexes.rb +19 -0
- data/db/migrate/20090226140109_add_user_language.rb +9 -0
- data/db/migrate/20090929164633_rename_developer_role_to_designer.rb +9 -0
- data/db/migrate/20091003095744_change_user_language_to_locale.rb +9 -0
- data/db/migrate/20100805154952_add_page_fields.rb +15 -0
- data/db/migrate/20100805155020_convert_page_metas.rb +24 -0
- data/db/migrate/20100810151922_add_field_name_index.rb +11 -0
- data/db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb +13 -0
- data/db/migrate/20111016150725_extend_page_part_content_limit.rb +15 -0
- data/db/migrate/20120209231801_change_pages_allowed_children_cache_to_text.rb +11 -0
- data/db/schema.rb +128 -0
- data/lib/active_record_extensions/active_record_extensions.rb +27 -0
- data/lib/annotatable.rb +68 -0
- data/lib/configuration_extensions/configuration_extensions.rb +357 -0
- data/lib/generators/extension/USAGE +30 -0
- data/lib/generators/extension/extension_generator.rb +97 -0
- data/lib/generators/extension/templates/README.md +6 -0
- data/lib/generators/extension/templates/RSpecRakefile +109 -0
- data/lib/generators/extension/templates/Rakefile +25 -0
- data/lib/generators/extension/templates/cucumber.yml +1 -0
- data/lib/generators/extension/templates/cucumber_env.rb +11 -0
- data/lib/generators/extension/templates/cucumber_paths.rb +22 -0
- data/lib/generators/extension/templates/en.yml +3 -0
- data/lib/generators/extension/templates/extension.rb +21 -0
- data/lib/generators/extension/templates/functional_test.rb +15 -0
- data/lib/generators/extension/templates/gemspec.rb +29 -0
- data/lib/generators/extension/templates/lib.rb +8 -0
- data/lib/generators/extension/templates/migration.rb +9 -0
- data/lib/generators/extension/templates/radiant_config.rb +3 -0
- data/lib/generators/extension/templates/routes.rb +5 -0
- data/lib/generators/extension/templates/spec.opts +6 -0
- data/lib/generators/extension/templates/spec_helper.rb +42 -0
- data/lib/generators/extension/templates/tasks.rake +47 -0
- data/lib/generators/extension/templates/test_helper.rb +26 -0
- data/lib/generators/extension_controller/USAGE +36 -0
- data/lib/generators/extension_controller/extension_controller_generator.rb +84 -0
- data/lib/generators/extension_controller/templates/controller.rb +10 -0
- data/lib/generators/extension_controller/templates/controller_spec.rb +23 -0
- data/lib/generators/extension_controller/templates/functional_test.rb +11 -0
- data/lib/generators/extension_controller/templates/helper.rb +2 -0
- data/lib/generators/extension_controller/templates/helper_spec.rb +11 -0
- data/lib/generators/extension_controller/templates/helper_test.rb +4 -0
- data/lib/generators/extension_controller/templates/view.html.erb +2 -0
- data/lib/generators/extension_controller/templates/view_spec.rb +12 -0
- data/lib/generators/extension_mailer/USAGE +17 -0
- data/lib/generators/extension_mailer/extension_mailer_generator.rb +68 -0
- data/lib/generators/extension_mailer/templates/fixture.erb +3 -0
- data/lib/generators/extension_mailer/templates/mailer.rb +15 -0
- data/lib/generators/extension_mailer/templates/unit_test.rb +21 -0
- data/lib/generators/extension_mailer/templates/view.erb +3 -0
- data/lib/generators/extension_migration/USAGE +34 -0
- data/lib/generators/extension_migration/extension_migration_generator.rb +25 -0
- data/lib/generators/extension_migration/templates/migration.rb +11 -0
- data/lib/generators/extension_model/USAGE +35 -0
- data/lib/generators/extension_model/extension_model_generator.rb +68 -0
- data/lib/generators/extension_model/templates/fixtures.yml +19 -0
- data/lib/generators/extension_model/templates/migration.rb +16 -0
- data/lib/generators/extension_model/templates/model.rb +2 -0
- data/lib/generators/extension_model/templates/model_spec.rb +11 -0
- data/lib/generators/extension_model/templates/unit_test.rb +8 -0
- data/lib/generators/generator_base_extension.rb +16 -0
- data/lib/generators/instance/instance_generator.rb +148 -0
- data/lib/generators/instance/templates/databases/db2.yml +40 -0
- data/lib/generators/instance/templates/databases/mysql.yml +47 -0
- data/lib/generators/instance/templates/databases/postgresql.yml +44 -0
- data/lib/generators/instance/templates/databases/sqlite3.yml +16 -0
- data/lib/generators/instance/templates/databases/sqlserver.yml +21 -0
- data/lib/generators/instance/templates/instance_boot.rb +122 -0
- data/lib/generators/instance/templates/instance_config.ru +2 -0
- data/lib/generators/instance/templates/instance_environment.rb +83 -0
- data/lib/generators/instance/templates/instance_gemfile +81 -0
- data/lib/generators/instance/templates/instance_generate +6 -0
- data/lib/generators/instance/templates/instance_radiant_config.rb +16 -0
- data/lib/generators/instance/templates/instance_rakefile +3 -0
- data/lib/generators/instance/templates/instance_routes.rb +1 -0
- data/lib/generators/language_extension/USAGE +27 -0
- data/lib/generators/language_extension/language_extension_generator.rb +71 -0
- data/lib/generators/language_extension/templates/README +3 -0
- data/lib/generators/language_extension/templates/RSpecRakefile +123 -0
- data/lib/generators/language_extension/templates/Rakefile +25 -0
- data/lib/generators/language_extension/templates/available_tags.yml +553 -0
- data/lib/generators/language_extension/templates/cucumber.yml +1 -0
- data/lib/generators/language_extension/templates/cucumber_env.rb +16 -0
- data/lib/generators/language_extension/templates/cucumber_paths.rb +14 -0
- data/lib/generators/language_extension/templates/extension.rb +12 -0
- data/lib/generators/language_extension/templates/functional_test.rb +15 -0
- data/lib/generators/language_extension/templates/gemspec.rb +24 -0
- data/lib/generators/language_extension/templates/lang.yml +181 -0
- data/lib/generators/language_extension/templates/lib.rb +8 -0
- data/lib/generators/language_extension/templates/spec.opts +6 -0
- data/lib/generators/language_extension/templates/spec_helper.rb +36 -0
- data/lib/generators/language_extension/templates/tasks.rake +28 -0
- data/lib/generators/language_extension/templates/test_helper.rb +26 -0
- data/lib/inheritable_class_attributes.rb +65 -0
- data/lib/local_time.rb +6 -0
- data/lib/login_system.rb +132 -0
- data/lib/method_observer.rb +50 -0
- data/lib/object_extensions/object_extensions.rb +5 -0
- data/lib/simpleton.rb +21 -0
- data/lib/string_extensions/string_extensions.rb +25 -0
- data/lib/symbol_extensions/symbol_extensions.rb +5 -0
- data/lib/tasks/database.rake +85 -0
- data/lib/tasks/environments.rake +11 -0
- data/lib/tasks/extensions.rake +85 -0
- data/lib/tasks/framework.rake +255 -0
- data/lib/tasks/instance.rake +23 -0
- data/lib/tasks/prototype.rake +31 -0
- data/lib/tasks/radiant_config.rake +18 -0
- data/lib/tasks/release.rake +131 -0
- data/lib/tasks/translate.rake +59 -0
- data/lib/tasks/undefine.rake +28 -0
- data/lib/translation_support.rb +54 -0
- data/lib/trusty_cms/admin_ui/region_partials.rb +23 -0
- data/lib/trusty_cms/admin_ui/region_set.rb +35 -0
- data/lib/trusty_cms/admin_ui.rb +244 -0
- data/lib/trusty_cms/available_locales.rb +19 -0
- data/lib/trusty_cms/cache.rb +100 -0
- data/lib/trusty_cms/config/definition.rb +142 -0
- data/lib/trusty_cms/engine.rb +10 -0
- data/lib/trusty_cms/extension/script.rb +395 -0
- data/lib/trusty_cms/extension.rb +146 -0
- data/lib/trusty_cms/extension_loader.rb +130 -0
- data/lib/trusty_cms/extension_migrator.rb +98 -0
- data/lib/trusty_cms/extension_path.rb +200 -0
- data/lib/trusty_cms/initializer.rb +162 -0
- data/lib/trusty_cms/pagination/controller.rb +41 -0
- data/lib/trusty_cms/pagination/link_renderer.rb +34 -0
- data/lib/trusty_cms/resource_responses.rb +121 -0
- data/lib/trusty_cms/setup.rb +227 -0
- data/lib/trusty_cms/taggable.rb +138 -0
- data/lib/trusty_cms/task_support.rb +66 -0
- data/lib/trusty_cms.rb +19 -0
- data/log/.keep +0 -0
- data/public/.htaccess +40 -0
- data/public/404.html +8 -0
- data/public/500.html +8 -0
- data/public/dispatch.cgi +10 -0
- data/public/dispatch.fcgi +24 -0
- data/public/dispatch.rb +10 -0
- data/public/favicon.ico +0 -0
- data/public/images/admin/add_tab.png +0 -0
- data/public/images/admin/avatar_32x32.png +0 -0
- data/public/images/admin/avatar_64x64.png +0 -0
- data/public/images/admin/avatar_96x96.png +0 -0
- data/public/images/admin/brown_bottom_line.gif +0 -0
- data/public/images/admin/calendar_down.gif +0 -0
- data/public/images/admin/collapse.png +0 -0
- data/public/images/admin/draft_page.png +0 -0
- data/public/images/admin/expand.png +0 -0
- data/public/images/admin/image.png +0 -0
- data/public/images/admin/javascript.png +0 -0
- data/public/images/admin/layout.png +0 -0
- data/public/images/admin/metadata_toggle.png +0 -0
- data/public/images/admin/minus.png +0 -0
- data/public/images/admin/minus_disabled.png +0 -0
- data/public/images/admin/minus_grey.png +0 -0
- data/public/images/admin/navigation_secondary_separator.gif +0 -0
- data/public/images/admin/page.png +0 -0
- data/public/images/admin/plus.png +0 -0
- data/public/images/admin/plus_disabled.png +0 -0
- data/public/images/admin/plus_grey.png +0 -0
- data/public/images/admin/popup_border_background.png +0 -0
- data/public/images/admin/popup_border_bottom_left.png +0 -0
- data/public/images/admin/popup_border_bottom_right.png +0 -0
- data/public/images/admin/popup_border_top_left.png +0 -0
- data/public/images/admin/popup_border_top_right.png +0 -0
- data/public/images/admin/search.png +0 -0
- data/public/images/admin/single_form_shadow.png +0 -0
- data/public/images/admin/snippet.png +0 -0
- data/public/images/admin/spinner.gif +0 -0
- data/public/images/admin/status_background.png +0 -0
- data/public/images/admin/status_bottom_left.png +0 -0
- data/public/images/admin/status_bottom_right.png +0 -0
- data/public/images/admin/status_spinner.gif +0 -0
- data/public/images/admin/status_top_left.png +0 -0
- data/public/images/admin/status_top_right.png +0 -0
- data/public/images/admin/stylesheet.png +0 -0
- data/public/images/admin/tab_close.png +0 -0
- data/public/images/admin/upload.png +0 -0
- data/public/images/admin/virtual_page.png +0 -0
- data/public/images/radiant/radiant-badge-color.png +0 -0
- data/public/javascripts/admin/application.js +94 -0
- data/public/javascripts/admin/codearea.js +165 -0
- data/public/javascripts/admin/controls.js +965 -0
- data/public/javascripts/admin/cookie.js +80 -0
- data/public/javascripts/admin/dateinput.js +402 -0
- data/public/javascripts/admin/dragdrop.js +974 -0
- data/public/javascripts/admin/dropdown.js +216 -0
- data/public/javascripts/admin/effects.js +1122 -0
- data/public/javascripts/admin/lowpro.js +340 -0
- data/public/javascripts/admin/overrides.js +1 -0
- data/public/javascripts/admin/page_preview.js +41 -0
- data/public/javascripts/admin/pagefield.js +54 -0
- data/public/javascripts/admin/pagestatus.js +17 -0
- data/public/javascripts/admin/popup.js +339 -0
- data/public/javascripts/admin/prototype.js +4874 -0
- data/public/javascripts/admin/ruledtable.js +13 -0
- data/public/javascripts/admin/shortcuts.js +33 -0
- data/public/javascripts/admin/sitemap.js +149 -0
- data/public/javascripts/admin/status.js +233 -0
- data/public/javascripts/admin/tabcontrol.js +123 -0
- data/public/javascripts/admin/toggle.js +430 -0
- data/public/javascripts/admin/utility.js +53 -0
- data/public/javascripts/admin/validationerror.js +18 -0
- data/public/loading-iframe.html +11 -0
- data/public/robots.txt +1 -0
- data/public/stylesheets/sass/admin/_base.sass +18 -0
- data/public/stylesheets/sass/admin/main.sass +27 -0
- data/public/stylesheets/sass/admin/modules/_boxes.sass +6 -0
- data/public/stylesheets/sass/admin/modules/_gradients.sass +4 -0
- data/public/stylesheets/sass/admin/modules/_links.sass +18 -0
- data/public/stylesheets/sass/admin/overrides.sass +2 -0
- data/public/stylesheets/sass/admin/partials/_actions.sass +96 -0
- data/public/stylesheets/sass/admin/partials/_avatars.sass +10 -0
- data/public/stylesheets/sass/admin/partials/_content.sass +58 -0
- data/public/stylesheets/sass/admin/partials/_dateinput.sass +62 -0
- data/public/stylesheets/sass/admin/partials/_deprecated.sass +55 -0
- data/public/stylesheets/sass/admin/partials/_dropdown.sass +28 -0
- data/public/stylesheets/sass/admin/partials/_footer.sass +12 -0
- data/public/stylesheets/sass/admin/partials/_forms.sass +322 -0
- data/public/stylesheets/sass/admin/partials/_header.sass +114 -0
- data/public/stylesheets/sass/admin/partials/_index.sass +147 -0
- data/public/stylesheets/sass/admin/partials/_layout.sass +10 -0
- data/public/stylesheets/sass/admin/partials/_messages.sass +10 -0
- data/public/stylesheets/sass/admin/partials/_popup.sass +213 -0
- data/public/stylesheets/sass/admin/partials/_tabcontrol.sass +72 -0
- data/public/stylesheets/sass/admin/partials/_toolbar.sass +31 -0
- data/public/stylesheets/sass/admin/partials/_typography.sass +60 -0
- data/public/stylesheets/sass/admin/partials/_validations.sass +19 -0
- data/rails/init.rb +1 -0
- data/script/about +4 -0
- data/script/breakpointer +3 -0
- data/script/console +3 -0
- data/script/dbconsole +3 -0
- data/script/destroy +3 -0
- data/script/extension +5 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/performance/request +3 -0
- data/script/plugin +3 -0
- data/script/process/inspector +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/process/spinner +3 -0
- data/script/rails +6 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/script/version +5 -0
- data/spec/ci/database.mysql.yml +4 -0
- data/spec/ci/database.postgresql.yml +4 -0
- data/spec/ci/database.sqlite.yml +3 -0
- data/trusty_cms.gemspec +50 -0
- metadata +781 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
- form_for [:admin, @layout], :html => {'data-onsubmit_status' => onsubmit_status(@layout)} do |f|
|
2
|
+
= f.hidden_field :lock_version
|
3
|
+
= render_region :form_top, :locals => {:f => f}
|
4
|
+
.form_area
|
5
|
+
- render_region :form, :locals => {:f => f} do |form|
|
6
|
+
- form.edit_title do
|
7
|
+
%p.title
|
8
|
+
= f.label :name, t('name')
|
9
|
+
= f.text_field :name, :maxlength => 100, :class => "textbox"
|
10
|
+
- form.edit_extended_metadata do
|
11
|
+
.drawer
|
12
|
+
.drawer_contents#attributes
|
13
|
+
%table.fieldset
|
14
|
+
%tr
|
15
|
+
%th.label= f.label :content_type, t('content_type')
|
16
|
+
%td.field= f.text_field :content_type, :maxlength => 40, :class => "textbox"
|
17
|
+
= render_region :extended_metadata, :locals => {:f => f}
|
18
|
+
.drawer_handle
|
19
|
+
%a.toggle{:href=>'#attributes', :rel=>"toggle[attributes]", :class=>"#{(meta_errors? ? 'less' : 'more')}"}= meta_label
|
20
|
+
- form.edit_content do
|
21
|
+
%p.content
|
22
|
+
= f.label :layout_content, "Body"
|
23
|
+
~ f.text_area :content, :size => "40x20", :style => "width: 100%", :class => "textarea large"
|
24
|
+
= javascript_tag "$('layout_name').activate()"
|
25
|
+
- render_region :form_bottom, :locals => {:f => f} do |form_bottom|
|
26
|
+
- form_bottom.reference_links do
|
27
|
+
%p
|
28
|
+
%span.reference_links
|
29
|
+
Reference:
|
30
|
+
%span{:id => "tag_reference_link"}
|
31
|
+
= link_to_function t('available_tags'), "loadTagReference('Page');"
|
32
|
+
- form_bottom.edit_buttons do
|
33
|
+
.buttons
|
34
|
+
= save_model_button @layout
|
35
|
+
= save_model_and_continue_editing_button @layout
|
36
|
+
= t('or')
|
37
|
+
= link_to t('cancel'), admin_layouts_url
|
38
|
+
- form_bottom.edit_timestamp do
|
39
|
+
= updated_stamp @layout
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- @page_title = @layout.name + ' ' + t('layout') + ' - ' + default_page_title
|
2
|
+
|
3
|
+
- render_region :main do |main|
|
4
|
+
- main.edit_header do
|
5
|
+
%h1= t('edit_layout')
|
6
|
+
- main.edit_form do
|
7
|
+
= render :partial => 'form'
|
8
|
+
|
9
|
+
- content_for 'page_scripts', layout_edit_javascripts
|
@@ -0,0 +1,35 @@
|
|
1
|
+
- @page_title = t('layouts') + ' - ' + default_page_title
|
2
|
+
|
3
|
+
.outset
|
4
|
+
= render_region :top
|
5
|
+
%table.index#layouts
|
6
|
+
%thead
|
7
|
+
%tr
|
8
|
+
- render_region :thead do |thead|
|
9
|
+
- thead.title_header do
|
10
|
+
%th.name
|
11
|
+
= t('layout')
|
12
|
+
- thead.actions_header do
|
13
|
+
%th.actions{:style=>"width:9em"}
|
14
|
+
= t('modify')
|
15
|
+
%tbody
|
16
|
+
- if @layouts.any?
|
17
|
+
- @layouts.each do |layout|
|
18
|
+
%tr[layout]
|
19
|
+
- render_region :tbody, :locals => {:layout => layout} do |tbody|
|
20
|
+
- tbody.title_cell do
|
21
|
+
%td.name
|
22
|
+
= link_to image('layout', :alt => '') + ' ' + layout.name, edit_admin_layout_url(layout)
|
23
|
+
- tbody.actions_cell do
|
24
|
+
%td.actions
|
25
|
+
= link_to image('minus') + ' ' + t('remove'), remove_admin_layout_url(layout), :class => "action"
|
26
|
+
- else
|
27
|
+
%tr
|
28
|
+
%td.empty{:colspan => admin.layout.index.tbody.length}= t('no_layouts')
|
29
|
+
|
30
|
+
- render_region :bottom do |bottom|
|
31
|
+
- bottom.new_button do
|
32
|
+
#actions
|
33
|
+
= pagination_for(@layouts)
|
34
|
+
%ul
|
35
|
+
%li= link_to image('plus') + " " + t('new_layout'), new_admin_layout_url, :class => 'action_button'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%h1= t('remove_layout')
|
2
|
+
|
3
|
+
%p= t('text.layouts.remove_warning')
|
4
|
+
|
5
|
+
%table.index#layouts
|
6
|
+
%tbody
|
7
|
+
%tr.node.level_1
|
8
|
+
%td.layout
|
9
|
+
= image('layout', :alt => '')
|
10
|
+
= h @layout.name
|
11
|
+
|
12
|
+
- form_for [:admin, @layout], :html => { :method => 'delete', 'data-onsubmit_status'=>"Removing layout…" } do
|
13
|
+
.buttons
|
14
|
+
%input.button{:type => "submit", :value => t('delete_layout') }/
|
15
|
+
= t('or')
|
16
|
+
= link_to t('cancel'), admin_layouts_url
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%tr
|
2
|
+
%th.label
|
3
|
+
%label{:for=>"page_#{page_field.name}"}= page_field.name
|
4
|
+
%td.field
|
5
|
+
= hidden_field_tag "page[fields_attributes][#{page_field_counter}][id]", page_field.id, :id => "page_fields_attributes_#{page_field_counter}_id" unless page_field.new_record?
|
6
|
+
= hidden_field_tag "page[fields_attributes][#{page_field_counter}][name]", page_field.name, :id => "page_fields_attributes_#{page_field_counter}_name", :class => "page_field_name"
|
7
|
+
= hidden_field_tag "page[fields_attributes][#{page_field_counter}][_destroy]", page_field._destroy, :class => 'delete_input'
|
8
|
+
~ text_field_tag "page[fields_attributes][#{page_field_counter}][content]", page_field.content, :id => "page_fields_attributes_#{page_field_counter}_content", :class => "textbox", :maxlength => 200
|
9
|
+
%td.actions
|
10
|
+
- link_to '#add_field_popup', :class=>'popup', :alt => t('add_field') do
|
11
|
+
= image 'plus_grey'
|
12
|
+
= link_to_function image('minus_grey', :alt => t('remove_field')), "event.stop(); window.removeField(this)", :title => t('remove_field')
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.page{:id => "page_#{page_part.name.to_slug}", 'data-caption'=>h(page_part.name)}
|
2
|
+
.part{:id => "part-#{page_part.name.to_slug}"}
|
3
|
+
= hidden_field_tag "page[parts_attributes][#{page_part_counter}][name]", page_part.name, :id => "part_#{page_part.name.to_slug}_name"
|
4
|
+
= hidden_field_tag "page[parts_attributes][#{page_part_counter}][id]", page_part.id, :id => "part_#{page_part_counter}_id", :class => "id_input" unless page_part.new_record?
|
5
|
+
= hidden_field_tag "page[parts_attributes][#{page_part_counter}][_destroy]", page_part._destroy, :class => "delete_input"
|
6
|
+
%p
|
7
|
+
%label{:for => "part_#{page_part.name.to_slug}_filter_id"}
|
8
|
+
= t('filter')
|
9
|
+
= select_tag "page[parts_attributes][#{page_part_counter}][filter_id]", filter_options_for_select(page_part.filter_id), :id => "part_#{page_part.name.to_slug}_filter_id"
|
10
|
+
%span.reference_links
|
11
|
+
= t('reference')
|
12
|
+
%span{:id => "filter_reference_link_#{page_part.name.to_slug}"}
|
13
|
+
= link_to_function t('filter'), "loadFilterReference('#{page_part.name.to_slug}');"
|
14
|
+
%span{:id => "tag_reference_link_#{page_part.name.to_slug}"}
|
15
|
+
= link_to_function t('available_tags'), "loadTagReference('#{page_part.name.to_slug}');"
|
16
|
+
= render_region :part_controls, :locals => {:page_part => page_part}
|
17
|
+
%div
|
18
|
+
~ text_area_tag "page[parts_attributes][#{page_part_counter}][content]", page_part.content, :class => "textarea large", :style => "width: 100%", :id => "part_#{page_part.name.to_slug}_content"
|
@@ -0,0 +1,71 @@
|
|
1
|
+
- include_javascript 'admin/page_preview'
|
2
|
+
= fields.hidden_field :lock_version
|
3
|
+
= fields.hidden_field :parent_id
|
4
|
+
= fields.hidden_field :class_name
|
5
|
+
|
6
|
+
= render_region :form_top, :locals => {:f => fields}
|
7
|
+
|
8
|
+
- render_region :form, :locals => {:f => fields} do |form|
|
9
|
+
- form.edit_title do
|
10
|
+
%p.title
|
11
|
+
%label{:for=>"page_title"}= t('page_title')
|
12
|
+
= fields.text_field :title, :class => 'textbox', :maxlength => 255
|
13
|
+
- form.edit_extended_metadata do
|
14
|
+
.drawer
|
15
|
+
.drawer_contents#attributes
|
16
|
+
%table.fieldset
|
17
|
+
= render :partial => "meta_row", :collection => @meta, :locals => {:f => fields}
|
18
|
+
= render :partial => 'admin/page_fields/page_field', :collection => @page.fields
|
19
|
+
= render_region :extended_metadata, :locals => {:f => fields}
|
20
|
+
.drawer_handle
|
21
|
+
%a.toggle{:href=>'#attributes', :rel=>"toggle[attributes]", :class=>"#{(meta_errors? ? 'less' : 'more')}"}= meta_label
|
22
|
+
- form.edit_page_parts do
|
23
|
+
#tab_control
|
24
|
+
#tabs.tabs
|
25
|
+
#tab_toolbar
|
26
|
+
%a.popup{:href=> '#add_part_popup', :title=>t('add_part')}
|
27
|
+
= image('add_tab', :alt=>t('add_part'), :title=>"")
|
28
|
+
#pages.pages
|
29
|
+
= render :partial => 'admin/page_parts/page_part', :collection => @page.parts
|
30
|
+
= render_region :parts_bottom, :locals => {:f => fields}
|
31
|
+
|
32
|
+
.set
|
33
|
+
- render_region :layout, :locals => {:f => fields} do |layout|
|
34
|
+
- layout.edit_layout do
|
35
|
+
%p
|
36
|
+
= fields.label :layout_id, t('layout')
|
37
|
+
= fields.select :layout_id, [[t('select.inherit') , '']] + Layout.all.map { |s| [s.name, s.id] }
|
38
|
+
- layout.edit_type do
|
39
|
+
%p
|
40
|
+
= fields.label :class_name, t('page_type')
|
41
|
+
= fields.select :class_name, [[t('select.normal'), '']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first }
|
42
|
+
- layout.edit_status do
|
43
|
+
%p
|
44
|
+
= fields.label :status_id, t('status')
|
45
|
+
= fields.select :status_id, status_to_display
|
46
|
+
- layout.edit_published_at do
|
47
|
+
%p#published_at{:class => (@page.published? ? nil : 'hidden')}
|
48
|
+
= fields.label :published_at, t('published_on')
|
49
|
+
= fields.text_field :published_at, :class=> "date", :value => (@page.published_at? ? I18n.localize(@page.published_at.to_date, :format =>:long) : nil)
|
50
|
+
= render_region :layout_row, :locals => {:f => fields}
|
51
|
+
|
52
|
+
- render_region :form_bottom, :locals => {:f => fields} do |form_bottom|
|
53
|
+
- form_bottom.edit_buttons do
|
54
|
+
- @buttons_partials.each do |partial|
|
55
|
+
= render :partial => partial, :locals => {:f => fields}
|
56
|
+
.buttons{:style=>"clear: left"}
|
57
|
+
= save_model_button(@page)
|
58
|
+
= save_model_and_continue_editing_button(@page)
|
59
|
+
= submit_tag(t('preview', :default => 'Preview'), :class => 'button', :id => 'show-preview')
|
60
|
+
= t('or')
|
61
|
+
= link_to t('cancel'), admin_pages_url
|
62
|
+
#preview_panel.fullcover.grey_out{:style => 'display: none;'}
|
63
|
+
%iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => ActionController::Base.relative_url_root.to_s + '/loading-iframe.html', :frameborder => 0, :scrolling => "auto"}
|
64
|
+
.preview_tools
|
65
|
+
=submit_tag(t('buttons.save_changes'), :class => 'big save_changes')
|
66
|
+
=submit_tag(t('buttons.save_and_continue'), :class => 'big save_and_continue', :name => 'continue')
|
67
|
+
%span.info
|
68
|
+
= t('or')
|
69
|
+
=link_to(t('edit_page'),{}, :class => 'cancel')
|
70
|
+
- form_bottom.edit_timestamp do
|
71
|
+
= updated_stamp @page
|
@@ -0,0 +1,8 @@
|
|
1
|
+
%tr
|
2
|
+
%th.label
|
3
|
+
%label{:for=>"page_#{meta_row[:field]}"}= t(meta_row[:field])
|
4
|
+
%td.field= f.send(meta_row[:type], meta_row[:field], *meta_row[:args])
|
5
|
+
%td.actions
|
6
|
+
- if meta_row_counter+1 == @meta.size
|
7
|
+
- link_to '#add_field_popup', :class=>'popup' do
|
8
|
+
= image 'plus_grey', :alt => t('add_field')
|
@@ -0,0 +1,26 @@
|
|
1
|
+
%tr.page{:class =>"level_#{level}#{children_class}#{virtual_class}", :id => "page_#{page.id}"}
|
2
|
+
- render_region :node, :locals => {:page => page, :level => level, :simple => simple} do |node|
|
3
|
+
- node.title_column do
|
4
|
+
%td.name{:style => "padding-left: #{padding_left(level)}px"}
|
5
|
+
%span.w1
|
6
|
+
- if simple
|
7
|
+
= icon
|
8
|
+
= node_title
|
9
|
+
- else
|
10
|
+
= expander(level) + link_to("#{icon} #{node_title}", edit_admin_page_url(page), :title => page.path)
|
11
|
+
= page_type
|
12
|
+
= spinner
|
13
|
+
- node.status_column do
|
14
|
+
- unless simple
|
15
|
+
%td.status
|
16
|
+
%span.status{:class => "#{page.status.name.downcase}_status", :title => "#{timestamp(page.published_at) if page.published_at}"}= t(page.status.name.downcase)
|
17
|
+
- node.actions_column do
|
18
|
+
- unless simple
|
19
|
+
%td.actions
|
20
|
+
= page.add_child_option
|
21
|
+
= page.remove_option
|
22
|
+
|
23
|
+
- if expanded
|
24
|
+
- page.children.each do |child|
|
25
|
+
- child.becomes(child.class_name.constantize) if child.class_name.present?
|
26
|
+
= render_node child, :level => level + 1, :simple => simple
|
@@ -0,0 +1,27 @@
|
|
1
|
+
- content_for 'popups' do
|
2
|
+
#add_part_popup.popup{:style => "display: none"}
|
3
|
+
#add_part_busy.busy{:style => "display: none"}= image('spinner.gif', :alt => "")
|
4
|
+
.popup_title= t('add_part')
|
5
|
+
- form_for([:admin, PagePart.new], :html => { :onsubmit => "addPart(this); return false" }) do |f|
|
6
|
+
%p
|
7
|
+
%label{:for => 'part_name_field'}= t('name')
|
8
|
+
= f.text_field :name, :id => 'part_name_field', :maxlength => 100, :style => "width: 15em", :class => "textbox big"
|
9
|
+
= hidden_field_tag 'index', 0, :id => 'page_part_index_field'
|
10
|
+
.buttons
|
11
|
+
= submit_tag t('add_part'), :id => 'add_part_button', :class => "button"
|
12
|
+
= t('or')
|
13
|
+
= link_to_function t('cancel'), "$(this).closePopup()", :class=>"cancel"
|
14
|
+
#add_field_popup.popup{:style=>"display: none"}
|
15
|
+
#add_field_busy.busy{:style=>"display: none"}= image('spinner.gif', :alt => "")
|
16
|
+
.popup_title= t('add_field')
|
17
|
+
- form_for [:admin, PageField.new], :html => { :onsubmit => "event.stop(); addField(this)" } do |f|
|
18
|
+
%p
|
19
|
+
%label{:for=>"page_field_name"}= t('name')
|
20
|
+
= f.text_field :name, :maxlength=>100, :class=>'textbox big', :style=>"width: 15em"
|
21
|
+
= hidden_field_tag 'index', 2, :id=>'page_field_index_field'
|
22
|
+
= hidden_field_tag 'page_field_counter', @page.fields.size
|
23
|
+
.buttons
|
24
|
+
= submit_tag t('add_field'), :class=>'button', :id=>'add_page_field_button'
|
25
|
+
= t('or')
|
26
|
+
= link_to_function t('cancel'), "$(this).closePopup()", :class=>"cancel"
|
27
|
+
= render_region :popups
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- @page_title = @page.title + ' - ' + default_page_title
|
2
|
+
|
3
|
+
- render_region :main do |main|
|
4
|
+
- main.edit_header do
|
5
|
+
%h1= t('edit_page')
|
6
|
+
- main.edit_form do
|
7
|
+
- form_for :page, @page, :url => admin_page_path(@page), :html => {:method => :put, :multipart => true, :id => 'edit_page', 'data-onsubmit_status'=>t('saving_changes')} do |fields|
|
8
|
+
= render :partial => "fields", :object => fields
|
9
|
+
- main.edit_popups do
|
10
|
+
= render :partial => "popups"
|
11
|
+
|
12
|
+
- content_for 'page_scripts', page_edit_javascripts
|
@@ -0,0 +1,26 @@
|
|
1
|
+
- @page_title = t('pages') + ' - ' + default_page_title
|
2
|
+
|
3
|
+
.outset
|
4
|
+
= render_region :top
|
5
|
+
%table.index#pages{:summary=>t('page_hierarchy')}
|
6
|
+
%thead
|
7
|
+
%tr
|
8
|
+
- render_region :sitemap_head do |sitemap_head|
|
9
|
+
- sitemap_head.title_column_header do
|
10
|
+
%th.name= t('page')
|
11
|
+
- sitemap_head.status_column_header do
|
12
|
+
%th.status= t('status')
|
13
|
+
- sitemap_head.actions_column_header do
|
14
|
+
%th.actions= t('modify')
|
15
|
+
%tbody
|
16
|
+
- if @homepage
|
17
|
+
= render_node @homepage
|
18
|
+
- else
|
19
|
+
%tr
|
20
|
+
%td.empty{:colspan => admin.page.index.node.length}= t('no_pages')
|
21
|
+
= render_region :bottom
|
22
|
+
|
23
|
+
- unless @homepage
|
24
|
+
#actions
|
25
|
+
%ul
|
26
|
+
%li= link_to image('plus') + ' ' + t("new_homepage"), new_admin_page_path, :class => 'action_button'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- render_region :main do |main|
|
2
|
+
- main.edit_header do
|
3
|
+
%h1= t('new_page')
|
4
|
+
- main.edit_form do
|
5
|
+
- form_for :page, @page, :url => admin_pages_path, :html => {:id => 'new_page', :multipart => true, 'data-onsubmit_status'=>"Creating page…"} do |f|
|
6
|
+
= render :partial => "fields", :object => f
|
7
|
+
- main.edit_popups do
|
8
|
+
= render :partial => "popups"
|
9
|
+
|
10
|
+
- content_for 'page_scripts', page_edit_javascripts
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- pages = @page.children.count > 1 ? t('pages') : t('page')
|
2
|
+
|
3
|
+
%h1
|
4
|
+
= t('remove_pages', :pages => pages)
|
5
|
+
|
6
|
+
%p
|
7
|
+
= t('text.pages.remove_warning', :pages => pages)
|
8
|
+
|
9
|
+
.inset
|
10
|
+
%table.index#site_map
|
11
|
+
%tbody
|
12
|
+
= render_node @page, :simple => true
|
13
|
+
|
14
|
+
- form_for [:admin, @page.becomes(Page)], :html => {:method => :delete, 'data-onsubmit_status'=>"Removing pages…"} do
|
15
|
+
.buttons
|
16
|
+
%input.button{:type=>"submit", :value => t('delete_pages', :pages => pages) }/
|
17
|
+
= t('or')
|
18
|
+
= link_to t('cancel'), admin_pages_url
|
@@ -0,0 +1,44 @@
|
|
1
|
+
- @page_title = @user.name + ' ' + t('preferences') + ' - ' + default_page_title
|
2
|
+
- body_classes << 'edit_personal_preferences'
|
3
|
+
|
4
|
+
- render_region :main do |main|
|
5
|
+
- main.edit_header do
|
6
|
+
%h1= t('personal_preferences')
|
7
|
+
|
8
|
+
- main.edit_form do
|
9
|
+
- form_for @user, :url => admin_preferences_url, :html => { :method => :put, 'data-onsubmit_status' => "#{t('saving_preferences')}…" } do |f|
|
10
|
+
|
11
|
+
= render :partial => 'admin/users/avatar'
|
12
|
+
|
13
|
+
= render_region :form_top, :locals => {:f => f}
|
14
|
+
|
15
|
+
- render_region :form, :locals => {:f => f} do |form|
|
16
|
+
- form.edit_name do
|
17
|
+
%p
|
18
|
+
= f.label :name, t("name")
|
19
|
+
= f.text_field :name, :class => "textbox activate", :size => 32, :maxlength => 100
|
20
|
+
|
21
|
+
- form.edit_email do
|
22
|
+
%p
|
23
|
+
= f.label :email, t("email_address"), :class => "optional"
|
24
|
+
= f.text_field "email", :class => 'textbox', :size => 32, :maxlength => 255
|
25
|
+
|
26
|
+
- form.edit_username do
|
27
|
+
%p
|
28
|
+
= f.label :login, t("username")
|
29
|
+
= f.text_field "login", :class => "textbox", :size => 32, :maxlength => 40
|
30
|
+
|
31
|
+
- form.edit_password do
|
32
|
+
= render "admin/users/password_fields", :f => f
|
33
|
+
|
34
|
+
- form.edit_locale do
|
35
|
+
%p
|
36
|
+
= f.label :locale, t('language')
|
37
|
+
= f.select "locale", available_locales_select
|
38
|
+
|
39
|
+
- render_region :form_bottom, :locals => {:f => f} do |form_bottom|
|
40
|
+
- form_bottom.edit_buttons do
|
41
|
+
.buttons
|
42
|
+
= save_model_button @user
|
43
|
+
= t('or')
|
44
|
+
= link_to t('cancel'), admin_url
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.popup
|
2
|
+
.popup_title
|
3
|
+
=t('available_tags_for', :name => _display_name)
|
4
|
+
%p
|
5
|
+
%label.inline{:for => "search_#{class_of_page.name.underscore}_tag_reference"} Filter Tags
|
6
|
+
%input{:id => "search_#{class_of_page.name.underscore}_tag_reference", :type => "search", :name => "search_tag_reference"}/
|
7
|
+
%span#tag_search_found_count.info
|
8
|
+
.reference= tag_reference
|
9
|
+
%p.close_link= link_to_function "Close Help", "$(this).closePopup()"
|
10
|
+
:javascript
|
11
|
+
var tags, searchingOn = "";
|
12
|
+
var found_count = 0;
|
13
|
+
var popup = $('search_#{class_of_page.name.underscore}_tag_reference').up('.popup');
|
14
|
+
new Form.Element.Observer('search_#{class_of_page.name.underscore}_tag_reference', 0.5, function(element, value) {
|
15
|
+
if (!tags) tags = popup.select('.reference .tag_description');
|
16
|
+
if (value.length < 3 && searchingOn != "") {
|
17
|
+
searchingOn = "";
|
18
|
+
found_count = tags.length;
|
19
|
+
tags.invoke('show');
|
20
|
+
$('tag_search_found_count').update('Found '+found_count+' tags').highlight();
|
21
|
+
} else if (value.length >= 3 && searchingOn != value) {
|
22
|
+
searchingOn = value;
|
23
|
+
found_count = tags.length;
|
24
|
+
tags.each(function(div) {
|
25
|
+
if (!div.hasWord(value)) found_count=--found_count;
|
26
|
+
div[div.hasWord(value) ? 'show' : 'hide']();
|
27
|
+
});
|
28
|
+
$('tag_search_found_count').update('Found '+found_count+' tags').highlight();
|
29
|
+
}
|
30
|
+
});
|
@@ -0,0 +1,53 @@
|
|
1
|
+
- form_for [:admin, @user] do |f|
|
2
|
+
= hidden_field "user", "lock_version"
|
3
|
+
|
4
|
+
= render :partial => 'avatar' unless @user.new_record?
|
5
|
+
|
6
|
+
= render_region :form_top, :locals => {:f => f}
|
7
|
+
|
8
|
+
- render_region :form, :locals => {:f => f} do |form|
|
9
|
+
- form.edit_name do
|
10
|
+
%p
|
11
|
+
= f.label :name, t('name')
|
12
|
+
= f.text_field :name, :class => "textbox activate", :size => 32, :maxlength => 100
|
13
|
+
|
14
|
+
- form.edit_email do
|
15
|
+
%p
|
16
|
+
= f.label :email, t('email_address') , :class => "optional"
|
17
|
+
= f.text_field "email", :class => 'textbox', :size => 32, :maxlength => 255
|
18
|
+
|
19
|
+
- form.edit_username do
|
20
|
+
%p
|
21
|
+
= f.label :login, t('username')
|
22
|
+
= f.text_field "login", :class => "textbox", :size => 32, :maxlength => 40, :autocomplete => 'off'
|
23
|
+
|
24
|
+
- form.edit_password do
|
25
|
+
= render "password_fields", :f => f
|
26
|
+
|
27
|
+
- form.edit_roles do
|
28
|
+
%p
|
29
|
+
%label.multi_option= t('roles')
|
30
|
+
= f.check_box "admin", :class => "checkbox"
|
31
|
+
= f.label :admin, t('admin'), :class => "checkbox"
|
32
|
+
= f.check_box "designer", :class => "checkbox"
|
33
|
+
= f.label :designer, t('designer'), :class => "checkbox"
|
34
|
+
|
35
|
+
- form.edit_locale do
|
36
|
+
%p
|
37
|
+
= f.label :locale, t('language')
|
38
|
+
= f.select "locale", available_locales_select
|
39
|
+
|
40
|
+
- form.edit_notes do
|
41
|
+
%p
|
42
|
+
= f.label :notes, t('notes'), :class => "optional"
|
43
|
+
~ f.text_area "notes", :size => "53x4", :class => "textarea"
|
44
|
+
|
45
|
+
- render_region :form_bottom, :locals => {:f => f} do |form_bottom|
|
46
|
+
- form_bottom.edit_buttons do
|
47
|
+
.buttons
|
48
|
+
= save_model_button(@user)
|
49
|
+
= save_model_and_continue_editing_button(@user)
|
50
|
+
= t('or')
|
51
|
+
= link_to t('cancel'), admin_users_path
|
52
|
+
- form_bottom.edit_timestamp do
|
53
|
+
= updated_stamp @user
|
@@ -0,0 +1,18 @@
|
|
1
|
+
%p#display_password{:style=> (@user.new_record? or !@user.valid?) ? "display: none" : nil}
|
2
|
+
%label= t('password')
|
3
|
+
%span.value
|
4
|
+
•••••
|
5
|
+
%a.action{:href=>"#", :onclick=>" $('display_password').hide(); $('change_password').show()"}= t('change')
|
6
|
+
.set#change_password{:style=> (!@user.new_record? && @user.valid?) ? "display: none" : nil}
|
7
|
+
%p
|
8
|
+
= f.label :password, t('new_password')
|
9
|
+
= f.password_field "password", :class => "textbox big", :value => "", :size => 15, :maxlength => 40, :autocomplete => 'off'
|
10
|
+
%p
|
11
|
+
= f.label :password_confirmation, t('password_confirmation')
|
12
|
+
= f.password_field "password_confirmation", :class => "textbox big", :value => "", :size => 15, :maxlength => 40, :autocomplete => 'off'
|
13
|
+
- unless @user.new_record?
|
14
|
+
%span
|
15
|
+
= t('or')
|
16
|
+
%a{:href=>"#", :onclick=>" $('display_password').show(); $('change_password').hide()"}= t('cancel')
|
17
|
+
|
18
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
- @page_title = t('users') + ' - ' + default_page_title
|
2
|
+
|
3
|
+
= render_region :top
|
4
|
+
|
5
|
+
.outset
|
6
|
+
%table.index#users
|
7
|
+
%thead
|
8
|
+
%tr
|
9
|
+
- render_region :thead do |thead|
|
10
|
+
- thead.title_header do
|
11
|
+
%th.user== #{t('name')} / #{t('username')}
|
12
|
+
- thead.roles_header do
|
13
|
+
%th.roles= t('roles')
|
14
|
+
- thead.actions_header do
|
15
|
+
%th.actions{:style=>"width:9em"}= t('modify')
|
16
|
+
%tbody
|
17
|
+
- @users.each do |user|
|
18
|
+
%tr[user]
|
19
|
+
- render_region :tbody, :locals => {:user => user} do |tbody|
|
20
|
+
- tbody.title_cell do
|
21
|
+
%td.name
|
22
|
+
= link_to image_tag(gravatar_url(user.email, :size=>"32px"), :class=>"avatar avatar_32x32", :width=>32, :height=>32, :alt=>""), edit_admin_user_url(user)
|
23
|
+
= link_to user.name, edit_admin_user_url(user)
|
24
|
+
%span.login (#{h user.login})
|
25
|
+
- tbody.roles_cell do
|
26
|
+
%td.roles= roles(user)
|
27
|
+
- tbody.actions_cell do
|
28
|
+
%td.actions
|
29
|
+
- if user == current_user
|
30
|
+
%span.action.disabled= image('minus_disabled') + ' ' + t('remove')
|
31
|
+
- else
|
32
|
+
= link_to image('minus') + ' ' + t('remove'), remove_admin_user_url(user), :class => "action"
|
33
|
+
|
34
|
+
- render_region :bottom do |bottom|
|
35
|
+
- bottom.new_button do
|
36
|
+
#actions
|
37
|
+
= pagination_for(@users)
|
38
|
+
%ul
|
39
|
+
%li= link_to image('plus') + " " + t('new_user'), new_admin_user_url, :class => 'action_button'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%h1= t('remove_user')
|
2
|
+
|
3
|
+
%p
|
4
|
+
= t('text.users.remove_warning')
|
5
|
+
|
6
|
+
%table.index#users
|
7
|
+
%tbody
|
8
|
+
%tr.node.level_1
|
9
|
+
%td.user
|
10
|
+
%span.title= @user.name
|
11
|
+
|
12
|
+
- form_for [:admin, @user], :html => { :method => :delete, 'data-onsubmit_status'=>"Removing user…" } do
|
13
|
+
.buttons
|
14
|
+
%input.button{:type=>"submit", :value => t('delete_user')}/
|
15
|
+
= t('or')
|
16
|
+
= link_to t('cancel'), admin_users_path
|
@@ -0,0 +1,23 @@
|
|
1
|
+
- body_classes << "single_form"
|
2
|
+
|
3
|
+
#single_form
|
4
|
+
%h1= t('please_login')
|
5
|
+
|
6
|
+
= form_tag login_url do
|
7
|
+
%p
|
8
|
+
%label{:for=>"username_or_email"}= t('username_or_email')
|
9
|
+
= text_field_tag "username_or_email", @username_or_email, :class => 'textbox activate', :maxlength => 40, :size => 40
|
10
|
+
%p
|
11
|
+
%label{:for=>"password"}= t('password')
|
12
|
+
= password_field_tag "password", '', :class => 'textbox password', :maxlength => 40, :size => 40
|
13
|
+
%p.remember_me
|
14
|
+
= check_box_tag :remember_me, 1, false, :class => 'checkbox'
|
15
|
+
%label.checkbox{:for=>"remember_me"}= t('remember_me_in_this_browser')
|
16
|
+
.buttons
|
17
|
+
%input.button{:type => "submit", :value => t('login')}
|
18
|
+
|
19
|
+
%p.version
|
20
|
+
= t('powered_by')
|
21
|
+
%a{ :href => "http://radiantcms.org" } TrustyCms CMS
|
22
|
+
= t('version')
|
23
|
+
= TrustyCms.loaded_via_gem? ? "#{TrustyCms::Version} (gem)." : "#{TrustyCms::Version}."
|