underworld 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE +339 -0
- data/Rakefile +48 -0
- data/app/assets/fonts/DroidNaskh-Bold.ttf +0 -0
- data/app/assets/fonts/DroidNaskh-Regular.ttf +0 -0
- data/app/assets/fonts/OpenSans-Bold.ttf +0 -0
- data/app/assets/fonts/OpenSans-BoldItalic.ttf +0 -0
- data/app/assets/fonts/OpenSans-ExtraBold.ttf +0 -0
- data/app/assets/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- data/app/assets/fonts/OpenSans-Italic.ttf +0 -0
- data/app/assets/fonts/OpenSans-Light.ttf +0 -0
- data/app/assets/fonts/OpenSans-LightItalic.ttf +0 -0
- data/app/assets/fonts/OpenSans-Regular.ttf +0 -0
- data/app/assets/fonts/OpenSans-Semibold.ttf +0 -0
- data/app/assets/fonts/OpenSans-SemiboldItalic.ttf +0 -0
- data/app/assets/images/underworld/select2-spinner.gif +0 -0
- data/app/assets/images/underworld/select2.png +0 -0
- data/app/assets/images/underworld/select2x2.png +0 -0
- data/app/assets/javascripts/underworld/application.js +16 -0
- data/app/assets/javascripts/underworld/dashboard/application.js.erb +30 -0
- data/app/assets/javascripts/underworld/dashboard/functions.js.erb +50 -0
- data/app/assets/javascripts/underworld/dashboard/init.js.coffee +33 -0
- data/app/assets/javascripts/underworld/dashboard/lib/actions.js +7 -0
- data/app/assets/javascripts/underworld/dashboard/lib/amd.js.coffee.erb +0 -0
- data/app/assets/javascripts/underworld/dashboard/lib/flash_message.js +71 -0
- data/app/assets/javascripts/underworld/dashboard/lib/locale.js +14 -0
- data/app/assets/javascripts/underworld/dashboard/lib/misc.js +5 -0
- data/app/assets/javascripts/underworld/dashboard/lib/string.js +3 -0
- data/app/assets/javascripts/underworld/dashboard/lib/ujs_patches.js.coffee +28 -0
- data/app/assets/javascripts/underworld/dashboard/manifest.js +5 -0
- data/app/assets/javascripts/underworld/dashboard/variables.js.erb +6 -0
- data/app/assets/javascripts/underworld/groups.js +2 -0
- data/app/assets/javascripts/underworld/home.js +2 -0
- data/app/assets/javascripts/underworld/i18n.js +13 -0
- data/app/assets/javascripts/underworld/simple.js +20 -0
- data/app/assets/javascripts/underworld/users.js +2 -0
- data/app/assets/stylesheets/underworld/dashboard/loadindicator.scss +17 -0
- data/app/assets/stylesheets/underworld/dashboard/ltr/application.css +38 -0
- data/app/assets/stylesheets/underworld/dashboard/ltr/base.css.scss +0 -0
- data/app/assets/stylesheets/underworld/dashboard/rtl/application.css +11 -0
- data/app/assets/stylesheets/underworld/dashboard/rtl/base.css.scss +0 -0
- data/app/assets/stylesheets/underworld/dashboard/share.scss +62 -0
- data/app/assets/stylesheets/underworld/dashboard/variables.scss +9 -0
- data/app/assets/stylesheets/underworld/ltr/application.css +0 -0
- data/app/assets/stylesheets/underworld/rtl/application.css +0 -0
- data/app/assets/stylesheets/underworld/simple/ltr/application.css +2 -0
- data/app/assets/stylesheets/underworld/simple/rtl/application.css +2 -0
- data/app/assets/stylesheets/underworld/simple/rtl/rtl.scss +16 -0
- data/app/assets/stylesheets/underworld/simple/share.scss +11 -0
- data/app/controllers/underworld/api_controller.rb +133 -0
- data/app/controllers/underworld/application_controller.rb +16 -0
- data/app/controllers/underworld/assets_controller.rb +6 -0
- data/app/controllers/underworld/dashboard/application_controller.rb +43 -0
- data/app/controllers/underworld/dashboard/groups_controller.rb +85 -0
- data/app/controllers/underworld/dashboard/profile_controller.rb +49 -0
- data/app/controllers/underworld/dashboard/user_messages_controller.rb +27 -0
- data/app/controllers/underworld/dashboard/users_controller.rb +116 -0
- data/app/controllers/underworld/dashboard_controller.rb +16 -0
- data/app/controllers/underworld/omniauth/callbacks_controller.rb +24 -0
- data/app/helpers/underworld/application_helper.rb +4 -0
- data/app/helpers/underworld/dashboard_helper.rb +107 -0
- data/app/helpers/underworld/groups_helper.rb +4 -0
- data/app/helpers/underworld/home_helper.rb +4 -0
- data/app/helpers/underworld/users_helper.rb +8 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/underworld/concerns/assignment.rb +16 -0
- data/app/models/underworld/concerns/user/auth_definitions.rb +87 -0
- data/app/models/underworld/concerns/user/gravatar.rb +11 -0
- data/app/models/underworld/concerns/user/mongoid_fields.rb +81 -0
- data/app/models/underworld/concerns/user/permission.rb +47 -0
- data/app/models/underworld/concerns/user/user_roles.rb +24 -0
- data/app/models/underworld/group.rb +57 -0
- data/app/models/underworld/permission.rb +43 -0
- data/app/models/underworld/user.rb +81 -0
- data/app/models/underworld/user_message.rb +6 -0
- data/app/policies/underworld/admin_only_policy.rb +66 -0
- data/app/policies/underworld/application_policy.rb +55 -0
- data/app/policies/underworld/group_policy.rb +8 -0
- data/app/policies/underworld/user_message_policy.rb +9 -0
- data/app/policies/underworld/user_policy.rb +9 -0
- data/app/views/angular/auth/groups/details.html +2 -0
- data/app/views/angular/auth/groups/index.html +2 -0
- data/app/views/angular/auth/groups/new.html +2 -0
- data/app/views/angular/auth/index.html +30 -0
- data/app/views/angular/auth/profile/edit.html +54 -0
- data/app/views/angular/auth/users/details.html +28 -0
- data/app/views/angular/auth/users/index.html +6 -0
- data/app/views/angular/auth/users/new.html +57 -0
- data/app/views/angular/conversations/details.html +19 -0
- data/app/views/angular/conversations/index.html +13 -0
- data/app/views/angular/conversations/new.html +39 -0
- data/app/views/angular/conversations/show.html +6 -0
- data/app/views/angular/conversations/show_details.html +15 -0
- data/app/views/angular/fields/boolean/boolean.html +4 -0
- data/app/views/angular/fields/control-combo/control-list.html +19 -0
- data/app/views/angular/fields/datetime/datetime.html +10 -0
- data/app/views/angular/fields/datetime/time.html +25 -0
- data/app/views/angular/fields/file/file.html.slim +0 -0
- data/app/views/angular/fields/float/float.html +4 -0
- data/app/views/angular/fields/image/image.html +1 -0
- data/app/views/angular/fields/integer/integer.html +4 -0
- data/app/views/angular/fields/relation/relation.html +44 -0
- data/app/views/angular/fields/string/string.html +22 -0
- data/app/views/angular/fields/tag/tag.html +1 -0
- data/app/views/angular/fields/text/text.html +4 -0
- data/app/views/angular/filter/index.html +15 -0
- data/app/views/angular/index.html +3 -0
- data/app/views/angular/locale/fa.po +25 -0
- data/app/views/angular/locale/templates.pot +24 -0
- data/app/views/angular/logs/index.html +6 -0
- data/app/views/angular/modules.html +0 -0
- data/app/views/angular/nav.html.erb +39 -0
- data/app/views/angular/underworld/views/generic_add_view.html.slim +5 -0
- data/app/views/devise/registrations/edit.html.erb +29 -0
- data/app/views/devise/registrations/new.html.erb +38 -0
- data/app/views/devise/sessions/new.html.erb +37 -0
- data/app/views/devise/shared/_links.erb +19 -0
- data/app/views/devise/shared/_omni_link.erb +33 -0
- data/app/views/kaminari/_first_page.html.slim +3 -0
- data/app/views/kaminari/_gap.html.slim +2 -0
- data/app/views/kaminari/_last_page.html.slim +3 -0
- data/app/views/kaminari/_next_page.html.slim +3 -0
- data/app/views/kaminari/_page.html.slim +3 -0
- data/app/views/kaminari/_paginator.html.slim +13 -0
- data/app/views/kaminari/_prev_page.html.slim +3 -0
- data/app/views/layouts/underworld/application.html.erb +79 -0
- data/app/views/layouts/underworld/dashboard.html.erb +52 -0
- data/app/views/layouts/underworld/simple.html.erb +27 -0
- data/app/views/underworld/api/v1/conversations/create.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/conversations/destroy.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/conversations/index.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/conversations/reply.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/conversations/show.json.jbuilder +14 -0
- data/app/views/underworld/api/v1/conversations/trash.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/groups/create.json.jbuilder +4 -0
- data/app/views/underworld/api/v1/groups/destroy.html.erb +2 -0
- data/app/views/underworld/api/v1/groups/destroy.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/groups/edit.html.erb +2 -0
- data/app/views/underworld/api/v1/groups/index.html.erb +2 -0
- data/app/views/underworld/api/v1/groups/index.json.jbuilder +6 -0
- data/app/views/underworld/api/v1/groups/new.html.erb +2 -0
- data/app/views/underworld/api/v1/groups/show.html.erb +2 -0
- data/app/views/underworld/api/v1/groups/show.json.jbuilder +5 -0
- data/app/views/underworld/api/v1/groups/update.json.jbuilder +4 -0
- data/app/views/underworld/api/v1/logs/index.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/permissions/index.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/permissions/user_permissions.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/users/create.html.erb +2 -0
- data/app/views/underworld/api/v1/users/create.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/users/destroy.json.jbuilder +1 -0
- data/app/views/underworld/api/v1/users/distroy.html.erb +2 -0
- data/app/views/underworld/api/v1/users/edit.html.erb +2 -0
- data/app/views/underworld/api/v1/users/index.html.erb +2 -0
- data/app/views/underworld/api/v1/users/index.json.jbuilder +4 -0
- data/app/views/underworld/api/v1/users/show.html.erb +2 -0
- data/app/views/underworld/api/v1/users/show.json.jbuilder +2 -0
- data/app/views/underworld/api/v1/users/update.json.jbuilder +1 -0
- data/app/views/underworld/dashboard/groups/_form.html.slim +68 -0
- data/app/views/underworld/dashboard/groups/create.js.erb +3 -0
- data/app/views/underworld/dashboard/groups/edit.html.slim +3 -0
- data/app/views/underworld/dashboard/groups/errors.js.erb +3 -0
- data/app/views/underworld/dashboard/groups/index.html.slim +47 -0
- data/app/views/underworld/dashboard/groups/new.html.slim +2 -0
- data/app/views/underworld/dashboard/groups/update.js.erb +3 -0
- data/app/views/underworld/dashboard/index.html.erb +0 -0
- data/app/views/underworld/dashboard/login_required_page.html.erb +5 -0
- data/app/views/underworld/dashboard/not_found.html.slim +9 -0
- data/app/views/underworld/dashboard/not_found.js.erb +1 -0
- data/app/views/underworld/dashboard/profile/_form.html.erb +33 -0
- data/app/views/underworld/dashboard/profile/_profile_form.html.erb +33 -0
- data/app/views/underworld/dashboard/profile/create.js.erb +3 -0
- data/app/views/underworld/dashboard/profile/edit.html.erb +2 -0
- data/app/views/underworld/dashboard/profile/edit_password.html.erb +2 -0
- data/app/views/underworld/dashboard/profile/errors.js.erb +3 -0
- data/app/views/underworld/dashboard/resource/_form.html.slim +33 -0
- data/app/views/underworld/dashboard/resource/_input.html.slim +3 -0
- data/app/views/underworld/dashboard/resource/create.js.erb +3 -0
- data/app/views/underworld/dashboard/resource/destroy.js.erb +2 -0
- data/app/views/underworld/dashboard/resource/edit.html.slim +3 -0
- data/app/views/underworld/dashboard/resource/index.html.slim +60 -0
- data/app/views/underworld/dashboard/resource/new.html.slim +2 -0
- data/app/views/underworld/dashboard/resource/show.html.slim +22 -0
- data/app/views/underworld/dashboard/resource/update.js.erb +3 -0
- data/app/views/underworld/dashboard/shared/_content_header.html.slim +15 -0
- data/app/views/underworld/dashboard/shared/_control_sidebar.html.slim +50 -0
- data/app/views/underworld/dashboard/shared/_footer.html.slim +7 -0
- data/app/views/underworld/dashboard/shared/_header.html.erb +98 -0
- data/app/views/underworld/dashboard/shared/_sidebar.html.erb +69 -0
- data/app/views/underworld/dashboard/shared/_toolbar.html.slim +0 -0
- data/app/views/underworld/dashboard/shared/errors.js.erb +3 -0
- data/app/views/underworld/dashboard/user_messages/_form.html.slim +0 -0
- data/app/views/underworld/dashboard/user_messages/create.js.erb +0 -0
- data/app/views/underworld/dashboard/user_messages/destroy.js.erb +0 -0
- data/app/views/underworld/dashboard/user_messages/new.html.slim +72 -0
- data/app/views/underworld/dashboard/users/_form.html.slim +73 -0
- data/app/views/underworld/dashboard/users/_password_form.html.slim +37 -0
- data/app/views/underworld/dashboard/users/create.js.erb +3 -0
- data/app/views/underworld/dashboard/users/destroy.js.erb +2 -0
- data/app/views/underworld/dashboard/users/edit.html.slim +3 -0
- data/app/views/underworld/dashboard/users/edit_password.html.slim +1 -0
- data/app/views/underworld/dashboard/users/errors.js.erb +3 -0
- data/app/views/underworld/dashboard/users/index.html.slim +66 -0
- data/app/views/underworld/dashboard/users/new.html.slim +2 -0
- data/app/views/underworld/dashboard/users/show.html.slim +6 -0
- data/app/views/underworld/dashboard/users/update.js.erb +3 -0
- data/app/views/underworld/dashboard/users/update_password.js.erb +3 -0
- data/app/views/underworld/relations/_belongs_to.json.jbuilder +11 -0
- data/config/initializers/devise.rb +24 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/locales/devise.fa.yml +58 -0
- data/config/locales/underworld.en.yml +96 -0
- data/config/locales/underworld.fa.yml +108 -0
- data/config/routes.rb +43 -0
- data/config/spring.rb +1 -0
- data/db/migrate/20131013091000_devise_create_underworld_users.rb +65 -0
- data/db/migrate/20131020124701_create_underworld_groups.rb +15 -0
- data/db/migrate/20131021170923_create_underworld_permissions.rb +15 -0
- data/db/migrate/20131123120422_add_permissions_groups_table.rb +16 -0
- data/db/migrate/20140613120923_add_users_groups_table.rb +13 -0
- data/db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb +11 -0
- data/db/migrate/20160310105736_create_underworld_user_messages.rb +25 -0
- data/db/seeds.rb +49 -0
- data/lib/generators/underworld/install_generator.rb +108 -0
- data/lib/generators/underworld/resource_generator.rb +70 -0
- data/lib/generators/underworld/resources_generator.rb +20 -0
- data/lib/generators/underworld/templates/README +21 -0
- data/lib/generators/underworld/templates/SPECS +13 -0
- data/lib/generators/underworld/templates/api/controller.rb.erb +60 -0
- data/lib/generators/underworld/templates/api_controller.rb +2 -0
- data/lib/generators/underworld/templates/dashboard/controller.rb.erb +2 -0
- data/lib/generators/underworld/templates/dashboard_controller.rb +18 -0
- data/lib/generators/underworld/templates/devise.rb +251 -0
- data/lib/generators/underworld/templates/features/api.feature +92 -0
- data/lib/generators/underworld/templates/features/api.step.rb +7 -0
- data/lib/generators/underworld/templates/features/step_definitions/email_steps.rb +206 -0
- data/lib/generators/underworld/templates/features/support/email_spec.rb +1 -0
- data/lib/generators/underworld/templates/features/support/env.rb +79 -0
- data/lib/generators/underworld/templates/javascripts/application.js +19 -0
- data/lib/generators/underworld/templates/policy/application_policy.rb +2 -0
- data/lib/generators/underworld/templates/policy/policy.rb.erb +2 -0
- data/lib/generators/underworld/templates/seeds.rb +1 -0
- data/lib/generators/underworld/templates/spec/factories/groups.rb +5 -0
- data/lib/generators/underworld/templates/spec/factories/users.rb +10 -0
- data/lib/generators/underworld/templates/spec/spec_helper.rb +69 -0
- data/lib/generators/underworld/templates/spec/support/devise.rb +3 -0
- data/lib/generators/underworld/templates/stylesheets/dashboard/ltr/application.css +3 -0
- data/lib/generators/underworld/templates/stylesheets/dashboard/rtl/application.css +3 -0
- data/lib/generators/underworld/templates/stylesheets/ltr/application.css +3 -0
- data/lib/generators/underworld/templates/stylesheets/rtl/application.css +3 -0
- data/lib/generators/underworld/templates/underworld.rb +12 -0
- data/lib/generators/underworld/templates/views/create.json.jbuilder.erb +3 -0
- data/lib/generators/underworld/templates/views/destroy.json.jbuilder.erb +1 -0
- data/lib/generators/underworld/templates/views/index.json.jbuilder.erb +13 -0
- data/lib/generators/underworld/templates/views/show.json.jbuilder.erb +6 -0
- data/lib/generators/underworld/templates/views/update.json.jbuilder.erb +6 -0
- data/lib/generators/underworld/views_generator.rb +57 -0
- data/lib/tasks/docs.rake +6 -0
- data/lib/tasks/sync.rake +9 -0
- data/lib/tasks/underworld_tasks.rake +38 -0
- data/lib/underworld.rb +35 -0
- data/lib/underworld/action_dispatch.rb +3 -0
- data/lib/underworld/api.rb +42 -0
- data/lib/underworld/api/groups_api.rb +41 -0
- data/lib/underworld/api/permissions_api.rb +24 -0
- data/lib/underworld/api/root.rb +15 -0
- data/lib/underworld/api/users_api.rb +20 -0
- data/lib/underworld/concerns.rb +7 -0
- data/lib/underworld/concerns/authorizable.rb +81 -0
- data/lib/underworld/configuration.rb +97 -0
- data/lib/underworld/dashboard.rb +11 -0
- data/lib/underworld/dashboard/dsl.rb +41 -0
- data/lib/underworld/dashboard/dsl/base.rb +133 -0
- data/lib/underworld/dashboard/dsl/create.rb +116 -0
- data/lib/underworld/dashboard/dsl/form_fields_properties.rb +62 -0
- data/lib/underworld/dashboard/dsl/index.rb +45 -0
- data/lib/underworld/dashboard/dsl/show.rb +6 -0
- data/lib/underworld/dashboard/dsl/update.rb +6 -0
- data/lib/underworld/dashboard/helpers/box_helpers.rb +129 -0
- data/lib/underworld/dashboard/models.rb +2 -0
- data/lib/underworld/dashboard/models/sidebar.rb +139 -0
- data/lib/underworld/dashboard/sections.rb +2 -0
- data/lib/underworld/dashboard/sections/resource.rb +229 -0
- data/lib/underworld/dashboard/sections/resource_create.rb +263 -0
- data/lib/underworld/dashboard/sections/resource_destroy.rb +27 -0
- data/lib/underworld/dashboard/sections/resource_show.rb +96 -0
- data/lib/underworld/dashboard/sections/resources_index.rb +113 -0
- data/lib/underworld/dashboard/sections/sidebar.rb +41 -0
- data/lib/underworld/discovery.rb +8 -0
- data/lib/underworld/discovery/permissions.rb +49 -0
- data/lib/underworld/engine.rb +53 -0
- data/lib/underworld/exceptions.rb +7 -0
- data/lib/underworld/extension.rb +18 -0
- data/lib/underworld/extension/base.rb +29 -0
- data/lib/underworld/fake_assets.rb +5 -0
- data/lib/underworld/i18n.rb +101 -0
- data/lib/underworld/initialize.rb +0 -0
- data/lib/underworld/liquid.rb +7 -0
- data/lib/underworld/liquid/block.rb +14 -0
- data/lib/underworld/liquid/render_tag.rb +50 -0
- data/lib/underworld/liquid/tag.rb +51 -0
- data/lib/underworld/middlewares.rb +1 -0
- data/lib/underworld/middlewares/locale.rb +29 -0
- data/lib/underworld/omniauth.rb +8 -0
- data/lib/underworld/omniauth/callbacks.rb +39 -0
- data/lib/underworld/orm.rb +30 -0
- data/lib/underworld/routes.rb +117 -0
- data/lib/underworld/version.rb +3 -0
- data/test/controllers/underworld/dashboard/resource_test.rb +118 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/dashboard/application.js +19 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/dashboard/ltr/application.css +3 -0
- data/test/dummy/app/assets/stylesheets/dashboard/rtl/application.css +3 -0
- data/test/dummy/app/assets/stylesheets/ltr/application.css +3 -0
- data/test/dummy/app/assets/stylesheets/rtl/application.css +3 -0
- data/test/dummy/app/controllers/api_controller.rb +2 -0
- data/test/dummy/app/controllers/application_controller.rb +6 -0
- data/test/dummy/app/controllers/dashboard/application_controller.rb +18 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/policies/application_policy.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +38 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/devise.rb +251 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/formstatic.rb +76 -0
- data/test/dummy/config/initializers/formtastic.rb +110 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/kaminari_config.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/underworld.rb +11 -0
- data/test/dummy/config/initializers/underworld_assets.rb +1 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +13 -0
- data/test/dummy/lib/templates/slim/scaffold/_form.html.slim +8 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fabricators/underworld/groups.rb +27 -0
- data/test/fabricators/underworld/permissions.rb +14 -0
- data/test/fabricators/underworld/users.rb +17 -0
- data/test/generators/install_generator_test.rb +84 -0
- data/test/integration/underworld/authentication_test.rb +36 -0
- data/test/integration/underworld/dashboard_test.rb +64 -0
- data/test/test_helper.rb +72 -0
- metadata +1045 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
= render partial: 'password_form'
|
@@ -0,0 +1,66 @@
|
|
1
|
+
.row
|
2
|
+
.col-xs-12
|
3
|
+
.box.box-default
|
4
|
+
.box-header.with-border
|
5
|
+
h3.box-title
|
6
|
+
= t('underworld.users')
|
7
|
+
.box-tools
|
8
|
+
- new_user = underworld.new_dashboard_auth_user_path
|
9
|
+
a.btn.btn-success.pull-right.btn-sm href=(new_user)
|
10
|
+
i.fa.fa-plus
|
11
|
+
= t('underworld.dashboard.index_section.add_button' , resource: t('underworld.user.user'))
|
12
|
+
|
13
|
+
.box-body.no-padding
|
14
|
+
table.table.table-striped
|
15
|
+
tbody
|
16
|
+
tr
|
17
|
+
th
|
18
|
+
|#
|
19
|
+
th
|
20
|
+
= t("underworld.user.first_name")
|
21
|
+
th
|
22
|
+
= t("underworld.user.last_name")
|
23
|
+
th
|
24
|
+
= t("underworld.user.email")
|
25
|
+
th
|
26
|
+
= t('created_at')
|
27
|
+
th
|
28
|
+
= t('underworld.user.last_signed_in_at')
|
29
|
+
th
|
30
|
+
= t('underworld.dashboard.actions')
|
31
|
+
|
32
|
+
- @users.each do |user|
|
33
|
+
- edit_target = underworld.edit_dashboard_auth_user_path(id: user.id)
|
34
|
+
- show_target = underworld.dashboard_auth_user_path(id: user.id)
|
35
|
+
tr id=("user_#{user.id}")
|
36
|
+
|
37
|
+
td
|
38
|
+
= user.id
|
39
|
+
td
|
40
|
+
- if user.first_name.nil?
|
41
|
+
|-
|
42
|
+
- else
|
43
|
+
= user.first_name
|
44
|
+
td
|
45
|
+
- if user.last_name.nil?
|
46
|
+
| -
|
47
|
+
- else
|
48
|
+
= user.last_name
|
49
|
+
td
|
50
|
+
a href=(show_target)
|
51
|
+
= user.email
|
52
|
+
td
|
53
|
+
= localized_time(user.created_at)
|
54
|
+
td
|
55
|
+
- if user.last_sign_in_at.nil?
|
56
|
+
| -
|
57
|
+
- else
|
58
|
+
= user.last_sign_in_at
|
59
|
+
td.btn-user
|
60
|
+
a.warning.link.pull-left href=(edit_target)
|
61
|
+
i.fa.fa-edit
|
62
|
+
a.pass-change.link.pull-left href=(underworld.auth_users_edit_password_dashboard_auth_user_path({id: user.id}))
|
63
|
+
i.fa.fa-key.change-pass
|
64
|
+
a.link.pull-left href=(show_target) data-remote="true" data-method="delete"
|
65
|
+
i.fa.fa-remove.btn-remove
|
66
|
+
.box-footer
|
@@ -0,0 +1,24 @@
|
|
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
|
+
|
5
|
+
if Rails.env.development? || Rails.env.test?
|
6
|
+
config.secret_key = '04671846f794e5df0e032abb7d3d3876016f1cf0a1ced726429b2807c798de67f08035cc45e953eca23e08661a7f8030f4bcaec91ef184d89f4c721b5925d36b'
|
7
|
+
else
|
8
|
+
config.secret_key = ENV['DEVISE_SECRET_KEY'] || ENV["SECRET_KEY_BASE"]
|
9
|
+
end
|
10
|
+
|
11
|
+
# ==> Mountable engine configurations
|
12
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
13
|
+
# is mountable, there are some extra configurations to be taken into account.
|
14
|
+
# The following options are available, assuming the engine is mounted as:
|
15
|
+
#
|
16
|
+
# mount MyEngine, at: '/my_engine'
|
17
|
+
#
|
18
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
19
|
+
config.router_name = :underworld
|
20
|
+
#
|
21
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
22
|
+
# so you need to do it manually. For the users scope, it would be:
|
23
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
24
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your account was successfully confirmed. You are now signed in."
|
7
|
+
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
|
9
|
+
failure:
|
10
|
+
already_authenticated: "You are already signed in."
|
11
|
+
inactive: "Your account is not activated yet."
|
12
|
+
invalid: "Invalid email or password."
|
13
|
+
invalid_token: "Invalid authentication token."
|
14
|
+
locked: "Your account is locked."
|
15
|
+
not_found_in_database: "Invalid email or password."
|
16
|
+
timeout: "Your session expired. Please sign in again to continue."
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
+
unconfirmed: "You have to confirm your account before continuing."
|
19
|
+
mailer:
|
20
|
+
confirmation_instructions:
|
21
|
+
subject: "Confirmation instructions"
|
22
|
+
reset_password_instructions:
|
23
|
+
subject: "Reset password instructions"
|
24
|
+
unlock_instructions:
|
25
|
+
subject: "Unlock Instructions"
|
26
|
+
omniauth_callbacks:
|
27
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
28
|
+
success: "Successfully authenticated from %{kind} account."
|
29
|
+
passwords:
|
30
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
31
|
+
send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
|
32
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
33
|
+
updated: "Your password was changed successfully. You are now signed in."
|
34
|
+
updated_not_active: "Your password was changed successfully."
|
35
|
+
registrations:
|
36
|
+
destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
|
37
|
+
signed_up: "Welcome! You have signed up successfully."
|
38
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
39
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
40
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
|
41
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
|
42
|
+
updated: "You updated your account successfully."
|
43
|
+
sessions:
|
44
|
+
signed_in: "Signed in successfully."
|
45
|
+
signed_out: "Signed out successfully."
|
46
|
+
unlocks:
|
47
|
+
send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
|
48
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
|
49
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
50
|
+
errors:
|
51
|
+
messages:
|
52
|
+
already_confirmed: "was already confirmed, please try signing in"
|
53
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
54
|
+
expired: "has expired, please request a new one"
|
55
|
+
not_found: "not found"
|
56
|
+
not_locked: "was not locked"
|
57
|
+
not_saved:
|
58
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
59
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
@@ -0,0 +1,58 @@
|
|
1
|
+
fa:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
expired: 'منقضی شده، لطفا درخواست جدید بدهید'
|
5
|
+
not_found: 'یافت نشد'
|
6
|
+
already_confirmed: 'قبلا تایید شده، لطفا وارد شوید'
|
7
|
+
not_locked: 'قفل نشده است'
|
8
|
+
not_saved:
|
9
|
+
one: '۱ خطا جلوی ذخیره %{resource} را گرفت:'
|
10
|
+
other: '%{count} خطا جلوی ذخیره این %{resource} را گرفت:'
|
11
|
+
|
12
|
+
devise:
|
13
|
+
failure:
|
14
|
+
already_authenticated: 'وارد سیستم هستید.'
|
15
|
+
unauthenticated: 'پیش از ادامه باید وارد شوید یا ثبت نام کنید.'
|
16
|
+
unconfirmed: 'باید حسابتان را قبل از ادامه تایید کنید.'
|
17
|
+
locked: 'حسابتان قفل شده است.'
|
18
|
+
invalid: 'ایمیل یا رمز عبور غیر معتبر.'
|
19
|
+
invalid_token: 'کلمه رمز نامعتبر.'
|
20
|
+
timeout: 'نشست شما منقضی شده است. برای ادامه دوباره وارد شوید.'
|
21
|
+
inactive: 'حساب شما هنوز فعال نشده است.'
|
22
|
+
user:
|
23
|
+
not_found_in_database: 'کاربری با این مشخصات پیدا نشد'
|
24
|
+
sessions:
|
25
|
+
signed_in: 'ورود موفق.'
|
26
|
+
signed_out: 'خروج موفق.'
|
27
|
+
passwords:
|
28
|
+
send_instructions: 'در چند دقیقه آینده ایمیلی حاوی راهنمای بازگرداندن رمز عبورتان دریافت خواهید کرد.'
|
29
|
+
updated: 'رمز عبورتان با موفقیت عوض شد. اکنون وارد شدید.'
|
30
|
+
updated_not_active: 'رمز عبورتان با موفقیت عوض شد.'
|
31
|
+
send_paranoid_instructions: '.اگر ایمیلتان در پایگاه داده ما باشد، در چند دقیقه ایملی حاوی لینک بازگردانی رمز عبور دریافت خواهید کرد'
|
32
|
+
no_token: '.بدون ایمیل برگرداندن رمز عبورتان به این صفحه دسترسی ندارید. اگر از ایمیل بازگردانی رمز عبور میآیید، لطفا مطمئن شوید آدرس کامل را وارد کردهاید'
|
33
|
+
confirmations:
|
34
|
+
send_instructions: 'در چند دقیقه آینده ایمیلی حاوی راهنمای تایید حسابتان دریافت خواهید کرد.'
|
35
|
+
send_paranoid_instructions: '.اگر ایمیلتان در پایگاه داده ما باشد، در چند دقیقه ایملی حاوی لینک تایید حسابتان دریافت خواهید کرد'
|
36
|
+
confirmed: 'حسابتان با موفقیت تایید شد. هم اکنون وارد شدید.'
|
37
|
+
registrations:
|
38
|
+
signed_up: 'خوش آمدید! با موفقیت ثبت نام کردید.'
|
39
|
+
signed_up_but_unconfirmed: '.پیغامی حاوی لینک تایید به ایملتان فرستاده شد. لطفا لینک را باز کنید تا حسابتان را فعال کنید'
|
40
|
+
signed_up_but_inactive: 'با موفقیت ثبت نام کردید. اما نمیتوانید وارد شوید چون هنوز حسابتان تایید نشده است.'
|
41
|
+
signed_up_but_locked: '.با موفقیت ثبت نام کردید، اما نمیتوانید وارد شوید چون حسابتان قفل شده است'
|
42
|
+
updated: 'به روز رسانی حسابتان با موفقیت انجام شد.'
|
43
|
+
update_needs_confirmation: '.حسابتان را با موفقیت به روز کردید، اما باید ایملیل جدیدتان را تایید کنید. لطفا ایمیلتان را چک کنید و بر روی لینک تایید کلیک کنید تا تایید ایمیل جدیدتان نهایی شود'
|
44
|
+
destroyed: 'بدرود! حسابتان لغو شد. به امید دیدار دوباره.'
|
45
|
+
unlocks:
|
46
|
+
send_instructions: 'ایمیلی حاوی راهنمای باز کردن حسابتان در چند دقیقه آینده به شما ارسال خواهد شد.'
|
47
|
+
unlocked: 'حسابتان با موفقیت باز شد. اکنون وارد شدید.'
|
48
|
+
send_paranoid_instructions: 'اگر حسابتان وجود داشته باشد، در چند دقیقه ایمیلی حاوی راهنمای باز کردن قفل آن دریافت خواهید کرد.'
|
49
|
+
omniauth_callbacks:
|
50
|
+
success: 'با موفقیت مجوز استفاده از %{kind} دریافت شد.'
|
51
|
+
failure: 'امکان استفاده از مجوز %{kind} نبود زیرا "%{reason}".'
|
52
|
+
mailer:
|
53
|
+
confirmation_instructions:
|
54
|
+
subject: 'راهنمای تایید'
|
55
|
+
reset_password_instructions:
|
56
|
+
subject: 'راهنمای بازنشانی رمز عبور'
|
57
|
+
unlock_instructions:
|
58
|
+
subject: 'راهنمای باز کردن'
|
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
underworld:
|
4
|
+
confirm_password: Password Confirmation
|
5
|
+
forgot_your_password: Forget your password
|
6
|
+
didnt_receive_confirmation_instructions: "Didn't receive confirmation instructions"
|
7
|
+
didnt_receive_unlock_instructions: "Didn't receive unlock instructions"
|
8
|
+
|
9
|
+
|
10
|
+
underworld_version: Underworld Version
|
11
|
+
copyright_html: |
|
12
|
+
© 2016 <a href="http://codamic.tech">Codamic Technologies</a>.
|
13
|
+
|
14
|
+
page_not_found: Oops! Page not found
|
15
|
+
page_not_found_desc: We could not find the page you were looking for.
|
16
|
+
|
17
|
+
select_a_language: Select a language
|
18
|
+
en: English
|
19
|
+
fa: فارسی
|
20
|
+
|
21
|
+
member_since: Member since %{date}
|
22
|
+
sign_in: Sign In
|
23
|
+
sign_out: Sign Out
|
24
|
+
sign_up: Sign up
|
25
|
+
home: Home
|
26
|
+
email: Email
|
27
|
+
password: Password
|
28
|
+
remember_me: Remember Me
|
29
|
+
|
30
|
+
not_authorized: You are not authorized to perform this action.
|
31
|
+
engine_name: Underworld
|
32
|
+
|
33
|
+
recent_activity: Recent Activity
|
34
|
+
successfully_removed: "%{resource} removed successfully."
|
35
|
+
back: Back
|
36
|
+
save: Save
|
37
|
+
cancel: Cancel
|
38
|
+
|
39
|
+
login_required: You need to login to use dashboard.
|
40
|
+
profile_saved_successfully: Profile Saved successfully
|
41
|
+
permissions:
|
42
|
+
permission_string: "can %{action} %{model}"
|
43
|
+
|
44
|
+
errors:
|
45
|
+
fix_errors: Please fix these errors first.
|
46
|
+
|
47
|
+
user:
|
48
|
+
user: User
|
49
|
+
first_name: First Name
|
50
|
+
last_name: Last Name
|
51
|
+
email: Email
|
52
|
+
last_signed_in_at: Last Signed in at
|
53
|
+
groups_of_user: Groups of user
|
54
|
+
|
55
|
+
group:
|
56
|
+
groups: Groups
|
57
|
+
group: Group
|
58
|
+
|
59
|
+
permission:
|
60
|
+
permissions: Permissions
|
61
|
+
|
62
|
+
dashboard:
|
63
|
+
users: Users
|
64
|
+
groups: Groups
|
65
|
+
user_management: User Management
|
66
|
+
actions: Actions
|
67
|
+
dashboard: Dashboard
|
68
|
+
updated_successfully: "%{resource} updated successfully."
|
69
|
+
removed_successfully: "%{resource} removed successfully."
|
70
|
+
saved_successfully: "%{resource} saved successfully."
|
71
|
+
user_messages: User Messages
|
72
|
+
|
73
|
+
new_resource_title: "New %{resource}"
|
74
|
+
edit_resource_title: "Edit %{resource}"
|
75
|
+
sidebar:
|
76
|
+
online: Online
|
77
|
+
search: Search
|
78
|
+
|
79
|
+
index_section:
|
80
|
+
add_button: "New %{resource}"
|
81
|
+
edit: Edit
|
82
|
+
show: Show
|
83
|
+
delete: Delete
|
84
|
+
delete_msg: Are you sure want to delete?
|
85
|
+
|
86
|
+
buttons:
|
87
|
+
back: Back
|
88
|
+
|
89
|
+
permissions:
|
90
|
+
read: Read
|
91
|
+
update: Update
|
92
|
+
create: Create
|
93
|
+
destroy: Destroy
|
94
|
+
index: Index
|
95
|
+
show: Show
|
96
|
+
ownershio: ownership
|
@@ -0,0 +1,108 @@
|
|
1
|
+
fa:
|
2
|
+
dashboard: 'داشبرد'
|
3
|
+
created_at: 'تاریخ ساخت'
|
4
|
+
updated_at: 'تاریخ ویرایش'
|
5
|
+
password: 'گذرواژه'
|
6
|
+
password_confirmation: 'تکرار گذرواژه'
|
7
|
+
index: 'لیست'
|
8
|
+
edit: 'ویرایش'
|
9
|
+
new: 'جدید'
|
10
|
+
edit_password: 'تغییر گذرواژه'
|
11
|
+
sign_out: 'خروج'
|
12
|
+
users: 'کاربران'
|
13
|
+
groups: 'گروه ها'
|
14
|
+
underworld:
|
15
|
+
save: 'ذخیره'
|
16
|
+
cancel: 'انصراف'
|
17
|
+
back: 'بازگشت'
|
18
|
+
confirm_password: تکرار گذرواژه
|
19
|
+
forgot_your_password: گذرواژه را فراموش کردم
|
20
|
+
didnt_receive_confirmation_instructions: "ایمیل اعتبارسنجی را دریافت نکردم"
|
21
|
+
didnt_receive_unlock_instructions: "ایمیل فعال سازی را دریافت نکردم"
|
22
|
+
back: 'بازگشت'
|
23
|
+
|
24
|
+
underworld_version: نسخه فالیس
|
25
|
+
copyright_html: |
|
26
|
+
© 2016 <a href="http://codamic.tech">Codamic Technologies</a>.
|
27
|
+
|
28
|
+
page_not_found: آدرس پیدا نشد.
|
29
|
+
page_not_found_desc: آدرس که دنبال آن می گردید پیدا نشد
|
30
|
+
|
31
|
+
select_a_language: یک زبان را انتخاب کیند
|
32
|
+
en: English
|
33
|
+
fa: فارسی
|
34
|
+
actions: فرامین
|
35
|
+
home: 'خانه'
|
36
|
+
email: ایمیل
|
37
|
+
password: گذرواژه
|
38
|
+
remember_me: مرا بخاطر بسپار
|
39
|
+
|
40
|
+
group:
|
41
|
+
group: گروه
|
42
|
+
groups: 'گروه ها'
|
43
|
+
name: 'نام'
|
44
|
+
role: 'نقش'
|
45
|
+
group_name: 'نام گروه'
|
46
|
+
|
47
|
+
users: 'کاربران'
|
48
|
+
user:
|
49
|
+
user: کاربر
|
50
|
+
first_name: 'نام'
|
51
|
+
last_name: 'نام خانوادگی'
|
52
|
+
email: 'ایمیل'
|
53
|
+
last_signed_in_at: 'آخرین ورود'
|
54
|
+
groups_of_user: 'گروه های کاربر'
|
55
|
+
|
56
|
+
member_since: "عضو از %{date}"
|
57
|
+
not_authorized: شما مجاز به انجام این فعالیت نیستید.
|
58
|
+
engine_name: فالیس
|
59
|
+
sign_in: ورود
|
60
|
+
sign_out: خروج
|
61
|
+
sign_up: ثبت نام
|
62
|
+
errors:
|
63
|
+
fix_errors: ابتدا این خطاها را رفع کنید
|
64
|
+
dashboard:
|
65
|
+
change_password: 'تغییر گذرواژه'
|
66
|
+
actions: 'عملیات'
|
67
|
+
index_view:
|
68
|
+
new_button: '%{title} جدید'
|
69
|
+
user_message: 'پیام خصوصی'
|
70
|
+
user_messages:
|
71
|
+
inbox: 'صندوق پیام ها'
|
72
|
+
sent: 'ارسال شده ها'
|
73
|
+
draft: 'پیش نویس'
|
74
|
+
users: کاربران
|
75
|
+
user:
|
76
|
+
first_name: 'نام'
|
77
|
+
last_name: 'نام خانوادگی'
|
78
|
+
email: 'ایمیل'
|
79
|
+
last_signed_in_at: 'آخرین ورود'
|
80
|
+
groups_of_user: 'گروه های کاربر'
|
81
|
+
user:
|
82
|
+
email: 'ایمیل'
|
83
|
+
groups: گروه ها
|
84
|
+
user_management: مدیریت کاربران
|
85
|
+
dashboard: داشبرد
|
86
|
+
sidebar:
|
87
|
+
online: آنلاین
|
88
|
+
search: جستجو
|
89
|
+
index_section:
|
90
|
+
add_button: "%{resource} جدید"
|
91
|
+
edit: ویرایش
|
92
|
+
show: نمایش
|
93
|
+
delete: حذف
|
94
|
+
delete_msg: آیا مطمئن هستید که می خواهید حذف کنید؟
|
95
|
+
buttons:
|
96
|
+
back: برگشت
|
97
|
+
permissions:
|
98
|
+
read: خواندن
|
99
|
+
update: بروزرسانی
|
100
|
+
create: ساختن
|
101
|
+
destroy: حذف کردن
|
102
|
+
show: نمایش
|
103
|
+
index: لیست
|
104
|
+
ownership: مالکیت
|
105
|
+
permission:
|
106
|
+
permissions: 'سطوح دسترسی'
|
107
|
+
entity_name: 'نام بخش'
|
108
|
+
permission: 'سطح دسترسی'
|