Commit c3b6b53d authored by cp's avatar cp

some bugs fixed and many visual improvements added

git-svn-id: http://svn.sp-service.com.ua/svnroot/svn/base_site/trunk@4 d975c5f9-4e99-4c31-b122-d878075b96d9
parent c274e1e0
......@@ -5,4 +5,4 @@ You are allowed to:
2. Remove generators
3. Add installed generators
To add new installed generators automatically delete this file and reload the project.
--><GeneratorsGroup><Generator name="active_record:devise" /><Generator name="assets" /><Generator name="bootstrap:install" /><Generator name="bootstrap:layout" /><Generator name="bootstrap:partial" /><Generator name="bootstrap:themed" /><Generator name="ckeditor:install" /><Generator name="ckeditor:pundit_policy" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="devise" /><Generator name="devise:controllers" /><Generator name="devise:install" /><Generator name="devise:views" /><Generator name="devise:views:i18n_templates" /><Generator name="devise:views:locale" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="haml:application_layout" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="less:assets" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="mongoid:devise" /><Generator name="nested_form:install" /><Generator name="resource" /><Generator name="responders:install" /><Generator name="responders_controller" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="simple_form:install" /><Generator name="task" /><Generator name="test_unit:generator" /><Generator name="test_unit:job" /><Generator name="test_unit:plugin" /><Generator name="uploader" /></GeneratorsGroup></Settings>
--><GeneratorsGroup><Generator name="active_record:devise" /><Generator name="assets" /><Generator name="bootstrap:install" /><Generator name="bootstrap:layout" /><Generator name="bootstrap:partial" /><Generator name="bootstrap:themed" /><Generator name="ckeditor:install" /><Generator name="ckeditor:pundit_policy" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="devise" /><Generator name="devise:controllers" /><Generator name="devise:i18n:locale" /><Generator name="devise:i18n:views" /><Generator name="devise:install" /><Generator name="devise:views" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="haml:application_layout" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="less:assets" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="mongoid:devise" /><Generator name="nested_form:install" /><Generator name="resource" /><Generator name="responders:install" /><Generator name="responders_controller" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="simple_form:install" /><Generator name="task" /><Generator name="test_unit:generator" /><Generator name="test_unit:job" /><Generator name="test_unit:plugin" /><Generator name="uploader" /></GeneratorsGroup></Settings>
......@@ -4,4 +4,4 @@ You are allowed to:
1. Remove rake task
2. Add existing rake tasks
To add existing rake tasks automatically delete this file and reload the project.
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="List versions of all Rails frameworks and the environment" fullCmd="about" taksId="about" /><RakeGroup description="" fullCmd="" taksId="assets"><RakeTask description="Remove old compiled assets" fullCmd="assets:clean[keep]" taksId="clean[keep]" /><RakeTask description="Remove compiled assets" fullCmd="assets:clobber" taksId="clobber" /><RakeTask description="Load asset compile environment" fullCmd="assets:environment" taksId="environment" /><RakeTask description="Compile all the assets named in config.assets.precompile" fullCmd="assets:precompile" taksId="precompile" /><RakeTask description="" fullCmd="assets:clean" taksId="clean" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="cache_digests"><RakeTask description="Lookup first-level dependencies for TEMPLATE (like messages/show or comments/_comment.html)" fullCmd="cache_digests:dependencies" taksId="dependencies" /><RakeTask description="Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)" fullCmd="cache_digests:nested_dependencies" taksId="nested_dependencies" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="ckeditor"><RakeTask description="Create nondigest versions of all ckeditor digest assets" fullCmd="ckeditor:nondigest" taksId="nondigest" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="db"><RakeTask description="Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the config)" fullCmd="db:create" taksId="create" /><RakeTask description="Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config)" fullCmd="db:drop" taksId="drop" /><RakeGroup description="" fullCmd="" taksId="fixtures"><RakeTask description="Load fixtures into the current environment's database" fullCmd="db:fixtures:load" taksId="load" /><RakeTask description="" fullCmd="db:fixtures:identify" taksId="identify" /></RakeGroup><RakeTask description="Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)" fullCmd="db:migrate" taksId="migrate" /><RakeGroup description="" fullCmd="" taksId="migrate"><RakeTask description="Display status of migrations" fullCmd="db:migrate:status" taksId="status" /><RakeTask description="" fullCmd="db:migrate:down" taksId="down" /><RakeTask description="" fullCmd="db:migrate:redo" taksId="redo" /><RakeTask description="" fullCmd="db:migrate:reset" taksId="reset" /><RakeTask description="" fullCmd="db:migrate:up" taksId="up" /></RakeGroup><RakeTask description="Rolls the schema back to the previous version (specify steps w/ STEP=n)" fullCmd="db:rollback" taksId="rollback" /><RakeGroup description="" fullCmd="" taksId="schema"><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="Clear a db/schema_cache.dump file" fullCmd="db:schema:cache:clear" taksId="clear" /><RakeTask description="Create a db/schema_cache.dump file" fullCmd="db:schema:cache:dump" taksId="dump" /></RakeGroup><RakeTask description="Create a db/schema.rb file that is portable against any DB supported by AR" fullCmd="db:schema:dump" taksId="dump" /><RakeTask description="Load a schema.rb file into the database" fullCmd="db:schema:load" taksId="load" /><RakeTask description="" fullCmd="db:schema:load_if_ruby" taksId="load_if_ruby" /></RakeGroup><RakeTask description="Load the seed data from db/seeds.rb" fullCmd="db:seed" taksId="seed" /><RakeTask description="Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the database first)" fullCmd="db:setup" taksId="setup" /><RakeGroup description="" fullCmd="" taksId="structure"><RakeTask description="Dump the database structure to db/structure.sql" fullCmd="db:structure:dump" taksId="dump" /><RakeTask description="Recreate the databases from the structure.sql file" fullCmd="db:structure:load" taksId="load" /><RakeTask description="" fullCmd="db:structure:load_if_sql" taksId="load_if_sql" /></RakeGroup><RakeTask description="Retrieves the current schema version number" fullCmd="db:version" taksId="version" /><RakeTask description="" fullCmd="db:_dump" taksId="_dump" /><RakeTask description="" fullCmd="db:abort_if_pending_migrations" taksId="abort_if_pending_migrations" /><RakeTask description="" fullCmd="db:charset" taksId="charset" /><RakeTask description="" fullCmd="db:collation" taksId="collation" /><RakeGroup description="" fullCmd="" taksId="create"><RakeTask description="" fullCmd="db:create:all" taksId="all" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="drop"><RakeTask description="" fullCmd="db:drop:all" taksId="all" /></RakeGroup><RakeTask description="" fullCmd="db:forward" taksId="forward" /><RakeTask description="" fullCmd="db:load_config" taksId="load_config" /><RakeTask description="" fullCmd="db:purge" taksId="purge" /><RakeGroup description="" fullCmd="" taksId="purge"><RakeTask description="" fullCmd="db:purge:all" taksId="all" /></RakeGroup><RakeTask description="" fullCmd="db:reset" taksId="reset" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="" fullCmd="db:test:clone" taksId="clone" /><RakeTask description="" fullCmd="db:test:clone_schema" taksId="clone_schema" /><RakeTask description="" fullCmd="db:test:clone_structure" taksId="clone_structure" /><RakeTask description="" fullCmd="db:test:deprecated" taksId="deprecated" /><RakeTask description="" fullCmd="db:test:load" taksId="load" /><RakeTask description="" fullCmd="db:test:load_schema" taksId="load_schema" /><RakeTask description="" fullCmd="db:test:load_structure" taksId="load_structure" /><RakeTask description="" fullCmd="db:test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="db:test:purge" taksId="purge" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="doc"><RakeTask description="Generate docs for the app -- also available doc:rails, doc:guides (options: TEMPLATE=/rdoc-template.rb, TITLE=&quot;Custom Title&quot;)" fullCmd="doc:app" taksId="app" /><RakeTask description="" fullCmd="doc:clobber" taksId="clobber" /><RakeTask description="" fullCmd="doc:clobber_app" taksId="clobber_app" /><RakeTask description="" fullCmd="doc:clobber_rails" taksId="clobber_rails" /><RakeTask description="" fullCmd="doc:guides" taksId="guides" /><RakeTask description="" fullCmd="doc:rails" taksId="rails" /><RakeTask description="" fullCmd="doc:reapp" taksId="reapp" /><RakeTask description="" fullCmd="doc:rerails" taksId="rerails" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="haml"><RakeTask description="Convert html.erb to html.haml each file in app/views" fullCmd="haml:erb2haml" taksId="erb2haml" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="log"><RakeTask description="Truncates all *.log files in log/ to zero bytes (specify which logs with LOGS=test,development)" fullCmd="log:clear" taksId="clear" /></RakeGroup><RakeTask description="Prints out your Rack middleware stack" fullCmd="middleware" taksId="middleware" /><RakeTask description="Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)" fullCmd="notes" taksId="notes" /><RakeGroup description="" fullCmd="" taksId="notes"><RakeTask description="Enumerate a custom annotation, specify with ANNOTATION=CUSTOM" fullCmd="notes:custom" taksId="custom" /><RakeTask description="" fullCmd="notes:fixme" taksId="fixme" /><RakeTask description="" fullCmd="notes:optimize" taksId="optimize" /><RakeTask description="" fullCmd="notes:todo" taksId="todo" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="rails"><RakeTask description="Applies the template supplied by LOCATION=(/path/to/template) or URL" fullCmd="rails:template" taksId="template" /><RakeTask description="Update configs and some other initially generated files (or use just update:configs or update:bin)" fullCmd="rails:update" taksId="update" /><RakeGroup description="" fullCmd="" taksId="templates"><RakeTask description="" fullCmd="rails:templates:copy" taksId="copy" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="update"><RakeTask description="" fullCmd="rails:update:bin" taksId="bin" /><RakeTask description="" fullCmd="rails:update:configs" taksId="configs" /></RakeGroup></RakeGroup><RakeTask description="Print out all defined routes in match order, with names" fullCmd="routes" taksId="routes" /><RakeTask description="Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)" fullCmd="secret" taksId="secret" /><RakeTask description="Report code statistics (KLOCs, etc) from the application or engine" fullCmd="stats" taksId="stats" /><RakeTask description="Runs all tests in test folder" fullCmd="test" taksId="test" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="Run tests quickly by merging all types and not resetting db" fullCmd="test:all" taksId="all" /><RakeGroup description="" fullCmd="" taksId="all"><RakeTask description="Run tests quickly, but also reset db" fullCmd="test:all:db" taksId="db" /></RakeGroup><RakeTask description="Run tests quickly, but also reset db" fullCmd="test:db" taksId="db" /><RakeTask description="" fullCmd="test:controllers" taksId="controllers" /><RakeTask description="" fullCmd="test:deprecate_all" taksId="deprecate_all" /><RakeTask description="" fullCmd="test:functionals" taksId="functionals" /><RakeTask description="" fullCmd="test:generators" taksId="generators" /><RakeTask description="" fullCmd="test:helpers" taksId="helpers" /><RakeTask description="" fullCmd="test:integration" taksId="integration" /><RakeTask description="" fullCmd="test:jobs" taksId="jobs" /><RakeTask description="" fullCmd="test:mailers" taksId="mailers" /><RakeTask description="" fullCmd="test:models" taksId="models" /><RakeTask description="" fullCmd="test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="test:run" taksId="run" /><RakeTask description="" fullCmd="test:single" taksId="single" /><RakeTask description="" fullCmd="test:units" taksId="units" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="time"><RakeGroup description="" fullCmd="" taksId="zones"><RakeTask description="Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6" fullCmd="time:zones:all" taksId="all" /><RakeTask description="" fullCmd="time:zones:local" taksId="local" /><RakeTask description="" fullCmd="time:zones:us" taksId="us" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="tmp"><RakeTask description="Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)" fullCmd="tmp:clear" taksId="clear" /><RakeTask description="Creates tmp directories for sessions, cache, sockets, and pids" fullCmd="tmp:create" taksId="create" /><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="" fullCmd="tmp:cache:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="pids"><RakeTask description="" fullCmd="tmp:pids:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sessions"><RakeTask description="" fullCmd="tmp:sessions:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sockets"><RakeTask description="" fullCmd="tmp:sockets:clear" taksId="clear" /></RakeGroup></RakeGroup><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="doc" taksId="doc" /><RakeTask description="" fullCmd="doc/app" taksId="doc/app" /><RakeTask description="" fullCmd="doc/app/created.rid" taksId="doc/app/created.rid" /><RakeTask description="" fullCmd="file" taksId="file" /><RakeTask description="" fullCmd="environment" taksId="environment" /><RakeTask description="" fullCmd="html" taksId="html" /><RakeTask description="" fullCmd="html/created.rid" taksId="html/created.rid" /><RakeGroup description="" fullCmd="" taksId="railties"><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="" fullCmd="railties:install:migrations" taksId="migrations" /></RakeGroup></RakeGroup><RakeTask description="" fullCmd="tmp" taksId="tmp" /><RakeTask description="" fullCmd="tmp/cache" taksId="tmp/cache" /><RakeTask description="" fullCmd="tmp/cache/assets" taksId="tmp/cache/assets" /><RakeTask description="" fullCmd="tmp/cache/assets/development" taksId="tmp/cache/assets/development" /><RakeTask description="" fullCmd="tmp/cache/assets/production" taksId="tmp/cache/assets/production" /><RakeTask description="" fullCmd="tmp/cache/assets/test" taksId="tmp/cache/assets/test" /><RakeTask description="" fullCmd="tmp/pids" taksId="tmp/pids" /><RakeTask description="" fullCmd="tmp/sessions" taksId="tmp/sessions" /><RakeTask description="" fullCmd="tmp/sockets" taksId="tmp/sockets" /></RakeGroup></Settings>
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="List versions of all Rails frameworks and the environment" fullCmd="about" taksId="about" /><RakeGroup description="" fullCmd="" taksId="assets"><RakeTask description="Remove old compiled assets" fullCmd="assets:clean[keep]" taksId="clean[keep]" /><RakeTask description="Remove compiled assets" fullCmd="assets:clobber" taksId="clobber" /><RakeTask description="Load asset compile environment" fullCmd="assets:environment" taksId="environment" /><RakeTask description="Compile all the assets named in config.assets.precompile" fullCmd="assets:precompile" taksId="precompile" /><RakeTask description="" fullCmd="assets:clean" taksId="clean" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="cache_digests"><RakeTask description="Lookup first-level dependencies for TEMPLATE (like messages/show or comments/_comment.html)" fullCmd="cache_digests:dependencies" taksId="dependencies" /><RakeTask description="Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)" fullCmd="cache_digests:nested_dependencies" taksId="nested_dependencies" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="ckeditor"><RakeTask description="Create nondigest versions of all ckeditor digest assets" fullCmd="ckeditor:nondigest" taksId="nondigest" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="db"><RakeTask description="Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the config). Without RAILS_ENV it defaults to creating the development and test databases" fullCmd="db:create" taksId="create" /><RakeTask description="Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config). Without RAILS_ENV it defaults to dropping the development and test databases" fullCmd="db:drop" taksId="drop" /><RakeGroup description="" fullCmd="" taksId="fixtures"><RakeTask description="Load fixtures into the current environment's database" fullCmd="db:fixtures:load" taksId="load" /><RakeTask description="" fullCmd="db:fixtures:identify" taksId="identify" /></RakeGroup><RakeTask description="Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)" fullCmd="db:migrate" taksId="migrate" /><RakeGroup description="" fullCmd="" taksId="migrate"><RakeTask description="Display status of migrations" fullCmd="db:migrate:status" taksId="status" /><RakeTask description="" fullCmd="db:migrate:down" taksId="down" /><RakeTask description="" fullCmd="db:migrate:redo" taksId="redo" /><RakeTask description="" fullCmd="db:migrate:reset" taksId="reset" /><RakeTask description="" fullCmd="db:migrate:up" taksId="up" /></RakeGroup><RakeTask description="Rolls the schema back to the previous version (specify steps w/ STEP=n)" fullCmd="db:rollback" taksId="rollback" /><RakeGroup description="" fullCmd="" taksId="schema"><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="Clear a db/schema_cache.dump file" fullCmd="db:schema:cache:clear" taksId="clear" /><RakeTask description="Create a db/schema_cache.dump file" fullCmd="db:schema:cache:dump" taksId="dump" /></RakeGroup><RakeTask description="Create a db/schema.rb file that is portable against any DB supported by AR" fullCmd="db:schema:dump" taksId="dump" /><RakeTask description="Load a schema.rb file into the database" fullCmd="db:schema:load" taksId="load" /><RakeTask description="" fullCmd="db:schema:load_if_ruby" taksId="load_if_ruby" /></RakeGroup><RakeTask description="Load the seed data from db/seeds.rb" fullCmd="db:seed" taksId="seed" /><RakeTask description="Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the database first)" fullCmd="db:setup" taksId="setup" /><RakeGroup description="" fullCmd="" taksId="structure"><RakeTask description="Dump the database structure to db/structure.sql" fullCmd="db:structure:dump" taksId="dump" /><RakeTask description="Recreate the databases from the structure.sql file" fullCmd="db:structure:load" taksId="load" /><RakeTask description="" fullCmd="db:structure:load_if_sql" taksId="load_if_sql" /></RakeGroup><RakeTask description="Retrieves the current schema version number" fullCmd="db:version" taksId="version" /><RakeTask description="" fullCmd="db:_dump" taksId="_dump" /><RakeTask description="" fullCmd="db:abort_if_pending_migrations" taksId="abort_if_pending_migrations" /><RakeTask description="" fullCmd="db:charset" taksId="charset" /><RakeTask description="" fullCmd="db:collation" taksId="collation" /><RakeGroup description="" fullCmd="" taksId="create"><RakeTask description="" fullCmd="db:create:all" taksId="all" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="drop"><RakeTask description="" fullCmd="db:drop:all" taksId="all" /></RakeGroup><RakeTask description="" fullCmd="db:forward" taksId="forward" /><RakeTask description="" fullCmd="db:load_config" taksId="load_config" /><RakeTask description="" fullCmd="db:purge" taksId="purge" /><RakeGroup description="" fullCmd="" taksId="purge"><RakeTask description="" fullCmd="db:purge:all" taksId="all" /></RakeGroup><RakeTask description="" fullCmd="db:reset" taksId="reset" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="" fullCmd="db:test:clone" taksId="clone" /><RakeTask description="" fullCmd="db:test:clone_schema" taksId="clone_schema" /><RakeTask description="" fullCmd="db:test:clone_structure" taksId="clone_structure" /><RakeTask description="" fullCmd="db:test:deprecated" taksId="deprecated" /><RakeTask description="" fullCmd="db:test:load" taksId="load" /><RakeTask description="" fullCmd="db:test:load_schema" taksId="load_schema" /><RakeTask description="" fullCmd="db:test:load_structure" taksId="load_structure" /><RakeTask description="" fullCmd="db:test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="db:test:purge" taksId="purge" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="doc"><RakeTask description="Generate docs for the app -- also available doc:rails, doc:guides (options: TEMPLATE=/rdoc-template.rb, TITLE=&quot;Custom Title&quot;)" fullCmd="doc:app" taksId="app" /><RakeTask description="" fullCmd="doc:clobber" taksId="clobber" /><RakeTask description="" fullCmd="doc:clobber_app" taksId="clobber_app" /><RakeTask description="" fullCmd="doc:clobber_rails" taksId="clobber_rails" /><RakeTask description="" fullCmd="doc:guides" taksId="guides" /><RakeTask description="" fullCmd="doc:rails" taksId="rails" /><RakeTask description="" fullCmd="doc:reapp" taksId="reapp" /><RakeTask description="" fullCmd="doc:rerails" taksId="rerails" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="haml"><RakeTask description="Convert html.erb to html.haml each file in app/views" fullCmd="haml:erb2haml" taksId="erb2haml" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="log"><RakeTask description="Truncates all *.log files in log/ to zero bytes (specify which logs with LOGS=test,development)" fullCmd="log:clear" taksId="clear" /></RakeGroup><RakeTask description="Prints out your Rack middleware stack" fullCmd="middleware" taksId="middleware" /><RakeTask description="Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)" fullCmd="notes" taksId="notes" /><RakeGroup description="" fullCmd="" taksId="notes"><RakeTask description="Enumerate a custom annotation, specify with ANNOTATION=CUSTOM" fullCmd="notes:custom" taksId="custom" /><RakeTask description="" fullCmd="notes:fixme" taksId="fixme" /><RakeTask description="" fullCmd="notes:optimize" taksId="optimize" /><RakeTask description="" fullCmd="notes:todo" taksId="todo" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="rails"><RakeTask description="Applies the template supplied by LOCATION=(/path/to/template) or URL" fullCmd="rails:template" taksId="template" /><RakeTask description="Update configs and some other initially generated files (or use just update:configs or update:bin)" fullCmd="rails:update" taksId="update" /><RakeGroup description="" fullCmd="" taksId="templates"><RakeTask description="" fullCmd="rails:templates:copy" taksId="copy" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="update"><RakeTask description="" fullCmd="rails:update:bin" taksId="bin" /><RakeTask description="" fullCmd="rails:update:configs" taksId="configs" /></RakeGroup></RakeGroup><RakeTask description="Print out all defined routes in match order, with names" fullCmd="routes" taksId="routes" /><RakeTask description="Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)" fullCmd="secret" taksId="secret" /><RakeTask description="Report code statistics (KLOCs, etc) from the application or engine" fullCmd="stats" taksId="stats" /><RakeTask description="Runs all tests in test folder" fullCmd="test" taksId="test" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="Run tests quickly by merging all types and not resetting db" fullCmd="test:all" taksId="all" /><RakeGroup description="" fullCmd="" taksId="all"><RakeTask description="Run tests quickly, but also reset db" fullCmd="test:all:db" taksId="db" /></RakeGroup><RakeTask description="Run tests quickly, but also reset db" fullCmd="test:db" taksId="db" /><RakeTask description="" fullCmd="test:controllers" taksId="controllers" /><RakeTask description="" fullCmd="test:deprecate_all" taksId="deprecate_all" /><RakeTask description="" fullCmd="test:functionals" taksId="functionals" /><RakeTask description="" fullCmd="test:generators" taksId="generators" /><RakeTask description="" fullCmd="test:helpers" taksId="helpers" /><RakeTask description="" fullCmd="test:integration" taksId="integration" /><RakeTask description="" fullCmd="test:jobs" taksId="jobs" /><RakeTask description="" fullCmd="test:mailers" taksId="mailers" /><RakeTask description="" fullCmd="test:models" taksId="models" /><RakeTask description="" fullCmd="test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="test:run" taksId="run" /><RakeTask description="" fullCmd="test:single" taksId="single" /><RakeTask description="" fullCmd="test:units" taksId="units" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="time"><RakeGroup description="" fullCmd="" taksId="zones"><RakeTask description="Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6" fullCmd="time:zones:all" taksId="all" /><RakeTask description="" fullCmd="time:zones:local" taksId="local" /><RakeTask description="" fullCmd="time:zones:us" taksId="us" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="tmp"><RakeTask description="Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)" fullCmd="tmp:clear" taksId="clear" /><RakeTask description="Creates tmp directories for sessions, cache, sockets, and pids" fullCmd="tmp:create" taksId="create" /><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="" fullCmd="tmp:cache:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="pids"><RakeTask description="" fullCmd="tmp:pids:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sessions"><RakeTask description="" fullCmd="tmp:sessions:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sockets"><RakeTask description="" fullCmd="tmp:sockets:clear" taksId="clear" /></RakeGroup></RakeGroup><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="doc" taksId="doc" /><RakeTask description="" fullCmd="doc/app" taksId="doc/app" /><RakeTask description="" fullCmd="doc/app/created.rid" taksId="doc/app/created.rid" /><RakeTask description="" fullCmd="file" taksId="file" /><RakeTask description="" fullCmd="environment" taksId="environment" /><RakeTask description="" fullCmd="html" taksId="html" /><RakeTask description="" fullCmd="html/created.rid" taksId="html/created.rid" /><RakeGroup description="" fullCmd="" taksId="railties"><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="" fullCmd="railties:install:migrations" taksId="migrations" /></RakeGroup></RakeGroup><RakeTask description="" fullCmd="tmp" taksId="tmp" /><RakeTask description="" fullCmd="tmp/cache" taksId="tmp/cache" /><RakeTask description="" fullCmd="tmp/cache/assets" taksId="tmp/cache/assets" /><RakeTask description="" fullCmd="tmp/cache/assets/development" taksId="tmp/cache/assets/development" /><RakeTask description="" fullCmd="tmp/cache/assets/production" taksId="tmp/cache/assets/production" /><RakeTask description="" fullCmd="tmp/cache/assets/test" taksId="tmp/cache/assets/test" /><RakeTask description="" fullCmd="tmp/pids" taksId="tmp/pids" /><RakeTask description="" fullCmd="tmp/sessions" taksId="tmp/sessions" /><RakeTask description="" fullCmd="tmp/sockets" taksId="tmp/sockets" /></RakeGroup></Settings>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="false" assert-keyword="false" jdk-15="false" project-jdk-name="ruby-2.1.5-p273" project-jdk-type="RUBY_SDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="false" project-jdk-name="ruby-2.1.5-p273" project-jdk-type="RUBY_SDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SvnBranchConfigurationManager">
<option name="myConfigurationMap">
<map>
<entry key="$PROJECT_DIR$">
<value>
<SvnBranchConfiguration>
<option name="branchUrls">
<list>
<option value="https://svn.sp-service.com.ua/svnroot/svn/base_site/branches" />
<option value="https://svn.sp-service.com.ua/svnroot/svn/base_site/tags" />
</list>
</option>
<option name="trunkUrl" value="https://svn.sp-service.com.ua/svnroot/svn/base_site/trunk" />
</SvnBranchConfiguration>
</value>
</entry>
</map>
</option>
<option name="mySupportsUserInfoFilter" value="true" />
</component>
</project>
\ No newline at end of file
source 'https://rubygems.org'
gem 'rails', '4.2.5.1'
gem 'rails', '4.2.7.1'
gem 'mysql2'
gem 'uglifier', '>= 1.3.0'
gem 'sass-rails', '~> 5.0'
......@@ -32,7 +32,7 @@ gem 'sdoc', '~> 0.4.0', group: :doc
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
group :development do
gem 'web-console', '~> 2.0'
gem 'capistrano', '~> 3.4'
gem 'capistrano', '~> 3.6.1'
gem 'capistrano-faster-assets', '~> 1.0'
gem 'capistrano-bundler'
gem 'capistrano-rvm'
......
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.5.1)
actionpack (= 4.2.5.1)
actionview (= 4.2.5.1)
activejob (= 4.2.5.1)
actionmailer (4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.5.1)
actionview (= 4.2.5.1)
activesupport (= 4.2.5.1)
actionpack (4.2.7.1)
actionview (= 4.2.7.1)
activesupport (= 4.2.7.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.5.1)
activesupport (= 4.2.5.1)
actionview (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.5.1)
activesupport (= 4.2.5.1)
activejob (4.2.7.1)
activesupport (= 4.2.7.1)
globalid (>= 0.3.0)
activemodel (4.2.5.1)
activesupport (= 4.2.5.1)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
activerecord (4.2.5.1)
activemodel (= 4.2.5.1)
activesupport (= 4.2.5.1)
activerecord (4.2.7.1)
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activesupport (4.2.5.1)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
acts_as_list (0.7.2)
acts_as_list (0.8.2)
activerecord (>= 3.0)
airbrussh (1.1.1)
sshkit (>= 1.6.1, != 1.7.0)
arel (6.0.3)
autoprefixer-rails (6.3.6)
autoprefixer-rails (6.5.4)
execjs
bcrypt (3.1.11-x64-mingw32)
bcrypt (3.1.11-x86-mingw32)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.6)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
bootstrap-will_paginate (0.0.10)
......@@ -53,27 +55,31 @@ GEM
bootstrap3-datetimepicker-rails (4.15.35)
momentjs-rails (>= 2.8.1)
builder (3.2.2)
capistrano (3.4.0)
capistrano (3.6.1)
airbrussh (>= 1.0.0)
capistrano-harrow
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
capistrano-bundler (1.1.4)
sshkit (>= 1.9.0)
capistrano-bundler (1.2.0)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-faster-assets (1.0.2)
capistrano (>= 3.1)
capistrano-rails (1.1.6)
capistrano-harrow (0.5.3)
capistrano-rails (1.2.0)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
carrierwave (0.11.0)
carrierwave (0.11.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
ckeditor (4.1.6)
mimemagic (>= 0.3.0)
ckeditor (4.2.2)
cocaine
orm_adapter (~> 0.5.0)
climate_control (0.0.3)
......@@ -86,23 +92,22 @@ GEM
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
coffee-script-source (1.12.2)
commonjs (0.2.7)
concurrent-ruby (1.0.1)
concurrent-ruby (1.0.3)
debug_inspector (0.0.2)
devise (3.5.6)
devise (4.2.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
railties (>= 4.1.0, < 5.1)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise-i18n (1.0.1)
devise-i18n (1.1.1)
erubis (2.7.0)
execjs (2.6.0)
font-awesome-rails (4.6.0.0)
execjs (2.7.0)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
globalid (0.3.6)
globalid (0.3.7)
activesupport (>= 4.1.0)
haml (4.0.7)
tilt
......@@ -118,19 +123,19 @@ GEM
nokogiri (~> 1.6.0)
ruby_parser (~> 3.5)
i18n (0.7.0)
jbuilder (2.4.1)
jbuilder (2.6.1)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.1.1)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (1.8.3)
less (2.6.0)
commonjs (~> 0.2.7)
less-rails (2.7.1)
less-rails (2.8.0)
actionpack (>= 4.0)
less (~> 2.6.0)
sprockets (> 2, < 4)
......@@ -139,39 +144,40 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mime-types (3.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0221)
mini_magick (4.5.1)
mini_portile2 (2.0.0)
minitest (5.8.4)
momentjs-rails (2.11.0)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_magick (4.6.0)
mini_portile2 (2.1.0)
minitest (5.10.1)
momentjs-rails (2.15.1)
railties (>= 3.1)
multi_json (1.11.2)
mysql2 (0.4.3-x64-mingw32)
mysql2 (0.4.3-x86-mingw32)
multi_json (1.12.1)
mysql2 (0.4.5-x64-mingw32)
mysql2 (0.4.5-x86-mingw32)
nested_form (0.3.2)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.1.1)
nokogiri (1.6.7.2-x64-mingw32)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.7.2-x86-mingw32)
mini_portile2 (~> 2.0.0.rc2)
net-ssh (3.2.0)
nokogiri (1.6.8.1-x64-mingw32)
mini_portile2 (~> 2.1.0)
nokogiri (1.6.8.1-x86-mingw32)
mini_portile2 (~> 2.1.0)
orm_adapter (0.5.0)
rack (1.6.4)
rack (1.6.5)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.5.1)
actionmailer (= 4.2.5.1)
actionpack (= 4.2.5.1)
actionview (= 4.2.5.1)
activejob (= 4.2.5.1)
activemodel (= 4.2.5.1)
activerecord (= 4.2.5.1)
activesupport (= 4.2.5.1)
rails (4.2.7.1)
actionmailer (= 4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
activemodel (= 4.2.7.1)
activerecord (= 4.2.7.1)
activesupport (= 4.2.7.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.5.1)
railties (= 4.2.7.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
......@@ -181,47 +187,47 @@ GEM
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.5.1)
actionpack (= 4.2.5.1)
activesupport (= 4.2.5.1)
railties (4.2.7.1)
actionpack (= 4.2.7.1)
activesupport (= 4.2.7.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.1.2)
rdoc (4.2.2)
json (~> 1.4)
responders (2.1.2)
rake (12.0.0)
rdoc (4.3.0)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
ruby_parser (3.8.1)
ruby_parser (3.8.3)
sexp_processor (~> 4.1)
sass (3.4.22)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
sexp_processor (4.7.0)
simple_form (3.2.1)
simple_form (3.3.1)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
sprockets (3.6.0)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.0.4)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.9.0)
sshkit (1.11.5)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thor (0.19.1)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.2)
turbolinks (2.5.3)
coffee-rails
tilt (2.0.5)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
twitter-bootstrap-rails (3.2.2)
actionpack (>= 3.1)
execjs (>= 2.2.2, >= 2.2)
......@@ -229,9 +235,9 @@ GEM
railties (>= 3.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
tzinfo-data (1.2016.3)
tzinfo-data (1.2016.10)
tzinfo (>= 1.0.0)
uglifier (3.0.0)
uglifier (3.0.4)
execjs (>= 0.3.0, < 3)
warden (1.2.6)
rack (>= 1.0)
......@@ -240,7 +246,7 @@ GEM
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
will_paginate (3.1.0)
will_paginate (3.1.5)
PLATFORMS
x64-mingw32
......@@ -251,7 +257,7 @@ DEPENDENCIES
bootstrap-sass (~> 3.3.4)
bootstrap-will_paginate
bootstrap3-datetimepicker-rails (~> 4.15.35)
capistrano (~> 3.4)
capistrano (~> 3.6.1)
capistrano-bundler
capistrano-faster-assets (~> 1.0)
capistrano-rails
......@@ -270,7 +276,7 @@ DEPENDENCIES
momentjs-rails (>= 2.9.0)
mysql2
nested_form
rails (= 4.2.5.1)
rails (= 4.2.7.1)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
simple_form
......@@ -282,4 +288,4 @@ DEPENDENCIES
will_paginate
BUNDLED WITH
1.11.2
1.13.6
//= require jquery-ui/sortable
//= require jquery-ui/widgets/sortable
//= require turbolinks
//= require jquery_nested_form
//= require moment
......
window.linksPanelShowed = false
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
if window.linksPanelShowed
$('#links_panel').css left: 0
......
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
init_datetime_picker($('.datetime_picker'))
init_date_picker($('.date_picker'))
......
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
$('table.editable_rows').each ->
initEditableRows(this)
initCreation(this)
......@@ -18,7 +18,9 @@ initEditableRows = (table) ->
$.ajax
type: $button.data('method')
url: $button.attr('href') + '.json'
success: () -> $row.remove()
success: () ->
$row.remove()
dispatchChangeEvent($table, 'delete')
error: (data) -> setErrors($row, data)
initRowEditing = ($editButton) ->
......@@ -28,7 +30,7 @@ initEditableRows = (table) ->
initControls($controlsCell)
initInputs($row)
$row.find('td[data] input').keypress (event) ->
$row.find('td[data] input, td[data-name] input, td[data-name] select').keypress (event) ->
if event.which == 13
event.preventDefault()
save()
......@@ -39,25 +41,47 @@ initEditableRows = (table) ->
save = () ->
clearErrors($row)
data = {}
$row.find('td[data]').each ->
data = {id: $row.data('id')}
$row.find('td[data], td[data-name]').each ->
$cell = $(this)
data[$cell.attr('data')] = $cell.find('input').val()
name = if $cell.attr('data') then 'data' else 'data-name'
if $cell.data('image')
$form = $cell.find('form')
$.ajax
type: $form.attr('method')
url: $form.attr('action')
data: new FormData($form[0])
processData: false
contentType: false
success: (data, textStatus, jqXHR) ->
$cell.html(data)
else
data[$cell.attr(name)] = $cell.find('input, select').val()
ajaxData = {}
ajaxData[$table.data('resource')] = data
$.ajax
type: "PUT"
url: window.location.href + "/#{$row.data('id')}.json"
data: ajaxData
success: () -> restoreRow(true)
success: () ->
restoreRow(true)
dispatchChangeEvent($table, 'update')
error: (data) -> setErrors($row, data)
restoreRow = (updated) ->
$controlsCell.html(orygControlHtml)
$row.find('td[data]').each ->
$row.find('td[data], td[data-name]').each ->
$cell = $(this)
$input = $cell.find('input')
$cell.html(if updated then $input.val() else $input.data('undo'))
$input = $cell.find('input, select')
if updated
if $cell.find('form').length == 0
if $input.prop('tagName') == 'SELECT'
$cell.html($input.find("option[value=#{$input.val()}]").html())
else
$cell.html($input.val())
else
$cell.html($cell.data('undo'))
$controlsCell.find('.cancel').click (event) ->
event.preventDefault()
......@@ -69,7 +93,7 @@ initCreation = (table) ->
$row = $createButton.closest('tr')
initInputs($row)
$row.find('td[data]').keypress (event) ->
$row.find('td[data], td[data-name]').keypress (event) ->
if event.which == 13
event.preventDefault()
create()
......@@ -83,7 +107,10 @@ initCreation = (table) ->
data = {}
$row.find('td[data]').each ->
$cell = $(this)
data[$cell.attr('data')] = $cell.find('input').val()
data[$cell.attr('data')] = $cell.find('input, select').val()
$row.find('td[data-name]').each ->
$cell = $(this)
data[$cell.attr('data-name')] = $cell.find('input, select').val()
ajaxData = {}
ajaxData[$table.data('resource')] = data
$.ajax
......@@ -95,20 +122,36 @@ initCreation = (table) ->
$table.find('tbody').html(newTableBody)
$row.find('input:text').val('')
initEditableRows(table)
dispatchChangeEvent($table, 'create')
error: (data) -> setErrors($row, data)
initInputs = ($row) ->
$row.find('td[data]').each ->
$row.find('td[data], td[data-name]').each ->
$cell = $(this)
value = $cell.html()
$cell.html("<input data-undo='#{value}' value='#{value}'><span class='has-error'/>")
$cell.data('undo', $cell.html())
if $cell.data('select')
value = $cell.html()
$cell.html("<select>#{$cell.data('select')}</select><span class='has-error'/>")
$select = $cell.find('select')
$select.val($select.find("option:contains(#{value})").val())
else if $cell.data('image')
$cell.html("#{$cell.data('image')}</input><span class='has-error'/>")
else
value = $cell.html()
$cell.html("<input value='#{value}'><span class='has-error'/>")
initControls = ($cell) ->
$cell.html("<a class='btn btn-primary btn-xs save' href='#'><i class='fa fa-check'/></a> <a class='btn btn-default btn-xs cancel' href='#'><i class='fa fa-remove'/></a>")
clearErrors = ($row) ->
$row.find("td[data] span").html('')
$row.find("td[data] span, td[data-name] span").html('')
setErrors = ($row, data) ->
for k,v of data.responseJSON
$row.find("td[data='#{k}'] span").html(v.join())
$row.find("td[data='#{k}'] span, td[data-name='#{k}'] span").html(v.join())
dispatchChangeEvent = ($table, type) ->
window.dispatchEvent new CustomEvent('editable_table_changed', detail: {resource: $table.data('resource'), type: type})
selectFromData = (data, query) ->
jQuery("<div>#{data}</div>").find(query)
\ No newline at end of file
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
$('#page_mode').each -> refresh_menu_item_fieldset($(this))
$('#page_mode').change -> refresh_menu_item_fieldset($(this))
......@@ -7,7 +7,7 @@ refresh_menu_item_fieldset = (item) ->
$('#path_fields').hide()
$('#page_fields').hide()
$('#link_fields').show()
else if item.val() == 'page'
else if item.val() == 'page' || item.val() == 'anchor'
$('#path_fields').hide()
$('#page_fields').show()
$('#link_fields').hide()
......
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
if $('.sort_icon').length
init_sortable('tbody', 'tr')
......
#= require jquery-ui/draggable
#= require jquery-ui/resizable
#= require jquery-ui/widgets/draggable
#= require jquery-ui/widgets/resizable
$ ->
$('#blocks_controls').draggable()
......
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
initContactUsMessage()
refreshLandingHeader()
......
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
$(".box_sandwich").click ->
if $('.mobile_menu').hasClass('menu_open')
closeMobileMenu()
......
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
$('.box_search .search_action').click (e) ->
$('.box_search form').submit()
......
$(document).on 'ready page:load', ->
$(document).on 'ready page:load turbolinks:load', ->
$("a[rel~=popover], .has-popover").popover()
$("a[rel~=tooltip], .has-tooltip").tooltip()
/*
*= require bootstrap-datetimepicker
*= require_directory ./admin
*= require_tree ./admin
*= require_self
*/
table.editable_rows {
td {
input {
width: 100%;
margin: -2px 0;
}
select {
width: 100%;
padding: 2px 0;
margin: -2px 0;
}
img {
margin-top: -5px;
margin-bottom: -5px;
max-height: 32px;
max-width: 100%
}
}
td span.has-error {
color: #a94442;
}
}
div {
&.field, &.actions {
margin-bottom: 10px;
}
}
//body {
//
// color: #333;
......@@ -31,11 +37,6 @@
// }
//}
//
//div {
// &.field, &.actions {
// margin-bottom: 10px;
// }
//}
//
//#notice {
// color: green;
......
body.devise {
padding: 20px;
text-align: center;
.remember {
display: inline-block;
vertical-align: middle;
}
.form-group {
width: 220px;
margin: 0 auto 10px;
}
input[type=email], input[type=password], div:not(.remember) > label:first-child {
margin: 0 2px 0;
width: 220px;
text-align: left;
}
a {
line-height: 1.5;
}
input[type=submit] {
max-width: 200px;
white-space: normal;
margin-top: 10px;
margin-bottom: 20px;
}
.logo img {
max-width: 80%;
max-height: 100px;
}
}
\ No newline at end of file
......@@ -2,8 +2,12 @@ class AccountsController < AdminController
before_action :set_account, only: [:show, :edit, :update, :destroy]
def index
@accounts = paginated tabular_filter.add_keys_replacements({email: 'accounts.email', on_hold: 'accounts.on_hold'}).
apply(select_accounts.order 'email', :email)
@accounts = paginated tabular_filter.add_keys_replacements({email: 'accounts.email', on_hold: 'accounts.on_hold',
admin: 'if(administrators.id is not null, 1, 0)'}).apply(Account.with_admins.order :email)
end
def new
@account = Account.new
end
def show
......@@ -12,6 +16,19 @@ class AccountsController < AdminController
def edit
end
def create
@account = Account.new(account_params)
respond_to do |format|
if @account.save
format.html { redirect_to @account, notice: 'Account was successfully created.' }
format.json { render :show, status: :created, location: @account }
else
format.html { render :new }
format.json { render json: @account.errors, status: :unprocessable_entity }
end
end
end
def update
respond_to do |format|
if @account.update(account_params)
......@@ -25,11 +42,16 @@ class AccountsController < AdminController
end
def destroy
redirect_to accounts_url
end
def vacancy
redirect_to accounts_path(vacancy: Vacancy.find(params[:id]).name)
respond_to do |format|
if @account.administrator.nil? || @account.on_hold? || Administrator.active.count > 1
@account.destroy
format.html { redirect_to accounts_url, notice: 'Account was successfully destroyed.' }
format.json { head :no_content }
else
format.html { redirect_to accounts_url, alert: 'You cannot destroy last active admin.' }
format.json { head :no_content }
end
end
end
private
......@@ -58,6 +80,7 @@ class AccountsController < AdminController
params[:account][:password] = nil
params[:account][:password_confirmation] = nil
end
params.require(:account).permit(:email, :wallet_address, :on_hold, :referrer_id, :subscribed, :password, :password_confirmation)
params.require(:account).permit(:email, :wallet_address, :on_hold, :referrer_id, :subscribed, :admin,
:password, :password_confirmation)
end
end
......@@ -211,7 +211,7 @@ class TabularFilter
end
def yes_no_helper(attr)
select_tag attr, options_for_select([[t(:yes), 1], [t(:no), 0]], value_for(attr)),
select_tag attr, options_for_select([[t('humanizers.bool.true'), 1], [t('humanizers.bool.false'), 0]], value_for(attr)),
include_blank: true, class: 'filter boolean'
end
......
class ImagesController < ApplicationController
before_action :set_image
layout false
def show
render_image
end
def edit
end
def update
if @image.update image_params
render_image
else
render nothing: true, status: :internal_server_error
end
end
private
def render_image
render html: "<img src='#{@image.data_url}'/>".html_safe, status: :ok
end
# Use callbacks to share common setup or constraints between actions.
def set_image
@image = Image.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def image_params
params[:image] = {remove_data: true} if params[:image].nil?
params.require(:image).permit(:data, :remove_data)
end
end
class SettingsController < AdminController
before_action :set_setting, only: [:update, :destroy]
# GET /settings
# GET /settings.json
def index
@settings = Setting.init.all
end
# POST /settings
# POST /settings.json
def create
@setting = Setting.new(setting_params)
respond_to do |format|
if @setting.save
format.html { redirect_to settings_url, notice: 'Setting was successfully created.' }
else
format.json { render json: @setting.errors, status: :unprocessable_entity }
end
end
end
# PATCH/PUT /settings/1
# PATCH/PUT /settings/1.json
def update
respond_to do |format|
if @setting.update(setting_params)
format.html { redirect_to settings_url, notice: 'Setting was successfully updated.' }
format.json { render json: {}, status: :ok, location: @tag }
else
format.html { render :edit }
format.json { render json: @setting.errors, status: :unprocessable_entity }
end
end
end
# DELETE /settings/1
# DELETE /settings/1.json
def destroy
@setting.destroy
respond_to do |format|
format.html { redirect_to settings_url, notice: 'Setting was successfully destroyed.' }
format.json { head :no_content }
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_setting
@setting = Setting.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def setting_params
params.require(:setting).permit(:value)
end
end
class SettingsController < AdminController
before_action :set_setting, only: [:update, :destroy, :image_form]
# GET /settings
# GET /settings.json
def index
@settings = Setting.init.all
end
# PATCH/PUT /settings/1
# PATCH/PUT /settings/1.json
def update
respond_to do |format|
if @setting.update(setting_params)
format.html { redirect_to settings_url, notice: 'Setting was successfully updated.' }
format.json { render json: {}, status: :ok }
else
format.json { render json: @setting.errors, status: :unprocessable_entity }
end
end
end
# DELETE /settings/1
# DELETE /settings/1.json
def destroy
@setting.destroy
respond_to do |format|
format.html { redirect_to settings_url, notice: 'Setting was successfully destroyed.' }
format.json { head :no_content }
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_setting
@setting = Setting.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def setting_params
params.require(:setting).permit(:value)
end
end
module SettingsHelper
def generate_setting_data(setting)
data = {name: :value}
case setting.format
when :image
form = simple_form_for setting.real_value do |f|
f.file_field :data, accept: 'image/*'
end
data.merge!({image: form})
when :bool
select_data = options_for_select([[t('no'), 0], [t('yes'), 1]])
data.merge!({select: select_data})
else
nil
end
data
end
end
......@@ -2,6 +2,17 @@ class Account < ActiveRecord::Base
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
has_one :administrator
scope :with_admins, -> { joins('left join administrators on accounts.id = administrators.account_id') }
scope :active, -> { where(on_hold: false) }
after_create do
create_administrator if @should_be_admin
end
def active_for_authentication?
super and not self.on_hold?
end
# after_create :send_welcome_mail
# def self.from_omniauth(auth, current_user, ip_address, referrer_id = nil)
......@@ -36,4 +47,20 @@ class Account < ActiveRecord::Base
# end
# end
def admin
administrator.present?
end
def admin=(value)
if value.to_i > 0
if new_record?
@should_be_admin = true
else
create_administrator if administrator.nil?
end
else
administrator.destroy if administrator.present?
end
end
end
class Administrator < ActiveRecord::Base
include Accounted
scope :active, -> { joins(:account).merge Account.active }
end
class Image < ActiveRecord::Base
mount_uploader :data, ImageUploader
end
# noinspection RubyClassVariableUsageInspection
class Setting < ActiveRecord::Base
validates :name, presence: true, uniqueness: true
validates :value, presence: true
before_update :reset_setting_variable
default_scope { order :name }
DEFAULTS = {
site_name: 'Personal site',
title: 'Personal site',
description: 'Site of your dreams.',
keywords: 'site, personal site, own site',
gse_id: '007392588842326689376:3onw-lza4mc',
google_analytics_id: 'UA-63039804-12'
title: {default: 'Blank site', format: :string},
description: {default: 'New blank site - it is stub for future site!', format: :string},
keywords: {default: '', format: :string},
favicon: {default: nil, format: :image},
gse_id: {default: '007392588842326689376:3onw-lza4mc', format: :string},
google_analytics_id: {default: 'UA-63039804-12', format: :string}
}
def self.init
DEFAULTS.keys.each { |name| get(name) }
DEFAULTS.keys.each { |name| get(name)[:default] }
self
end
def self.get(name)
setting = find_or_initialize_by(name: name)
setting.update(value: DEFAULTS[name.to_sym]) if setting.new_record?
setting.value
end
def self.site_name
@@site_name ||= get(:site_name)
setting.update(value: DEFAULTS[name.to_sym][:default]) if setting.new_record?
setting
end
def self.title
@@title ||= get(:title)
@@title ||= get(:title).real_value
end
def self.description
@@description ||= get(:description)
@@description ||= get(:description).real_value
end
def self.keywords
@@keywords ||= get(:keywords)
@@keywords ||= get(:keywords).real_value
end
def self.favicon
@@favicon ||= get(:favicon).real_value
end
def self.gse_id
@@gse_id ||= get(:gse_id)
@@gse_id ||= get(:gse_id).real_value
end
def self.google_analytics_id
@@google_analytics_id ||= get(:google_analytics_id)
@@google_analytics_id ||= get(:google_analytics_id).real_value
end
def real_value
case format
when :image
image = Image.find_by(id: value)
unless image
image = Image.create
update value: image.id
end
image
when :int
value.to_i
when :bool
value.to_i > 0
when :array
value.split
when :hash
Hash[*value.split(/,\s*/).map{|s| p = s.split(/:\s*/); [p[0].to_sym, p[1]]}.flatten]
else
value
end
end
def formatted_value
case format
when :int
value.to_i
when :bool
I18n.t("humanizers.bool.#{real_value}")
when :image
"<img src='#{real_value.data_url}'/>".html_safe
else
value
end
end
def format
setting_default = DEFAULTS[name.to_sym]
setting_default ? setting_default[:format] : nil
end
private
......
......@@ -4,6 +4,7 @@
= f.input :password_confirmation
= f.input :subscribed
= f.input :on_hold
= f.input :admin, as: :boolean
= f.button :submit, :class => 'btn-primary'
= link_to t('.cancel', :default => t("helpers.links.cancel")), accounts_path, :class => 'btn btn-default'
- model_class = Account
.page-header
.page-header.refresh_pagination
%h1
= model_class.model_name.human(count: 2)
.pull-right
= link_to 'Newsletter', new_newsletter_path(params), class: 'btn btn-default'
.filtered_pagination
- newsletter_params = tabular_filter.condition.present? ? {newsletter: {recipient_filter: tabular_filter.condition}} : nil
= link_to 'Newsletter', new_newsletter_path(newsletter_params), class: 'btn btn-default'
= will_paginate @accounts
- params = @tabular_filter.condition.present? ? {newsletter: {recipient_filter: @tabular_filter.condition}} : nil
%table.table.table-striped.filtered_table
%thead
%tr
%th= model_class.human_attribute_name(:email)
%th= model_class.human_attribute_name(:subscribed)
%th= model_class.human_attribute_name(:on_hold)
%th= model_class.human_attribute_name(:admin)
%th= model_class.human_attribute_name(:created_at)
%th= t 'helpers.actions'
= tabular_filter.row_helper ['email', {subscribed: :bool}, {on_hold: :bool}, '-', '-'] do
= tabular_filter.row_helper ['email', {subscribed: :bool}, {on_hold: :bool}, {admin: :bool}, '-', '-'] do
-link_to '?', class: 'btn btn-default btn-xs' do
%i.fa.fa-close
%tbody
- @accounts.each do |account|
%tr
%td= link_to account.email, account_path(account)
%td= account.subscribed
%td= account.on_hold
%td=localize_datetime account.created_at
%td= t "humanizers.bool.#{account.subscribed}"
%td= t "humanizers.bool.#{account.on_hold}"
%td= t "humanizers.bool.#{account.administrator.present?}"
%td= localize_datetime account.created_at
%td.actions
= link_to edit_account_path(account), title: 'Edit', class: 'btn btn-default btn-xs' do
%i.fa.fa-edit
......@@ -32,3 +33,4 @@
class: 'btn btn-xs btn-danger' do
%i.fa.fa-trash
= link_to t('helpers.links.new'), new_account_path, class: 'btn btn-primary'
......@@ -10,10 +10,13 @@
= @account.updated_at
%p
%strong= model_class.human_attribute_name(:subscribed) + ':'
= @account.subscribed
= t "humanizers.bool.#{@account.subscribed}"
%p
%strong= model_class.human_attribute_name(:on_hold) + ':'
= @account.on_hold
= t "humanizers.bool.#{@account.on_hold}"
%p
%strong= model_class.human_attribute_name(:admin) + ':'
= t "humanizers.bool.#{@account.administrator.present?}"
%p
%strong= model_class.human_attribute_name(:reset_password_token) + ':'
= @account.reset_password_token
......
.row
.col-sm-12.col-xs-12
%div{class: ('tab-content' if locales.count > 1)}
-locales.each do |locale|
.tab-pane{class: ["#{locale}_tab", locale == I18n.locale.to_s ? 'active' : nil].compact.join(' ')}
-attributes.each do |input_type, attribute_names|
-attribute_names = [attribute_names] unless attribute_names.is_a?(Array)
-attribute_names.each do |attribute_name|
%div{class: "localized_#{attribute_name}"}
-if input_type.to_s == 'cktext_area'
%br
=f.cktext_area "#{attribute_name}_#{locale}", ckeditor: {language: I18n.locale}
=f.error "#{attribute_name}_#{locale}"
-elsif input_type.to_s == 'text_area'
=f.input "#{attribute_name}_#{locale}", as: :text, input_html: {rows: 4}, label: t("attributes.#{attribute_name}")
-else
=f.send(input_type.to_sym, "#{attribute_name}_#{locale}".to_sym, label: t("attributes.#{attribute_name}"))
%div{class: ('tab-content' if locales.count > 1)}
-locales.each do |locale|
.tab-pane{class: ["#{locale}_tab", locale == I18n.locale.to_s ? 'active' : nil].compact.join(' ')}
-attributes.each do |input_type, attribute_names|
-attribute_names = [attribute_names] unless attribute_names.is_a?(Array)
-attribute_names.each do |attribute_name|
%div{class: "localized_#{attribute_name}"}
-if input_type.to_s == 'cktext_area'
%br
=f.cktext_area "#{attribute_name}_#{locale}", ckeditor: {language: I18n.locale}
=f.error "#{attribute_name}_#{locale}"
-elsif input_type.to_s == 'text_area'
=f.input "#{attribute_name}_#{locale}", as: :text, input_html: {rows: 4}, label: t("attributes.#{attribute_name}")
-else
=f.send(input_type.to_sym, "#{attribute_name}_#{locale}".to_sym, label: t("attributes.#{attribute_name}"))
.row
.col-sm-12.col-xs-12
-if locales.count > 1
%ul.nav.nav-tabs
-locales.each do |locale|
%li{class: ('active' if locale == I18n.locale.to_s)}
%a{data: {toggle: 'tab'}, href: ".#{locale}_tab"}= t("locale.#{locale}")
-if locales.count > 1
%ul.nav.nav-tabs
-locales.each do |locale|
%li{class: ('active' if locale == I18n.locale.to_s)}
%a{data: {toggle: 'tab'}, href: ".#{locale}_tab"}= t("locale.#{locale}")
= simple_form_for @image do |f|
= f.file_field :data, accept: 'image/*'
......@@ -4,7 +4,7 @@
%title= content_for?(:title) ? yield(:title) : Setting.title
%meta{name: 'description', content: content_for?(:description) ? yield(:description) : Setting.description}
%meta{name: 'keywords', content: content_for?(:keywords) ? yield(:keywords) : Setting.keywords }
%meta{property: 'og:site_name', content: Setting.site_name }
%meta{property: 'og:site_name', content: Setting.title }
%meta{property: 'og:title', content: content_for?(:title) ? yield(:title) : Setting.title }
%meta{property: 'og:description', content: content_for?(:description) ? yield(:description) : Setting.description }
%meta{property: 'og:type', content: content_for?(:og_type) ? yield(:og_type) : 'website' }
......@@ -15,7 +15,7 @@
= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
= favicon_link_tag '/favicon.png', :rel => 'shortcut icon'
= favicon_link_tag Setting.favicon.data_url || '/favicon.ico', :rel => 'shortcut icon'
= csrf_meta_tags
-if Rails.env.production? && Setting.google_analytics_id
......
......@@ -15,7 +15,7 @@
= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
= favicon_link_tag '/favicon.png', :rel => 'shortcut icon'
= favicon_link_tag Setting.favicon.data_url || '/favicon.ico', :rel => 'shortcut icon'
= javascript_include_tag 'shared'
= javascript_include_tag 'ckeditor/init'
= javascript_include_tag 'admin'
......
!!! 5
%html(lang="en")
%head
%meta(charset="utf-8")
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
%meta(name="turbolinks-cache-control" content="no-cache")
= render 'layouts/front_meta'
= csrf_meta_tags
/ Le HTML5 shim, for IE6-8 support of HTML elements
/[if lt IE 9]
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
= stylesheet_link_tag "shared", :media => "all"
= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
= javascript_include_tag 'shared'
%body.devise
.container-fluid
.row
.col-lg-1.hidden-md
.col-lg-10.col-md-12
= bootstrap_flash
= yield
.col-lg-1.hidden-md
-#%footer
-# %a{href: 'http://studio.sp-service.com.ua', target: :_blank} &copy; SP Studio 2016
......@@ -2,9 +2,9 @@
= render 'active_translation/localed_tabs_and_inputs', f: f, attributes: {input: :title}
= f.input :enabled
= f.input :url_id
= f.input :mode, as: :select, collection: Page.modes.map{|m| [m, m.to_sym]}, include_blank: false
= f.input :mode, as: :select, collection: Page.modes.map{|m| [ t("activerecord.attributes.page.modes.#{m}") , m.to_sym]}.sort, include_blank: false
#path_fields
= f.input :path, as: :select, collection: Page.links.keys.map{|k| [k, k]}, include_blank: false
= f.input :path, as: :select, collection: Page.links.keys.map{|l| [t("activerecord.attributes.page.links.#{l}"), l]}.sort, include_blank: false
#link_fields
= f.input :link
#page_fields
......
......@@ -18,10 +18,10 @@
%td.sort_icon
.fa.fa-arrows-v
%td= link_to page.title, page_path(page)
%td= page.mode
%td= t "activerecord.attributes.page.modes.#{page.mode}"
%td= truncate_html page.body, 100
%td= page.url_id
%td= page.enabled
%td= t "humanizers.bool.#{page.enabled}"
%td=localize_datetime page.created_at
%td.actions
= link_to edit_page_path(page), title: 'Edit', class: 'btn btn-default btn-xs' do
......
......@@ -7,21 +7,24 @@
= @page.title
%p
%strong= model_class.human_attribute_name(:enabled) + ':'
= @page.enabled
= t "humanizers.bool.#{@page.enabled}"
%p
%strong= model_class.human_attribute_name(:url_id) + ':'
= @page.url_id
%p
%strong= model_class.human_attribute_name(:mode) + ':'
= @page.mode
= t "activerecord.attributes.page.modes.#{@page.mode}"
-if @page.mode == 'path'
%p
%strong= model_class.human_attribute_name(:link) + ':'
= link_to @page.link, send(Page.links[@page.link.to_sym]), target: :_blank
= link_to t("activerecord.attributes.page.links.#{@page.link}"), send(Page.links[@page.link.to_sym]), target: :_blank
-elsif @page.mode == 'link'
%p
%strong= model_class.human_attribute_name(:link) + ':'
= link_to @page.link, @page.link, target: :_blank
-else
%p
%strong= model_class.human_attribute_name(:body) + ':'
......
- model_class = Setting
= title(t 'activerecord.models.setting.few')
.page-header
%h1=t '.title', :default => model_class.model_name.human(count: 2)
%h1=t 'activerecord.models.setting.few'
%table.table.table-striped.editable_rows{'data-resource' => model_class.name.underscore}
%thead
%tr
%th= model_class.human_attribute_name(:updated_at)
%th.hidden-xs= model_class.human_attribute_name(:updated_at)
%th= model_class.human_attribute_name(:name)
%th= model_class.human_attribute_name(:value)
%th=t '.actions', :default => t("helpers.actions")
%th.text-right=t 'helpers.actions'
%tbody
- @settings.each do |setting|
%tr{'data-id' => setting.id}
%td=localize_datetime setting.updated_at
%td= setting.name.humanize
%td{data: :value}= setting.value
%tr{data:{id: setting.id}}
%td.hidden-xs=localize_datetime setting.updated_at
%td= t "settings.#{setting.name}"
%td{data: generate_setting_data(setting)}= setting.formatted_value
%td.actions
= link_to edit_setting_path(setting), class: 'btn btn-default btn-xs edit' do
%i.fa.fa-edit
......@@ -22,99 +22,103 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activejob (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activemodel (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activerecord (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="acts_as_list (v0.7.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activejob (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activemodel (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activerecord (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="acts_as_list (v0.8.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="airbrussh (v1.1.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="arel (v6.0.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v6.3.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v6.5.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="binding_of_caller (v0.7.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bootstrap-sass (v3.3.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bootstrap-sass (v3.3.7, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bootstrap-will_paginate (v0.0.10, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bootstrap3-datetimepicker-rails (v4.15.35, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.11.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano (v3.4.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano-bundler (v1.1.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano (v3.6.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano-bundler (v1.2.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano-faster-assets (v1.0.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano-rails (v1.1.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano-harrow (v0.5.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano-rails (v1.2.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="capistrano-rvm (v0.1.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="carrierwave (v0.11.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ckeditor (v4.1.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="carrierwave (v0.11.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ckeditor (v4.2.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="climate_control (v0.0.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="cocaine (v0.5.8, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.1.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.10.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.12.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="commonjs (v0.2.7, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="debug_inspector (v0.0.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="devise (v3.5.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="devise-i18n (v1.0.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="devise (v4.2.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="devise-i18n (v1.1.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.6.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="font-awesome-rails (v4.6.0.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.3.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="font-awesome-rails (v4.7.0.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.3.7, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="haml (v4.0.7, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="haml-rails (v0.9.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="html2haml (v2.0.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.4.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.1.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v5.0.5, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.6.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.2.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v6.0.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="less (v2.6.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="less-rails (v2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="less-rails (v2.8.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mail (v2.6.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0221, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_magick (v4.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.0.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="momentjs-rails (v2.11.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.11.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mimemagic (v0.3.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_magick (v4.6.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.1.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="momentjs-rails (v2.15.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.5, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nested_form (v0.3.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="net-scp (v1.2.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v3.1.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.6.7.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v3.2.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.6.8.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="orm_adapter (v0.5.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v1.6.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v1.6.5, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-deprecated_sanitizer (v1.0.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v1.0.7, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="railties (v4.2.5.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v11.1.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rdoc (v4.2.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="responders (v2.1.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ruby_parser (v3.8.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="railties (v4.2.7.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rdoc (v4.3.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="responders (v2.3.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ruby_parser (v3.8.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass (v3.4.22, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sdoc (v0.4.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sdoc (v0.4.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sexp_processor (v4.7.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="simple_form (v3.2.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.6.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.0.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sshkit (v1.9.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="simple_form (v3.3.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sshkit (v1.11.5, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.5, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks (v2.5.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.5, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.0.1, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.0.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="twitter-bootstrap-rails (v3.2.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.2, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo-data (v1.2016.3, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo-data (v1.2016.10, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.4, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="warden (v1.2.6, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="web-console (v2.3.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="will_paginate (v3.1.0, ruby-2.1.5-p273) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="will_paginate (v3.1.5, ruby-2.1.5-p273) [gem]" level="application" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="0" />
......
# config valid only for current version of Capistrano
lock '3.4.0'
lock '3.6.1'
# DEPLOY
set :application, 'haba_plastics'
......
......@@ -262,4 +262,9 @@ Devise.setup do |config|
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
#configure devise layouts
Rails.application.config.to_prepare do
Devise::RegistrationsController.layout proc { |controller| account_signed_in? ? 'admin' : 'devise' }
end
end
......@@ -5,6 +5,8 @@ en:
login: Login
email: Email
password: Password
password_confirmation: Password confirmation
current_password: Current password
account: Account
identifier: Identifier
updated_at: Updated at
......@@ -15,6 +17,8 @@ en:
image: Image
description: Description
subject: Subject
title: Title
keywords: Keywords
meta_keywords: Keywords
meta_description: Description
positions: Positions
......@@ -90,9 +94,10 @@ en:
enabled: Active
mode: Mode
modes:
anchor: Anchor page
page: Page
path: Internal link
link: External link
page: Page
links:
main: Home page
contact_us: Contact us
......@@ -106,12 +111,19 @@ en:
blocks:
apply_changes: Apply changes?
locale:
uk: Укр
ru: Рус
en: Eng
de: Ger
humanizers:
access:
allowed: Allowed
prohibited: Prohibited
'true': Allowed
'false': Prohibited
bool:
'false': Prohibited
'true': Allowed
locale:
en: Eng
ru: "Рус"
uk: "Укр"
info_box:
title: Plastic and aesthetic surgery
......
......@@ -5,6 +5,8 @@ ru:
login: Логин
email: Електронный адрес
password: Пароль
password_confirmation: Подтверждение пароля
current_password: Текущий пароль
account: Учетная запись
identifier: Идентификатор
updated_at: Обновлено
......@@ -15,6 +17,8 @@ ru:
image: Изображение
description: Описание
subject: Тема
title: Заглавие
keywords: Ключевые слова
meta_keywords: Ключевые слова
meta_description: Описание
positions: Позиции
......@@ -90,9 +94,10 @@ ru:
enabled: Активная
mode: Режим
modes:
anchor: Якорная страница
page: Страница
path: Внутренняя ссылка
link: Внешняя ссылка
page: Страница
links:
main: Домашняя страница
contact_us: Написать нам
......@@ -354,12 +359,19 @@ ru:
blocks:
apply_changes: Применить изменения?
locale:
uk: Укр
ru: Рус
en: Eng
de: Ger
humanizers:
access:
allowed: "Разрешено"
prohibited: "Запрещено"
'true': "Разрешено"
'false': "Запрещено"
bool:
'false': "Нет"
'true': "Да"
locale:
en: Eng
ru: "Рус"
uk: "Укр"
info_box:
title: Пластическая и эстетическая хирургия
......
......@@ -5,6 +5,8 @@ uk:
login: Логін
email: Електронна адреса
password: Пароль
password_confirmation: Підтвердження паролю
current_password: Поточний пароль
account: Обліковий запис
identifier: Ідентифікатор
updated_at: Оновлено
......@@ -15,6 +17,8 @@ uk:
image: Зображення
description: Опис
subject: Тема
title: Заголовок
keywords: Ключові слова
meta_keywords: Ключові слова
meta_description: Опис
positions: Позиції
......@@ -90,9 +94,10 @@ uk:
enabled: Активна
mode: Режим
modes:
anchor: Якірна сторінка
page: Сторінка
path: Внутрішнє посилання
link: Зовнішнє посилання
page: Сторінка
links:
main: Домашня сторінка
contact_us: Написати нам
......@@ -354,12 +359,19 @@ uk:
blocks:
apply_changes: Застосувати зміни?
locale:
uk: Укр
ru: Рус
en: Eng
de: Ger
humanizers:
access:
allowed: "Дозволeно"
prohibited: "Заборонено"
'true': "Дозволeно"
'false': "Заборонено"
bool:
'false': "Ні"
'true': "Так"
locale:
en: Eng
ru: "Рус"
uk: "Укр"
info_box:
title: Пластична та естетична хірургія
......
......@@ -6,14 +6,8 @@ Rails.application.routes.draw do
mount Ckeditor::Engine => '/ckeditor'
resources :pages
resources :settings, only: [:index, :edit, :update]
controller :accounts do
get 'accounts' => :index, as: 'accounts'
get 'account/:id' => :show, as: 'account'
get 'account/:id/edit' => :edit, as: 'edit_account'
patch 'account/:id' => :update
end
resources :images, only: [:show, :edit, :update]
resources :accounts
resources :newsletters
controller :newsletters do
get 'newsletters/:id/send' => :sending, as: 'send_newsletter'
......
class CreateImages < ActiveRecord::Migration
def change
create_table :images do |t|
t.string :data
t.timestamps null: false
end
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160302111301) do
ActiveRecord::Schema.define(version: 20160826182357) do
create_table "accounts", force: :cascade do |t|
t.string "email", limit: 255, default: "", null: false
......@@ -87,6 +87,12 @@ ActiveRecord::Schema.define(version: 20160302111301) do
add_index "ckeditor_assets", ["assetable_type", "assetable_id"], name: "idx_ckeditor_assetable", using: :btree
add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], name: "idx_ckeditor_assetable_type", using: :btree
create_table "images", force: :cascade do |t|
t.string "data", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "newsletters", force: :cascade do |t|
t.string "subject", limit: 255
t.text "text", limit: 65535
......
......@@ -192,7 +192,7 @@ module ActiveTranslation
end
end
def reload
def reload(*args)
super
end
......
No preview for this file type
require 'test_helper'
class ImagesControllerTest < ActionController::TestCase
def setup
sign_in accounts(:one)
@image = images(:one)
end
test 'should show image' do
get :show, id: @image
assert_response :success
end
test 'should get edit' do
get :edit, id: @image
assert_response :success
end
test 'should update user' do
patch :update, id: @image, image: {data: ''}
assert_response :success
end
end
one:
data: MyString
two:
data: MyString
require 'test_helper'
class ImageTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
......@@ -10,7 +10,7 @@ class ActiveSupport::TestCase
end
class ActionController::TestCase
include Devise::TestHelpers
include Devise::Test::ControllerHelpers
def setup
# @request.env["devise.mapping"] = Devise.mappings[:admin]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment