@ -1,90 +1,97 @@ |
|||||||
source 'http://rubygems.org' |
source 'http://rubygems.org' |
||||||
|
|
||||||
gem 'rails', '3.2.13' |
gem 'rails', '4.0.0' |
||||||
|
|
||||||
# Bundle edge Rails instead: |
# Bundle edge Rails instead: |
||||||
# gem 'rails', :git => 'git://github.com/rails/rails.git' |
# gem 'rails', :git => 'git://github.com/rails/rails.git' |
||||||
|
|
||||||
# gem 'pg' |
# gem 'pg' |
||||||
gem 'mysql2' |
gem 'mysql2' |
||||||
gem 'devise', '~> 2.1.0' |
gem 'devise', '~> 3.0.3' |
||||||
gem 'cancan', '= 1.6.7' |
gem 'cancan', '= 1.6.7' |
||||||
gem 'squeel', '~> 1.0.0' |
gem 'squeel', '~> 1.1.0' |
||||||
gem 'sentient_model', '~> 1.0.4' |
gem 'sentient_model', '~> 1.0.4' |
||||||
gem 'userstamp', '~> 2.0.2', |
gem 'userstamp', '~> 2.0.2', |
||||||
git: 'https://github.com/delynn/userstamp.git' |
git: 'https://github.com/delynn/userstamp.git' |
||||||
gem 'validates_hostname', '~> 1.0.0', |
gem 'validates_hostname', '~> 1.0.0', |
||||||
git: 'https://github.com/KimNorgaard/validates_hostname.git' |
git: 'https://github.com/KimNorgaard/validates_hostname.git' |
||||||
gem 'nilify_blanks', '~> 1.0.0' |
gem 'nilify_blanks', '~> 1.0.0' |
||||||
gem 'rails_config', '~> 0.2.4' |
gem 'rails_config', '~> 0.3.3' |
||||||
|
gem 'rails-settings-cached', '~> 0.3.1' |
||||||
gem 'active-model-email-validator', '~> 1.0.2' |
gem 'active-model-email-validator', '~> 1.0.2' |
||||||
gem 'mail_form', '~> 1.3.0' |
gem 'mail_form', '~> 1.5.0.rc', |
||||||
gem 'switch_user', '~> 0.6.0' |
git: 'https://github.com/plataformatec/mail_form.git' |
||||||
gem 'simple_form', '~> 2.0.0' |
gem 'switch_user', '~> 0.9.3' |
||||||
|
gem 'simple_form', '~> 3.0.0.rc', |
||||||
|
git: 'https://github.com/plataformatec/simple_form.git' |
||||||
gem 'concerned_with', '~> 0.1.0' |
gem 'concerned_with', '~> 0.1.0' |
||||||
gem 'navigasmic', '~> 0.5.6', |
gem 'navigasmic', '~> 0.5.6', |
||||||
git: 'https://github.com/jejacks0n/navigasmic.git', |
git: 'https://github.com/jejacks0n/navigasmic.git', |
||||||
tag: 'v0.5.6', |
tag: 'v0.5.6', |
||||||
ref: '1ffe437f279657c6fb87bb4b0215eb723df4ea7a' |
ref: '1ffe437f279657c6fb87bb4b0215eb723df4ea7a' |
||||||
gem 'rails-backbone', '~> 0.7.0' |
gem 'acts_as_nested_interval', '~> 0.1.0' |
||||||
gem 'acts_as_nested_interval', '~> 0.0.7' |
gem 'seedbank', github: 'james2m/seedbank' |
||||||
# path: '/home/clyfe/dev/acts_as_nested_interval' |
# gem 'rails_admin', '~> 0.5.0' |
||||||
# git: 'https://github.com/clyfe/acts_as_nested_interval.git' |
gem 'unicorn', '~> 4.6.3' |
||||||
gem 'seedbank', '~> 0.1.3' |
|
||||||
gem 'rails_admin', '~> 0.4.5' |
|
||||||
gem 'rails-settings-cached', '~> 0.2.2' |
|
||||||
gem 'unicorn', '~> 4.5.0' |
|
||||||
gem 'audited-activerecord', '~> 3.0' |
|
||||||
|
|
||||||
# Gems used only for assets and not required |
gem 'sass-rails', '~> 4.0.0' |
||||||
# in production environments by default. |
gem 'compass-rails', |
||||||
group :assets do |
github: 'milgner/compass-rails', |
||||||
gem 'sass-rails', '~> 3.2.3' |
branch: 'rails4' |
||||||
gem 'compass-rails', '~> 1.0.3' |
gem 'bootstrap-sass', |
||||||
gem 'bootstrap-sass', '~> 2.3.0.1' |
git: 'git://github.com/thomas-mcdonald/bootstrap-sass.git', |
||||||
gem 'font-awesome-sass-rails', '~> 3.0.0' |
branch: '3' |
||||||
gem 'webshims-rails', '~> 0.4.7' |
gem 'font-awesome-sass-rails', '~> 3.0.0' |
||||||
gem 'detect_timezone_rails', '~> 0.0.3' |
gem 'webshims-rails', '~> 1.10.10' |
||||||
gem 'jquery-cookie-rails', '~> 1.3.1' |
gem 'detect_timezone_rails', '~> 0.0.3' |
||||||
gem 'coffee-rails', "~> 3.2.1" |
# gem 'jquery-cookie-rails', '~> 1.3.1' |
||||||
gem 'uglifier', '>= 1.0.3' |
gem 'nprogress-rails', '~> 0.1.2.2' |
||||||
gem 'oily_png', '1.0.2' |
gem 'animate-rails', '~> 1.0.0' |
||||||
gem 'turbo-sprockets-rails3', '0.3.6' |
gem 'coffee-rails', '~> 4.0.0' |
||||||
gem 'therubyracer' |
gem 'uglifier', '>= 1.3.0' |
||||||
end |
gem 'oily_png', '1.1.0' |
||||||
|
gem 'therubyracer' |
||||||
|
|
||||||
gem 'jquery-rails', '~> 2.1.3' |
gem 'jquery-rails', '~> 3.0.4' |
||||||
|
gem 'jquery-ui-rails', '~> 4.0.4' |
||||||
gem 'dalli', '~> 2.6.2' |
gem 'dalli', '~> 2.6.2' |
||||||
gem 'active_scaffold', '~> 3.2.19' |
gem 'active_scaffold', '~> 3.3.4.rc', |
||||||
# git: 'https://github.com/activescaffold/active_scaffold.git' |
git: 'https://github.com/activescaffold/active_scaffold.git' |
||||||
# path: '/home/clyfe/dev/active_scaffold' |
# path: '/home/clyfe/dev/active_scaffold' |
||||||
gem 'turbolinks', '~> 1.0.0' |
gem 'turbolinks', '~> 1.3.0' |
||||||
# gem 'foreigner' ? |
# gem 'foreigner' ? |
||||||
|
|
||||||
group :development do |
group :development do |
||||||
gem 'capistrano', '~> 2.9.0' |
gem 'capistrano', '~> 2.15.5' |
||||||
gem 'capistrano-ext', '~> 1.2.1' |
gem 'capistrano-ext', '~> 1.2.1' |
||||||
gem 'mongrel', '>= 1.2.0.pre2' |
gem 'mongrel', '>= 1.2.0.pre2' |
||||||
gem 'quiet_assets', '~> 1.0.1' |
gem 'quiet_assets', '~> 1.0.1' |
||||||
gem 'meta_request', '0.2.1' |
gem 'parallel_tests', '0.15.3' |
||||||
gem 'parallel_tests', '0.10.0' |
|
||||||
gem 'progress_bar', require: false |
gem 'progress_bar', require: false |
||||||
|
gem 'yaml_db', '0.2.3' |
||||||
|
# gem 'mailcatcher', '0.5.11' |
||||||
|
# gem 'spring', '0.0.10' |
||||||
|
gem 'better_errors', '0.9.0' |
||||||
|
gem 'binding_of_caller', '0.7.2' |
||||||
|
# gem 'figaro', '0.7.0' |
||||||
|
|
||||||
|
gem 'debase', '~> 0.0.4' |
||||||
|
gem 'ruby-debug-ide', '~> 0.4.18' |
||||||
end |
end |
||||||
|
|
||||||
group :test, :development do |
group :test, :development do |
||||||
gem 'sourcify', '~> 0.6.0.rc1' |
gem 'sourcify', '~> 0.6.0.rc1' |
||||||
gem 'rspec-rails', '~> 2.10.1' |
gem 'rspec-rails', '~> 2.14.0' |
||||||
gem 'faker','~> 1.0.1' |
gem 'faker','~> 1.2.0' |
||||||
gem 'factory_girl_rails', '~> 1.6.0' |
gem 'factory_girl_rails', '~> 4.2.1' |
||||||
end |
end |
||||||
|
|
||||||
group :test do |
group :test do |
||||||
gem 'capybara', '~> 1.1.1' |
gem 'capybara', '~> 2.1.0' |
||||||
gem 'database_cleaner', '~> 0.7.1' |
gem 'database_cleaner', '~> 1.1.1' |
||||||
gem 'simplecov', :require => false |
gem 'simplecov', :require => false |
||||||
gem 'spork', '~> 1.0.0.rc0' |
gem 'rb-inotify', '~> 0.9.0' |
||||||
gem 'rb-inotify', '~> 0.8.8' |
gem 'libnotify', '~> 0.8.1' |
||||||
gem 'libnotify', '~> 0.7.2' |
gem 'guard', '1.8.2' |
||||||
gem 'guard-rspec', '~> 0.6.0' |
gem 'guard-rspec', '3.0.2' |
||||||
gem 'guard-spork', '~> 0.5.1' |
|
||||||
end |
end |
||||||
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 226 B |
@ -1,11 +0,0 @@ |
|||||||
#= require_self |
|
||||||
#= require_tree ./templates |
|
||||||
#= require_tree ./models |
|
||||||
#= require_tree ./views |
|
||||||
#= require_tree ./routers |
|
||||||
|
|
||||||
window.App = |
|
||||||
Models: {} |
|
||||||
Collections: {} |
|
||||||
Routers: {} |
|
||||||
Views: {} |
|
@ -1,5 +1,5 @@ |
|||||||
#= require webshims/minified/extras/modernizr-custom |
#= require webshims/extras/modernizr-custom |
||||||
#= require webshims/minified/polyfiller |
#= require webshims/polyfiller |
||||||
|
|
||||||
$.webshims.setOptions('basePath', '/assets/webshims/minified/shims/') |
$.webshims.setOptions('basePath', '/assets/webshims/shims/') |
||||||
$.webshims.polyfill() |
$.webshims.polyfill() |
@ -1,66 +0,0 @@ |
|||||||
// |
|
||||||
// Remove icons since we use font-awesome |
|
||||||
// |
|
||||||
/*! |
|
||||||
* Bootstrap v2.3.0 |
|
||||||
* |
|
||||||
* Copyright 2012 Twitter, Inc |
|
||||||
* Licensed under the Apache License v2.0 |
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0 |
|
||||||
* |
|
||||||
* Designed and built with all the love in the world @twitter by @mdo and @fat. |
|
||||||
*/ |
|
||||||
|
|
||||||
// Core variables and mixins |
|
||||||
@import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc |
|
||||||
@import "bootstrap/mixins"; |
|
||||||
|
|
||||||
// CSS Reset |
|
||||||
@import "bootstrap/reset"; |
|
||||||
|
|
||||||
// Grid system and page structure |
|
||||||
@import "bootstrap/scaffolding"; |
|
||||||
@import "bootstrap/grid"; |
|
||||||
@import "bootstrap/layouts"; |
|
||||||
|
|
||||||
// Base CSS |
|
||||||
@import "bootstrap/type"; |
|
||||||
@import "bootstrap/code"; |
|
||||||
@import "bootstrap/forms"; |
|
||||||
@import "bootstrap/tables"; |
|
||||||
|
|
||||||
// Components: common |
|
||||||
//@import "bootstrap/sprites"; |
|
||||||
@import "bootstrap/dropdowns"; |
|
||||||
@import "bootstrap/wells"; |
|
||||||
@import "bootstrap/component-animations"; |
|
||||||
@import "bootstrap/close"; |
|
||||||
|
|
||||||
// Components: Buttons & Alerts |
|
||||||
@import "bootstrap/buttons"; |
|
||||||
@import "bootstrap/button-groups"; |
|
||||||
@import "bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons |
|
||||||
|
|
||||||
// Components: Nav |
|
||||||
@import "bootstrap/navs"; |
|
||||||
@import "bootstrap/navbar"; |
|
||||||
@import "bootstrap/breadcrumbs"; |
|
||||||
@import "bootstrap/pagination"; |
|
||||||
@import "bootstrap/pager"; |
|
||||||
|
|
||||||
// Components: Popovers |
|
||||||
@import "bootstrap/modals"; |
|
||||||
@import "bootstrap/tooltip"; |
|
||||||
@import "bootstrap/popovers"; |
|
||||||
|
|
||||||
// Components: Misc |
|
||||||
@import "bootstrap/thumbnails"; |
|
||||||
@import "bootstrap/media"; |
|
||||||
@import "bootstrap/labels-badges"; |
|
||||||
@import "bootstrap/progress-bars"; |
|
||||||
@import "bootstrap/accordion"; |
|
||||||
@import "bootstrap/carousel"; |
|
||||||
@import "bootstrap/hero-unit"; |
|
||||||
|
|
||||||
// Utility classes |
|
||||||
@import "bootstrap/utilities"; // Has to be last to override when necessary |
|
@ -0,0 +1,7 @@ |
|||||||
|
.animated.fast { |
||||||
|
-webkit-animation-duration:0.5s; |
||||||
|
-moz-animation-duration:0.5s; |
||||||
|
-ms-animation-duration:0.5s; |
||||||
|
-o-animation-duration:0.5s; |
||||||
|
animation-duration:0.5s; |
||||||
|
} |
@ -1,23 +1,33 @@ |
|||||||
|
$footer-size: 120px; |
||||||
|
|
||||||
body { |
body { |
||||||
background: #f7fdff; |
background: #f7fdff; |
||||||
|
padding-top: 50px; |
||||||
} |
} |
||||||
|
|
||||||
@media (max-width: 980px) { |
html, body { |
||||||
.navbar-fixed-top { |
height: 100%; |
||||||
margin-bottom: 0px; |
|
||||||
} |
|
||||||
} |
} |
||||||
|
|
||||||
@media (min-width: 980px) { |
#wrap { |
||||||
#main { |
min-height: 100%; |
||||||
margin-top: 40px; |
height: auto !important; |
||||||
} |
height: 100%; |
||||||
|
margin: 0 auto (-$footer-size); |
||||||
} |
} |
||||||
|
|
||||||
|
#push { |
||||||
|
height: $footer-size; |
||||||
|
} |
||||||
|
|
||||||
.footer { |
#footer { |
||||||
margin-top: 25px; |
height: $footer-size; |
||||||
padding: 15px 0 15px; |
|
||||||
border-top: 1px solid #E5E5E5; |
|
||||||
} |
} |
||||||
|
|
||||||
|
.page-header { |
||||||
|
text-align: center; |
||||||
|
margin-top: 20px; |
||||||
|
h1 { |
||||||
|
margin-top: 0; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,3 @@ |
|||||||
|
#nprogress .bar, #nprogress .spinner { |
||||||
|
z-index: 2000; |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
class Users::RegistrationsController < Devise::RegistrationsController |
||||||
|
protected |
||||||
|
|
||||||
|
def after_inactive_sign_up_path_for(resource_or_scope) |
||||||
|
page_path('notice') |
||||||
|
end |
||||||
|
end |
@ -1,2 +0,0 @@ |
|||||||
module Users::CnamesHelper |
|
||||||
end |
|
@ -1,2 +0,0 @@ |
|||||||
module Users::PermissionsHelper |
|
||||||
end |
|
@ -1,5 +0,0 @@ |
|||||||
class Audit < Audited::Adapters::ActiveRecord::Audit |
|
||||||
before_save do |
|
||||||
self.username = user.full_name if !username && user |
|
||||||
end |
|
||||||
end |
|
@ -1,3 +1,3 @@ |
|||||||
class Setting < RailsSettings::CachedSettings |
class Setting < RailsSettings::CachedSettings |
||||||
attr_accessible :var, :value |
# attr_accessible :var, :value |
||||||
end |
end |
||||||
|
@ -1,15 +1,19 @@ |
|||||||
<%= render 'shared/public_top' %> |
<%= render 'shared/public_top' %> |
||||||
|
|
||||||
<body class="public"> |
<body class="public"> |
||||||
<%= render 'shared/navigation' %> |
|
||||||
|
|
||||||
<div class="container" id="main"> |
<div id="wrap"> |
||||||
|
|
||||||
|
<%= render 'shared/navigation' %> |
||||||
|
<div class="container animated fast fadeInDown" id="main"> |
||||||
<%= flash_display 'flash' %> |
<%= flash_display 'flash' %> |
||||||
<%= yield %> |
<%= yield %> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="container"> |
<div id="push"></div> |
||||||
<%= render 'shared/bottom' %> |
|
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<%= render 'shared/bottom' %> |
||||||
|
|
||||||
</body> |
</body> |
||||||
</html> |
</html> |
||||||
|
@ -1,11 +1,11 @@ |
|||||||
<div class="page-header"> |
<div class="page-header"> |
||||||
<h1>Contact us</h1> |
<h1>Contact us</h1> |
||||||
</div> |
<small> |
||||||
|
|
||||||
<p> |
|
||||||
Our email address is <%= mail_to Settings.support_mail %> , |
Our email address is <%= mail_to Settings.support_mail %> , |
||||||
or you can contact us using the form below: |
or you can contact us using the form below: |
||||||
</p> |
</small> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
<%= render :partial => 'public/pages/contact/form' %> |
<%= render :partial => 'public/pages/contact/form' %> |
||||||
|
|
||||||
|
@ -1,28 +0,0 @@ |
|||||||
<h3> |
|
||||||
Our kick-ass interface makes managing DNS a breeze. |
|
||||||
</h3> |
|
||||||
<br /> |
|
||||||
<p> |
|
||||||
Easily manage multiple domains and hosts, |
|
||||||
collaborate and manage work-sharing with other sysadmins, |
|
||||||
automate and simplify infrastructure. |
|
||||||
</p> |
|
||||||
<br /> |
|
||||||
<ul> |
|
||||||
<li> |
|
||||||
Friendly support from the founders |
|
||||||
</li> |
|
||||||
<li> |
|
||||||
Offsite backup, every 3 hours |
|
||||||
</li> |
|
||||||
<li> |
|
||||||
We are monitoring everything to work smoothly |
|
||||||
</li> |
|
||||||
<li> |
|
||||||
Complete developers API's |
|
||||||
</li> |
|
||||||
<li> |
|
||||||
Accessible from mobile devices |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
|
|
@ -1,24 +1,39 @@ |
|||||||
<div id="slidesWrapper"> |
<div id="carousel-jumbotron" class="carousel slide"> |
||||||
<div id="slides"> |
<!-- Indicators --> |
||||||
|
<ol class="carousel-indicators"> |
||||||
|
<li data-target="#carousel-jumbotron" data-slide-to="0" class="active"></li> |
||||||
|
<li data-target="#carousel-jumbotron" data-slide-to="1"></li> |
||||||
|
<li data-target="#carousel-jumbotron" data-slide-to="2"></li> |
||||||
|
<li data-target="#carousel-jumbotron" data-slide-to="3"></li> |
||||||
|
<li data-target="#carousel-jumbotron" data-slide-to="4"></li> |
||||||
|
</ol> |
||||||
|
|
||||||
|
<!-- Wrapper for slides --> |
||||||
|
<div class="carousel-inner"> |
||||||
|
<div class="item active"> |
||||||
<%= image_tag 'marketing/1.png' %> |
<%= image_tag 'marketing/1.png' %> |
||||||
|
</div> |
||||||
|
<div class="item"> |
||||||
<%= image_tag 'marketing/2.png' %> |
<%= image_tag 'marketing/2.png' %> |
||||||
|
</div> |
||||||
|
<div class="item"> |
||||||
<%= image_tag 'marketing/3.png' %> |
<%= image_tag 'marketing/3.png' %> |
||||||
|
</div> |
||||||
|
<div class="item"> |
||||||
<%= image_tag 'marketing/4.png' %> |
<%= image_tag 'marketing/4.png' %> |
||||||
|
</div> |
||||||
|
<div class="item"> |
||||||
<%= image_tag 'marketing/5.png' %> |
<%= image_tag 'marketing/5.png' %> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- Controls --> |
||||||
|
<a class="left carousel-control" href="#carousel-jumbotron" data-slide="prev"> |
||||||
|
<span class="icon-prev"></span> |
||||||
|
</a> |
||||||
|
<a class="right carousel-control" href="#carousel-jumbotron" data-slide="next"> |
||||||
|
<span class="icon-next"></span> |
||||||
|
</a> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<script type="text/javascript"> |
<%= javascript_tag "$('.carousel').carousel()" %> |
||||||
$("#slides").slides({ |
|
||||||
navigation: false, |
|
||||||
responsive: true, |
|
||||||
slide: { |
|
||||||
interval: 500 |
|
||||||
}, |
|
||||||
preload: { |
|
||||||
active: true |
|
||||||
}, |
|
||||||
playInterval: 8000, |
|
||||||
pauseInterval: 16000 |
|
||||||
}).slides('play'); |
|
||||||
</script> |
|
@ -0,0 +1,3 @@ |
|||||||
|
<!-- |
||||||
|
Blank page for flash notices |
||||||
|
--> |
@ -1,7 +0,0 @@ |
|||||||
<div class="call-to-action"> |
|
||||||
<%= image_tag 'marketing/arrow_left.png' %> |
|
||||||
<%= link_to new_user_registration_path, class: 'btn btn-primary btn-large' do %> |
|
||||||
<strong>Create an Account Now</strong><br> |
|
||||||
<small>It's free, sign up in 60 seconds.</small> |
|
||||||
<% end %> |
|
||||||
</div> |
|
@ -0,0 +1,17 @@ |
|||||||
|
<%= simple_form_for(resource, |
||||||
|
as: resource_name, |
||||||
|
url: registration_path(resource_name) |
||||||
|
) do |f| %> |
||||||
|
|
||||||
|
<%= devise_error_messages! %> |
||||||
|
|
||||||
|
<%= honeypot %> |
||||||
|
<%= f.input :full_name, required: true %> |
||||||
|
<%= f.input :email, required: true %> |
||||||
|
<%= f.input :password, required: true %> |
||||||
|
<%= f.submit "Sign up", class: 'btn btn-primary' %> |
||||||
|
<small> |
||||||
|
or <%= link_to 'Sign in', new_user_session_path %> |
||||||
|
/ <%= link_to 'Forgot your password?', new_password_path(resource_name) %> |
||||||
|
</small> |
||||||
|
<% end %> |
@ -1,36 +1,46 @@ |
|||||||
<div class="page-header"> |
<div class="page-header"> |
||||||
<h1>Edit <%= resource_name.to_s.humanize %></h1> |
<h1>Settings</h1> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<%= simple_form_for(resource, |
<div class="row"> |
||||||
|
<div class="col-lg-8"> |
||||||
|
<%= simple_form_for(resource, |
||||||
as: resource_name, |
as: resource_name, |
||||||
url: registration_path(resource_name), |
url: registration_path(resource_name), |
||||||
html: { method: :put, class: 'form-horizontal' } |
method: :put, |
||||||
|
html: { autocomplete: 'off' } |
||||||
) do |f| %> |
) do |f| %> |
||||||
|
|
||||||
<%= devise_error_messages! %> |
<%= devise_error_messages! %> |
||||||
|
|
||||||
<div class="actions"> |
<%= f.input :full_name, required: true %> |
||||||
<%= f.input :first_name %> |
<%= f.input :email, required: true %> |
||||||
<%= f.input :last_name %> |
<label class="password optional">Password</label> |
||||||
<%= f.input :email %> |
<small>leave blank if you don't want to change it</small> |
||||||
<%= f.input :password, hint: "leave blank if you don't want to change it" %> |
<%= f.input :password, label: false %> |
||||||
<%= f.input :password_confirmation %> |
<label class="password optional"> |
||||||
<%= f.input :current_password, hint: 'we need your current password to confirm your changes' %> |
<abbr title="required">*</abbr> Current password |
||||||
</div> |
</label> |
||||||
|
<small>we need your current password to confirm your changes</small> |
||||||
|
<%= f.input :current_password, label: false, required: true %> |
||||||
|
|
||||||
<div class="form-actions"> |
|
||||||
<%= f.submit "Update", class: 'btn btn-primary' %> |
<%= f.submit "Update", class: 'btn btn-primary' %> |
||||||
|
<% end %> |
||||||
</div> |
</div> |
||||||
<% end %> |
<div class="col-lg-4"> |
||||||
|
<br class="hidden-lg"> |
||||||
<hr /> |
<div class="alert alert-warning text-center"> |
||||||
|
<h4>Delete account</h4> |
||||||
<div class="alert alert-error"> |
<p> |
||||||
<h3>Danger zone</h3> |
<strong>Danger zone!</strong> |
||||||
<%= link_to "Cancel account", registration_path(resource_name), |
If you delete your account all your data will be deleted! |
||||||
class: 'btn btn-danger pull-right', |
</p> |
||||||
|
<p> |
||||||
|
<%= link_to "Delete my account!", registration_path(resource_name), |
||||||
|
class: 'btn btn-danger', |
||||||
confirm: "All your data will be deleted! Are you sure?", |
confirm: "All your data will be deleted! Are you sure?", |
||||||
method: :delete %> |
method: :delete |
||||||
<p>If you cancel your account all your data will be deleted!</p> |
%> |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
|
@ -1,6 +1,9 @@ |
|||||||
|
require 'active_scaffold/bridges/cancan/cancan_bridge.rb' |
||||||
|
|
||||||
ActiveScaffold.js_framework = :jquery |
ActiveScaffold.js_framework = :jquery |
||||||
|
|
||||||
ActiveScaffold.set_defaults do |conf| |
ActiveScaffold.set_defaults do |conf| |
||||||
conf.security.default_permission = false |
conf.security.default_permission = false |
||||||
|
# conf.cache_action_link_urls = false |
||||||
ActiveScaffold::Config::Mark.mark_all_mode = :page |
ActiveScaffold::Config::Mark.mark_all_mode = :page |
||||||
end |
end |
||||||
|
@ -1,179 +0,0 @@ |
|||||||
# Use this setup block to configure all options available in SimpleForm. |
|
||||||
SimpleForm.setup do |config| |
|
||||||
# Wrappers are used by the form builder to generate a |
|
||||||
# complete input. You can remove any component from the |
|
||||||
# wrapper, change the order or even add your own to the |
|
||||||
# stack. The options given below are used to wrap the |
|
||||||
# whole input. |
|
||||||
config.wrappers :default, :class => :input, |
|
||||||
:hint_class => :field_with_hint, :error_class => :field_with_errors do |b| |
|
||||||
## Extensions enabled by default |
|
||||||
# Any of these extensions can be disabled for a |
|
||||||
# given input by passing: `f.input EXTENSION_NAME => false`. |
|
||||||
# You can make any of these extensions optional by |
|
||||||
# renaming `b.use` to `b.optional`. |
|
||||||
|
|
||||||
# Determines whether to use HTML5 (:email, :url, ...) |
|
||||||
# and required attributes |
|
||||||
b.use :html5 |
|
||||||
|
|
||||||
# Calculates placeholders automatically from I18n |
|
||||||
# You can also pass a string as f.input :placeholder => "Placeholder" |
|
||||||
b.use :placeholder |
|
||||||
|
|
||||||
## Optional extensions |
|
||||||
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup` |
|
||||||
# to the input. If so, they will retrieve the values from the model |
|
||||||
# if any exists. If you want to enable the lookup for any of those |
|
||||||
# extensions by default, you can change `b.optional` to `b.use`. |
|
||||||
|
|
||||||
# Calculates maxlength from length validations for string inputs |
|
||||||
b.optional :maxlength |
|
||||||
|
|
||||||
# Calculates pattern from format validations for string inputs |
|
||||||
b.optional :pattern |
|
||||||
|
|
||||||
# Calculates min and max from length validations for numeric inputs |
|
||||||
b.optional :min_max |
|
||||||
|
|
||||||
# Calculates readonly automatically from readonly attributes |
|
||||||
b.optional :readonly |
|
||||||
|
|
||||||
## Inputs |
|
||||||
b.use :label_input |
|
||||||
b.use :hint, :wrap_with => { :tag => :span, :class => :hint } |
|
||||||
b.use :error, :wrap_with => { :tag => :span, :class => :error } |
|
||||||
end |
|
||||||
|
|
||||||
config.wrappers :bootstrap, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b| |
|
||||||
b.use :html5 |
|
||||||
b.use :placeholder |
|
||||||
b.use :label |
|
||||||
b.wrapper :tag => 'div', :class => 'controls' do |ba| |
|
||||||
ba.use :input |
|
||||||
ba.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' } |
|
||||||
ba.use :hint, :wrap_with => { :tag => 'p', :class => 'help-block' } |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
config.wrappers :prepend, :tag => 'div', :class => "control-group", :error_class => 'error' do |b| |
|
||||||
b.use :html5 |
|
||||||
b.use :placeholder |
|
||||||
b.use :label |
|
||||||
b.wrapper :tag => 'div', :class => 'controls' do |input| |
|
||||||
input.wrapper :tag => 'div', :class => 'input-prepend' do |prepend| |
|
||||||
prepend.use :input |
|
||||||
end |
|
||||||
input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' } |
|
||||||
input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' } |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
config.wrappers :append, :tag => 'div', :class => "control-group", :error_class => 'error' do |b| |
|
||||||
b.use :html5 |
|
||||||
b.use :placeholder |
|
||||||
b.use :label |
|
||||||
b.wrapper :tag => 'div', :class => 'controls' do |input| |
|
||||||
input.wrapper :tag => 'div', :class => 'input-append' do |append| |
|
||||||
append.use :input |
|
||||||
end |
|
||||||
input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' } |
|
||||||
input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' } |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit. |
|
||||||
# Check the Bootstrap docs (http://twitter.github.com/bootstrap) |
|
||||||
# to learn about the different styles for forms and inputs, |
|
||||||
# buttons and other elements. |
|
||||||
config.default_wrapper = :bootstrap |
|
||||||
|
|
||||||
# Define the way to render check boxes / radio buttons with labels. |
|
||||||
# Defaults to :nested for bootstrap config. |
|
||||||
# :inline => input + label |
|
||||||
# :nested => label > input |
|
||||||
config.boolean_style = :nested |
|
||||||
|
|
||||||
# Default class for buttons |
|
||||||
# config.button_class = 'btn' |
|
||||||
config.button_class = 'btn' |
|
||||||
|
|
||||||
# Method used to tidy up errors. Specify any Rails Array method. |
|
||||||
# :first lists the first message for each field. |
|
||||||
# Use :to_sentence to list all errors for each field. |
|
||||||
# config.error_method = :first |
|
||||||
|
|
||||||
# Default tag used for error notification helper. |
|
||||||
config.error_notification_tag = :div |
|
||||||
|
|
||||||
# CSS class to add for error notification helper. |
|
||||||
config.error_notification_class = 'alert alert-error' |
|
||||||
|
|
||||||
# ID to add for error notification helper. |
|
||||||
# config.error_notification_id = nil |
|
||||||
|
|
||||||
# Series of attempts to detect a default label method for collection. |
|
||||||
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ] |
|
||||||
|
|
||||||
# Series of attempts to detect a default value method for collection. |
|
||||||
# config.collection_value_methods = [ :id, :to_s ] |
|
||||||
|
|
||||||
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none. |
|
||||||
# config.collection_wrapper_tag = nil |
|
||||||
|
|
||||||
# You can define the class to use on all collection wrappers. Defaulting to none. |
|
||||||
# config.collection_wrapper_class = nil |
|
||||||
|
|
||||||
# You can wrap each item in a collection of radio/check boxes with a tag, |
|
||||||
# defaulting to :span. Please note that when using :boolean_style = :nested, |
|
||||||
# SimpleForm will force this option to be a label. |
|
||||||
# config.item_wrapper_tag = :span |
|
||||||
|
|
||||||
# You can define a class to use in all item wrappers. Defaulting to none. |
|
||||||
# config.item_wrapper_class = nil |
|
||||||
|
|
||||||
# How the label text should be generated altogether with the required text. |
|
||||||
# config.label_text = lambda { |label, required| "#{required} #{label}" } |
|
||||||
|
|
||||||
# You can define the class to use on all labels. Default is nil. |
|
||||||
config.label_class = 'control-label' |
|
||||||
|
|
||||||
# You can define the class to use on all forms. Default is simple_form. |
|
||||||
# config.form_class = :simple_form |
|
||||||
|
|
||||||
# You can define which elements should obtain additional classes |
|
||||||
# config.generate_additional_classes_for = [:wrapper, :label, :input] |
|
||||||
|
|
||||||
# Whether attributes are required by default (or not). Default is true. |
|
||||||
# config.required_by_default = true |
|
||||||
|
|
||||||
# Tell browsers whether to use default HTML5 validations (novalidate option). |
|
||||||
# Default is enabled. |
|
||||||
config.browser_validations = true |
|
||||||
|
|
||||||
# Collection of methods to detect if a file type was given. |
|
||||||
# config.file_methods = [ :mounted_as, :file?, :public_filename ] |
|
||||||
|
|
||||||
# Custom mappings for input types. This should be a hash containing a regexp |
|
||||||
# to match as key, and the input type that will be used when the field name |
|
||||||
# matches the regexp as value. |
|
||||||
# config.input_mappings = { /count/ => :integer } |
|
||||||
|
|
||||||
# Default priority for time_zone inputs. |
|
||||||
# config.time_zone_priority = nil |
|
||||||
|
|
||||||
# Default priority for country inputs. |
|
||||||
# config.country_priority = nil |
|
||||||
|
|
||||||
# Default size for text inputs. |
|
||||||
# config.default_input_size = 50 |
|
||||||
|
|
||||||
# When false, do not use translations for labels. |
|
||||||
# config.translate_labels = true |
|
||||||
|
|
||||||
# Automatically discover new inputs in Rails' autoload path. |
|
||||||
# config.inputs_discovery = true |
|
||||||
|
|
||||||
# Cache SimpleForm inputs discovery |
|
||||||
# config.cache_discovery = !Rails.env.development? |
|
||||||
end |
|
@ -0,0 +1,98 @@ |
|||||||
|
require 'simple_form/components/labeled_input' |
||||||
|
|
||||||
|
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class |
||||||
|
# https://github.com/plataformatec/simple_form/issues/316 |
||||||
|
|
||||||
|
inputs = %w[ |
||||||
|
CollectionSelectInput |
||||||
|
DateTimeInput |
||||||
|
FileInput |
||||||
|
GroupedCollectionSelectInput |
||||||
|
NumericInput |
||||||
|
PasswordInput |
||||||
|
RangeInput |
||||||
|
StringInput |
||||||
|
TextInput |
||||||
|
] |
||||||
|
|
||||||
|
inputs.each do |input_type| |
||||||
|
superclass = "SimpleForm::Inputs::#{input_type}".constantize |
||||||
|
|
||||||
|
new_class = Class.new(superclass) do |
||||||
|
def input_html_classes |
||||||
|
super.push('form-control') |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
Object.const_set(input_type, new_class) |
||||||
|
end |
||||||
|
|
||||||
|
# Use this setup block to configure all options available in SimpleForm. |
||||||
|
SimpleForm.setup do |config| |
||||||
|
config.boolean_style = :nested |
||||||
|
|
||||||
|
config.wrappers :bootstrap3, tag: 'div', class: 'form-group', error_class: 'has-error', |
||||||
|
defaults: { input_html: { class: 'default_class' } } do |b| |
||||||
|
|
||||||
|
b.use :html5 |
||||||
|
|
||||||
|
b.use :min_max |
||||||
|
b.use :maxlength |
||||||
|
b.use :placeholder |
||||||
|
b.optional :pattern |
||||||
|
b.optional :readonly |
||||||
|
|
||||||
|
b.use :label_input |
||||||
|
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } |
||||||
|
b.use :error, wrap_with: { tag: 'span', class: 'help-inline' } |
||||||
|
end |
||||||
|
|
||||||
|
config.wrappers :inlabel, tag: 'div', class: 'form-group', error_class: 'has-error', |
||||||
|
defaults: { input_html: { class: 'default_class' } } do |b| |
||||||
|
|
||||||
|
b.use :html5 |
||||||
|
|
||||||
|
b.use :min_max |
||||||
|
b.use :maxlength |
||||||
|
b.use :placeholder |
||||||
|
b.optional :pattern |
||||||
|
b.optional :readonly |
||||||
|
|
||||||
|
b.use :labeled_input |
||||||
|
b.use :input |
||||||
|
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } |
||||||
|
b.use :error, wrap_with: { tag: 'span', class: 'help-inline' } |
||||||
|
end |
||||||
|
|
||||||
|
config.wrappers :prepend, tag: 'div', class: "form-group", error_class: 'error' do |b| |
||||||
|
b.use :html5 |
||||||
|
b.use :placeholder |
||||||
|
b.use :label |
||||||
|
b.wrapper tag: 'div', class: 'controls' do |input| |
||||||
|
input.wrapper tag: 'div', class: 'input-prepend' do |prepend| |
||||||
|
prepend.use :input |
||||||
|
end |
||||||
|
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' } |
||||||
|
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' } |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
config.wrappers :append, tag: 'div', class: "control-group", error_class: 'error' do |b| |
||||||
|
b.use :html5 |
||||||
|
b.use :placeholder |
||||||
|
b.use :label |
||||||
|
b.wrapper tag: 'div', class: 'controls' do |input| |
||||||
|
input.wrapper tag: 'div', class: 'input-append' do |append| |
||||||
|
append.use :input |
||||||
|
end |
||||||
|
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' } |
||||||
|
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' } |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit. |
||||||
|
# Check the Bootstrap docs (http://getbootstrap.com/) |
||||||
|
# to learn about the different styles for forms and inputs, |
||||||
|
# buttons and other elements. |
||||||
|
config.default_wrapper = :bootstrap3 |
||||||
|
end |