diff --git a/Gemfile b/Gemfile index 9230e75..3130692 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' gem 'devise' -gem 'bootstrap-sass', '~> 3.2.0' +gem 'bootstrap-sass', '~> 3.3.6' #3.2.0 - old version gem 'autoprefixer-rails' gem "font-awesome-rails" @@ -13,6 +13,14 @@ gem 'acts-as-taggable-on', :git => 'https://github.com/mbleigh/acts-as-taggable- gem "mailboxer", github: 'mailboxer/mailboxer' gem 'figaro' +#Needed files for the prerelease of Active admin for Rails5 +gem 'inherited_resources', github: 'activeadmin/inherited_resources' +gem 'ransack', github: 'activerecord-hackery/ransack' +gem 'draper', '> 3.x' +gem 'activeadmin', '~> 1.0.0.pre4' +gem 'active_admin_theme' +gem 'responsive_active_admin' + gem 'chosen-rails' gem 'jquery-turbolinks' diff --git a/Gemfile.lock b/Gemfile.lock index 1d7631c..ef24915 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,29 @@ +GIT + remote: git://github.com/activeadmin/inherited_resources.git + revision: ba9467db4817944591df35dfe340f4c05a948033 + specs: + inherited_resources (1.6.0) + actionpack (>= 3.2, < 5.1) + has_scope (~> 0.6) + railties (>= 3.2, < 5.1) + responders + +GIT + remote: git://github.com/activerecord-hackery/ransack.git + revision: d02246aa240272bf68d5f5520e142da24327a4b1 + specs: + ransack (1.8.1) + actionpack (>= 3.0) + activerecord (>= 3.0) + activesupport (>= 3.0) + i18n + polyamorous (~> 1.3) + GIT remote: git://github.com/mailboxer/mailboxer.git - revision: 6798be07ece2258f227ac311f0198267af0bdcba + revision: 21637042628f4174d734d63401ed6e2fd1919cc2 specs: - mailboxer (0.13.0) + mailboxer (0.14.0) carrierwave (>= 0.5.8) rails (>= 4.2.0) @@ -39,11 +60,31 @@ GEM erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) + active_admin_theme (1.0.3) + activeadmin (1.0.0.pre4) + arbre (~> 1.0, >= 1.0.2) + bourbon + coffee-rails + formtastic (~> 3.1) + formtastic_i18n + inherited_resources (~> 1.6) + jquery-rails + jquery-ui-rails + kaminari (~> 0.15) + rails (>= 3.2, < 5.1) + ransack (~> 1.3) + sass-rails + sprockets (< 4) activejob (5.0.0) activesupport (= 5.0.0) globalid (>= 0.3.6) activemodel (5.0.0) activesupport (= 5.0.0) + activemodel-serializers-xml (1.0.1) + activemodel (> 5.x) + activerecord (> 5.x) + activesupport (> 5.x) + builder (~> 3.1) activerecord (5.0.0) activemodel (= 5.0.0) activesupport (= 5.0.0) @@ -53,14 +94,20 @@ GEM i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) - arel (7.1.0) + arbre (1.1.1) + activesupport (>= 3.0.0) + arel (7.1.1) autoprefixer-rails (6.3.7) execjs bcrypt (3.1.11) - bootstrap-sass (3.2.0.2) - sass (~> 3.2) + bootstrap-sass (3.3.7) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) bootstrap-will_paginate (0.0.10) will_paginate + bourbon (4.2.7) + sass (~> 3.4) + thor (~> 0.19) builder (3.2.2) byebug (9.0.5) callsite (0.0.11) @@ -93,6 +140,12 @@ GEM railties (>= 4.1.0, < 5.1) responders warden (~> 1.2.3) + draper (3.0.0.pre1) + actionpack (~> 5.0) + activemodel (~> 5.0) + activemodel-serializers-xml (~> 1.0) + activesupport (~> 5.0) + request_store (~> 1.0) erubis (2.7.0) execjs (2.7.0) ffi (1.9.14) @@ -100,10 +153,16 @@ GEM thor (~> 0.14) font-awesome-rails (4.6.3.1) railties (>= 3.2, < 5.1) - globalid (0.3.6) + formtastic (3.1.4) + actionpack (>= 3.2.13) + formtastic_i18n (0.6.0) + globalid (0.3.7) activesupport (>= 4.1.0) + has_scope (0.7.0) + actionpack (>= 4.1, < 5.1) + activesupport (>= 4.1, < 5.1) i18n (0.7.0) - jbuilder (2.5.0) + jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) jquery-rails (4.1.1) @@ -113,7 +172,12 @@ GEM jquery-turbolinks (2.1.0) railties (>= 3.1.0) turbolinks + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) json (2.0.2) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) @@ -147,7 +211,9 @@ GEM mime-types mimemagic (~> 0.3.0) pkg-config (1.1.7) - puma (3.5.0) + polyamorous (1.3.1) + activerecord (>= 3.0) + puma (3.6.0) rack (2.0.1) rack-contrib (1.2.0) rack (>= 0.9.1) @@ -180,10 +246,13 @@ GEM rb-fsevent (0.9.7) rb-inotify (0.9.7) ffi (>= 0.5.0) + request_store (1.3.1) responders (2.2.0) railties (>= 4.2.0, < 5.1) + responsive_active_admin (0.0.5) + activeadmin sass (3.4.22) - sass-rails (5.0.5) + sass-rails (5.0.6) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) @@ -193,7 +262,7 @@ GEM spring-watcher-listen (2.0.0) listen (>= 2.7, < 4.0) spring (~> 1.2) - sprockets (3.6.3) + sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) @@ -204,12 +273,12 @@ GEM thor (0.19.1) thread_safe (0.3.5) tilt (2.0.5) - turbolinks (5.0.0) + turbolinks (5.0.1) turbolinks-source (~> 5) turbolinks-source (5.0.0) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (3.0.0) + uglifier (3.0.1) execjs (>= 0.3.0, < 3) warden (1.2.6) rack (>= 1.0) @@ -227,16 +296,20 @@ PLATFORMS ruby DEPENDENCIES + active_admin_theme + activeadmin (~> 1.0.0.pre4) acts-as-taggable-on! autoprefixer-rails - bootstrap-sass (~> 3.2.0) + bootstrap-sass (~> 3.3.6) bootstrap-will_paginate byebug chosen-rails coffee-rails (~> 4.2) devise + draper (> 3.x) figaro font-awesome-rails + inherited_resources! jbuilder (~> 2.5) jquery-rails jquery-turbolinks @@ -247,6 +320,8 @@ DEPENDENCIES paperclip (~> 5.0.0) puma (~> 3.0) rails (~> 5.0.0) + ransack! + responsive_active_admin sass-rails (~> 5.0) spring spring-watcher-listen (~> 2.0.0) diff --git a/app/admin/admin_user.rb b/app/admin/admin_user.rb new file mode 100644 index 0000000..433be5d --- /dev/null +++ b/app/admin/admin_user.rb @@ -0,0 +1,28 @@ +ActiveAdmin.register AdminUser do + permit_params :email, :password, :password_confirmation + + index do + selectable_column + id_column + column :email + column :current_sign_in_at + column :sign_in_count + column :created_at + actions + end + + filter :email + filter :current_sign_in_at + filter :sign_in_count + filter :created_at + + form do |f| + f.inputs "Admin Details" do + f.input :email + f.input :password + f.input :password_confirmation + end + f.actions + end + +end diff --git a/app/admin/dashboard.rb b/app/admin/dashboard.rb new file mode 100644 index 0000000..a52225f --- /dev/null +++ b/app/admin/dashboard.rb @@ -0,0 +1,37 @@ +ActiveAdmin.register_page "Dashboard" do + + menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") } + + content title: proc{ I18n.t("active_admin.dashboard") } do + div class: "blank_slate_container", id: "dashboard_default_message" do + # span class: "blank_slate" do + # span I18n.t("active_admin.dashboard_welcome.welcome") + # small I18n.t("active_admin.dashboard_welcome.call_to_action") + # end + end + + # Here is an example of a simple dashboard with columns and panels. + + columns do + column do + panel "Recent Users" do + ul do + table_for User.order("created_at desc").limit(5) do + column :name do |user| + link_to user.name, admin_panel_user_path(user) + end + column :created_at + end + strong { link_to "View All Users", admin_panel_users_path } + end + end + end + + column do + panel "Info" do + para "Welcome to ActiveAdmin." + end + end + end + end +end diff --git a/app/admin/speaker.rb b/app/admin/speaker.rb new file mode 100644 index 0000000..0c239a7 --- /dev/null +++ b/app/admin/speaker.rb @@ -0,0 +1,24 @@ +ActiveAdmin.register Speaker do + index do + column :name + column :email + column :twitter + column :linkedin + column :github + actions + end +# See permitted parameters documentation: +# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters +# +# permit_params :list, :of, :attributes, :on, :model +# +# or +# +# permit_params do +# permitted = [:permitted, :attributes] +# permitted << :other if params[:action] == 'create' && current_user.admin? +# permitted +# end + + +end diff --git a/app/admin/user.rb b/app/admin/user.rb new file mode 100644 index 0000000..f9cd50c --- /dev/null +++ b/app/admin/user.rb @@ -0,0 +1,37 @@ +ActiveAdmin.register User do + # index do + # column :name + # column :email + # column :summary + # column :twitter + # column :linkedin + # column :github + # end +# See permitted parameters documentation: +# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters +# +# permit_params :list, :of, :attributes, :on, :model +# +# or +# +# permit_params do +# permitted = [:permitted, :attributes] +# permitted << :other if params[:action] == 'create' && current_user.admin? +# permitted +# end +permit_params [:email, :password, :password_confirmation, :type] + + form do |f| + f.inputs "User" do + f.input :email + f.input :password + f.input :password_confirmation + f.radio_button("type", "Speaker") + f.label :type, ' Speaker ' + f.radio_button("type", "Attendee") + f.label :type, ' Attendee' + end + f.actions + end + +end diff --git a/app/assets/javascripts/active_admin.js.coffee b/app/assets/javascripts/active_admin.js.coffee new file mode 100644 index 0000000..3752dce --- /dev/null +++ b/app/assets/javascripts/active_admin.js.coffee @@ -0,0 +1 @@ +#= require active_admin/base diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index a1d1bdd..620ce9c 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -23,6 +23,7 @@ //= require bootstrap-sprockets //= require jquery.touchSwipe + //= require_tree . $(document).ready(function(){ @@ -54,23 +55,6 @@ $(document).ready(function(){ } }); -// style material form - var materialForm; - materialForm = function () { - return $('input').focus(function () { - return $(this).closest('.field').addClass('focused has-value'); - }).focusout(function () { - return $(this).closest('.field').removeClass('focused'); - }).blur(function () { - if (!this.value) { - $(this).closest('.field').removeClass('has-value'); - } - return $(this).closest('.field').removeClass('focused'); - }); - }; - $(function () { - return materialForm(); - }); //call side nav $(".button-collapse").sideNav(); diff --git a/app/assets/stylesheets/active_admin.scss b/app/assets/stylesheets/active_admin.scss new file mode 100644 index 0000000..06ff6f4 --- /dev/null +++ b/app/assets/stylesheets/active_admin.scss @@ -0,0 +1,50 @@ +// SASS variable overrides must be declared before loading up Active Admin's styles. +// +// To view the variables that Active Admin provides, take a look at +// `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the +// Active Admin source. +// +// For example, to change the sidebar width: +// $sidebar-width: 242px; + +// Active Admin's got SASS! +@import "active_admin/mixins"; +@import "active_admin/base"; +@import "active_admin_theme"; +@import "responsive_active_admin"; + +form fieldset > ol > li.date_select fieldset ol li, form fieldset > ol > li.time_select fieldset ol li, form fieldset > ol > li.datetime_select fieldset ol li { + float: left; + width: 100%!important; + margin: 0 0.5em 0 0; +} + +form fieldset > ol > li fieldset ol li select{ + margin-top: 6px; + width: 100%; +} + +form fieldset > ol > li fieldset:not(.has_many_fields) ol { + width: 20%; + @media(max-width:684px){ + width: 80%; + } + @media(max-width:480px){ + width:100%; + } +} + +#wrapper #header ul.tabs > li.current > a, #wrapper #header ul.tabs > li:hover > a, #wrapper #header ul.tabs > li > a{ + display:block; +} + +.sidebar_section select { + width: 100%; + padding: 10px; +} + + +// Overriding any non-variable SASS must be done after the fact. +// For example, to change the default status-tag color: +// +// .status_tag { background: #6090DB; } diff --git a/app/assets/stylesheets/active_admin_theme.scss b/app/assets/stylesheets/active_admin_theme.scss new file mode 100644 index 0000000..3ec0caa --- /dev/null +++ b/app/assets/stylesheets/active_admin_theme.scss @@ -0,0 +1,796 @@ +//VAR-----------------------------------------------------------------------------------------------------------------// +$white: rgba(255, 255, 255, 1); +$purple: rgba(72, 60, 107, 1); +$turqoise: rgba(78, 255, 239, 1); +$purple-light: rgba(190, 151, 198, 1); +$blue: rgba(1, 25, 54, 1); +$green: rgba(4, 167, 119, 1); +$dark-grey: #666; +$light-grey: #9e9e9e; +$black: #101010; + + +$skinMainFirstColor: $purple!default; +$skinMainSecondColor: $turqoise!default; +$skinBorderRadius: 4px!default; +$skinBorderWindowColor: #e6e9ee!default; +$skinTablePadding: 10px!default; +//HTML----------------------------------------------------------------------------------------------------------------// + +@mixin rounded($amount) { + -moz-border-radius: $amount; + -webkit-border-radius: $amount; + border-radius: $amount; +} + +a, a:link, a:visited { + color: $skinMainFirstColor; + text-decoration: none; +} + +html { + background: #f7f9fb; +} +body.active_admin { + background: #f7f9fb; +} +#wrapper { + div.tabs { + > ul > li > a { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + margin-bottom: 11px; + border: none; + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + margin-right: 5px; + padding: 10px 20px; + + -webkit-border-top-left-radius: $skinBorderRadius; + -webkit-border-top-right-radius: $skinBorderRadius; + -moz-border-radius-topleft: $skinBorderRadius; + -moz-border-radius-topright: $skinBorderRadius; + border-top-left-radius: $skinBorderRadius; + border-top-right-radius: $skinBorderRadius; + + -webkit-border-bottom-left-radius: 0px; + -moz-border-radius-bottomleft: 0px; + border-bottom-left-radius: 0px; + + -webkit-border-bottom-right-radius: 0px; + -moz-border-radius-bottomright: 0px; + border-bottom-right-radius: 0px; + } + ul > li.ui-state-active > a { + background-color: #ffffff; + border: 1px solid $skinBorderWindowColor; + border-bottom: 0px; + color: $skinMainSecondColor; + } + div.tab-content { + background-color: #ffffff; + border: 1px solid $skinBorderWindowColor; + border-bottom: 2px solid $skinBorderWindowColor; + @include rounded($skinBorderRadius); + } + } + #header { + background-color: $skinMainFirstColor; + border-bottom: 1px solid lighten( $skinMainFirstColor, 15% )!important; + padding-bottom: 9px; + border: none; + text-shadow: none; + background-image: none; + h1.site_title { + color: $skinMainSecondColor; + font-size: 16px; + } + a, a:link { + color: #ffffff; + } + ul.tabs > li > a { + color: #ffffff; + @include rounded($skinBorderRadius); + padding: 6px 10px 6px 10px; + } + ul.tabs > li.current > a, ul.tabs > li:hover > a { + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + } + ul.tabs { + li.has_nested { + a { + padding-right: 20px; + } + ul { + background-color: $skinMainSecondColor; + @include rounded($skinBorderRadius); + li > a { + padding-left: 15px; + } + li.current > a::before, li:hover > a::before { + content: ''; + display: block; + width: 7px; + height: 4px; + position: absolute; + top: 12px; + left: 4px; + background: transparent image-url('active_admin/nested_menu_arrow_dark.gif') no-repeat 0 0; + transform: rotate(-90deg); + } + } + } + li.has_nested:hover { + a { + border-bottom: 7px solid $skinMainSecondColor; + } + } + } + } + #title_bar { + background-image: none; + border: none; + box-shadow: none; + background-color: lighten( $skinMainFirstColor, 8% ); + border: none; + border-bottom: 3px solid $skinMainSecondColor; + #titlebar_left { + span.breadcrumb { + font-size: 12px; + text-shadow: none; + margin-bottom: 8px; + a, span { + color: lighten( $skinMainFirstColor, 30% )!important; ; + } + } + h2 { + color: #ffffff; + text-shadow: none; + } + } + #titlebar_right { + .action_item a { + background-image: none; + border: none; + box-shadow: none; + text-shadow: none; + @include rounded($skinBorderRadius); + background-color: $skinMainSecondColor; + border: none; + color: $skinMainFirstColor; + font-weight: 600; + &:hover { + background-color: lighten( $skinMainSecondColor, 5% )!important; + } + } + div.dropdown_menu { + div.dropdown_menu_list_wrapper { + background-color: $skinMainFirstColor; + border: none; + background-image: none; + border: none; + box-shadow: none; + div.dropdown_menu_nipple, div.dropdown_menu_nipple:after, div.dropdown_menu_nipple:before { + border-color: $skinMainFirstColor transparent; + } + ul.dropdown_menu_list { + box-shadow:none; + li { + a { + background-color: #ffffff; + color: $skinMainFirstColor; + border-radius: 0px; + &:hover { + background-color: $skinMainSecondColor; + color: #ffffff; + } + } + } + } + } + } + div.batch_actions_selector { + a { + background-image: none; + border: none; + box-shadow: none; + background-color: $skinMainSecondColor; + @include rounded($skinBorderRadius); + border: none; + padding: 10px 20px; + color: $skinMainFirstColor; + &:hover { + background-color: lighten( $skinMainSecondColor, 5% ); + } + } + } + } + } + .flashes { + .flash { + color: #ffffff; + background-image: none; + text-shadow: none; + } + + .flash_notice { + background-color: aquamarine; + color:$skinMainFirstColor; + // border-bottom: 2px solid #4C7331; + } + .flash_warning { + background-color: #BDBC45; + // border-bottom: 2px solid #8B8A3D; + } + .flash_error { + background-color: #CD3333; + // border-bottom: 2px solid #962F2F; + } + } + #active_admin_content { + span.blank_slate { + border: 2px solid lighten( $skinMainSecondColor, 30% ); + color: #8494a8; + @include rounded($skinBorderRadius); + } + div.table_tools { + margin-bottom: 35px; + div.dropdown_menu { + div.dropdown_menu_list_wrapper { + background-color: $skinMainFirstColor; + border: none; + background-image: none; + border: none; + box-shadow: none; + div.dropdown_menu_nipple, div.dropdown_menu_nipple:after, div.dropdown_menu_nipple:before { + border-color: $skinMainFirstColor transparent; + } + ul.dropdown_menu_list { + box-shadow:none; + li { + a { + background-color: #ffffff; + color: $skinMainFirstColor; + border-radius: 0px; + &:hover { + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + } + } + } + } + } + } + div.batch_actions_selector { + a { + background-image: none; + border: none; + box-shadow: none; + background-color: $skinMainSecondColor; + @include rounded($skinBorderRadius); + border: none; + padding: 10px 20px; + color: $skinMainFirstColor; + &:hover { + background-color: lighten( $skinMainSecondColor, 5% ); + } + } + } + div.dropdown_menu { + div.dropdown_menu_list_wrapper { + background-color: $skinMainFirstColor; + border: none; + background-image: none; + div.dropdown_menu_nipple, div.dropdown_menu_nipple:after, div.dropdown_menu_nipple:before { + border-color: $skinMainFirstColor transparent; + } + ul.dropdown_menu_list { + box-shadow:none; + li { + a { + background-color: #ffffff; + box-shadow: none; + color: $skinMainFirstColor; + border-radius: 0px; + text-shadow: none; + &:hover { + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + } + } + } + } + } + } + div.batch_actions_selector { + a { + background-image: none; + background-color: $skinMainSecondColor; + @include rounded($skinBorderRadius); + border: none; + padding: 10px 20px; + color: $skinMainFirstColor; + text-shadow: none; + box-shadow: none; + &:hover { + background-color: lighten( $skinMainSecondColor, 5% ); + box-shadow: none; + } + } + } + ul.scopes { + li { + a { + background-image: none; + border: none; + box-shadow: none; + background-color: $skinMainSecondColor; + padding: 10px 20px; + color: $skinMainFirstColor; + text-shadow: none; + border-right: 1px solid #ffffff; + span { + color: $skinMainFirstColor; + font-size: 11px; + font-weight: bold; + } + } + } + li:first-child { + a { + -webkit-border-top-left-radius: $skinBorderRadius; + -webkit-border-bottom-left-radius: $skinBorderRadius; + -moz-border-radius-topleft: $skinBorderRadius; + -moz-border-radius-bottomleft: $skinBorderRadius; + border-top-left-radius: $skinBorderRadius; + border-bottom-left-radius: $skinBorderRadius; + } + } + li:last-child { + a { + -webkit-border-top-right-radius: $skinBorderRadius; + -webkit-border-bottom-right-radius: $skinBorderRadius; + -moz-border-radius-topright: $skinBorderRadius; + -moz-border-radius-bottomright: $skinBorderRadius; + border-top-right-radius: $skinBorderRadius; + border-bottom-right-radius: $skinBorderRadius; + } + } + li.selected { + a { + background-color: lighten( $skinMainSecondColor, 15% ); + } + } + } + } + } + table.index_table { + background-color: #ffffff; + border: 1px solid $skinBorderWindowColor; + border-bottom: 2px solid $skinBorderWindowColor; + @include rounded($skinBorderRadius); + th { + background-image: none; + border: none; + box-shadow: none; + text-shadow: none; + font-size: 1.0em; + font-weight: bold; + background-color: $skinBorderWindowColor; + padding: $skinTablePadding 12px $skinTablePadding 12px; + border-bottom: 3px solid darken( $skinBorderWindowColor, 5% ); + border-right: 1px solid darken( $skinBorderWindowColor, 5% ); + a { + font-size: 1.0em; + font-weight: bold!important; + } + } + th.col-selectable { + width: 12px; + } + th.sorted-desc { + background-color: $skinBorderWindowColor; + } + td { + padding: $skinTablePadding 12px $skinTablePadding 12px; + } + } + .sidebar_section.panel { + background-image: none; + box-shadow: none; + background-color: #ffffff; + border: 1px solid $skinBorderWindowColor; + border-bottom: 2px solid $skinBorderWindowColor; + & > h3 { + background-image: none; + box-shadow: none; + text-shadow: none; + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + border: none; + padding: 8px 15px; + font-weight: 400; + + -webkit-border-top-left-radius: $skinBorderRadius; + -webkit-border-top-right-radius: $skinBorderRadius; + -moz-border-radius-topleft: $skinBorderRadius; + -moz-border-radius-topright: $skinBorderRadius; + border-top-left-radius: $skinBorderRadius; + border-top-right-radius: $skinBorderRadius; + } + .filter_form_field { + label { + color: #8494a8; + } + input { + border: 1px solid #e6e9ee; + background-color: #fdfefe; + } + input:focus { + border-color: lighten( $skinMainSecondColor, 20% ) ; + box-shadow: none; + } + } + } +} +form fieldset > ol > li fieldset.fragments ol { + // margin-left: 20%; +} +form fieldset ol > li.has_many_container h3 { + color: #8494a8; +} +form input[type=submit], a.button, a:link.button, a:visited.button, fieldset.actions > ol > li.button_action > button { + background-image: none; + box-shadow: none; + text-shadow: none; + background-color: $skinMainSecondColor; + @include rounded($skinBorderRadius); + border: none; + padding: 10px 20px; + color: $skinMainFirstColor; + &:hover { + background-image: none!important; + background-color: lighten( $skinMainSecondColor, 5% )!important; + } +} +form fieldset.buttons li.cancel a, form fieldset.actions li.cancel a, form.filter_form a.clear_filters_btn { + background-image: none; + box-shadow: none; + text-shadow: none; + background-color: #ffffff; + @include rounded($skinBorderRadius); + padding: 10px 20px; + border-color: #E4E4E4; + &:hover { + background-image: none!important; + background-color: #F4F4F4!important; + } +} +form fieldset.inputs { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: #ffffff; + border: 1px solid #e6e9ee; + border-bottom: 2px solid #e6e9ee; + legend { + span { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + border: none; + padding: 8px 15px; + font-weight: 400; + + -webkit-border-top-left-radius: $skinBorderRadius; + -webkit-border-top-right-radius: $skinBorderRadius; + -moz-border-radius-topleft: $skinBorderRadius; + -moz-border-radius-topright: $skinBorderRadius; + border-top-left-radius: $skinBorderRadius; + border-top-right-radius: $skinBorderRadius; + } + } + ol > li { + label { + color: #8494a8; + } + input, textarea { + border: 1px solid #e6e9ee; + background-color: #fdfefe; + } + input:focus, textarea:focus { + border-color: lighten( $skinMainSecondColor, 20% ) ; + box-shadow: none; + } + } +} +#ui-datepicker-div { + background: none; + background-color: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + div.ui-datepicker-header { + background-image: none; + background-color: $skinMainSecondColor; + border-bottom:none; + div.ui-datepicker-title { + span { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + } + } + } + div.ui-datepicker-header:before { + border-bottom: 10px solid $skinMainSecondColor; + } + table.ui-datepicker-calendar { + background-color: #ffffff; + border-color: $skinMainSecondColor; + thead { + tr { + th { + background-color:lighten( $skinMainSecondColor, 20% ); + } + } + } + tbody { + tr { + td { + a:hover { + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + } + } + td.ui-datepicker-today > a { + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + } + } + } + } +} +.panel { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: #ffffff; + border: 1px solid $skinBorderWindowColor; + border-bottom: 2px solid $skinBorderWindowColor; + > h3 { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + border: none; + padding: 8px 15px; + font-weight: 400; + + -webkit-border-top-left-radius: $skinBorderRadius; + -webkit-border-top-right-radius: $skinBorderRadius; + -moz-border-radius-topleft: $skinBorderRadius; + -moz-border-radius-topright: $skinBorderRadius; + border-top-left-radius: $skinBorderRadius; + border-top-right-radius: $skinBorderRadius; + } + .panel_contents { + font-weight: 400; + } +} +.attributes_table table th, .attributes_table table td { + padding: 10px 0; +} +.attributes_table table th { + color: #8494a8; +} +.comments form.active_admin_comment fieldset.inputs { + border: none +} +.pagination { + span > a { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + border: none; + background-color: $skinBorderWindowColor; + @include rounded($skinBorderRadius); + padding: 5px 10px; + &:hover { + background-image: none!important; + background-color: $skinMainSecondColor!important; + color: $skinMainFirstColor; + } + } + span.page.current { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: $skinMainSecondColor; + border: none; + padding: 5px 10px; + @include rounded($skinBorderRadius); + cursor: pointer; + &:hover { + background-image: none!important; + background-color: $skinMainSecondColor!important; + } + } +} +body.logged_out #content_wrapper #active_admin_content { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + @include rounded($skinBorderRadius); + + background-color: #ffffff; + border: 1px solid $skinBorderWindowColor; + border-bottom: 2px solid $skinBorderWindowColor; + #login { + h2 { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + border: none; + padding: 8px 15px; + font-weight: 400; + + -webkit-border-top-left-radius: $skinBorderRadius; + -webkit-border-top-right-radius: $skinBorderRadius; + -moz-border-radius-topleft: $skinBorderRadius; + -moz-border-radius-topright: $skinBorderRadius; + border-top-left-radius: $skinBorderRadius; + border-top-right-radius: $skinBorderRadius; + + } + form { + fieldset { + border: none; + ol { + li { + label { + color: #8494a8; + } + } + } + } + } + } +} +form input[type=text], form input[type=password], form input[type=email], form input[type=number], form input[type=url], form input[type=tel], form textarea { + border: 1px solid #e6e9ee; + background-color: #fdfefe; +} +form fieldset > ol > li fieldset ol li { + clear: both; + select { + margin-top: 6px + } +} +.ui-dialog { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: #ffffff; + border-bottom: 2px solid $skinBorderWindowColor; + .ui-dialog-titlebar { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: $skinMainSecondColor; + color: $skinMainFirstColor; + border: none; + padding: 8px 15px; + font-weight: 400; + + -webkit-border-top-left-radius: $skinBorderRadius; + -webkit-border-top-right-radius: $skinBorderRadius; + -moz-border-radius-topleft: $skinBorderRadius; + -moz-border-radius-topright: $skinBorderRadius; + border-top-left-radius: $skinBorderRadius; + border-top-right-radius: $skinBorderRadius; + } + form { + ul { + li { + label { + display: block; + margin-bottom: 5px; + } + input[type="text"], input[type="datepicker"], textarea { + padding: 8px 10px 7px; + border: 1px solid #e6e9ee; + background-color: #fdfefe; + outline: none; + @include rounded($skinBorderRadius); + width: 247px; + &:focus { + border-color: lighten( $skinMainSecondColor, 20% ) ; + box-shadow: none; + } + } + } + } + } + .ui-dialog-buttonpane { + .ui-dialog-buttonset { + button:first-child { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + @include rounded($skinBorderRadius); + background-color: $skinMainSecondColor; + border: none; + color: $skinMainFirstColor; + font-weight: 400; + padding: 10px 20px; + &:hover { + background-image: none!important; + background-color: lighten( $skinMainSecondColor, 5% )!important; + } + } + button:last-child { + background-image: none; + box-shadow: none; + text-shadow: none; + box-shadow: none; + background-color: #ffffff; + @include rounded($skinBorderRadius); + padding: 10px 20px; + border-color: #E4E4E4; + &:hover { + background-image: none!important; + background-color: #F4F4F4!important; + } + } + } + } +} +.ui-widget-overlay { + background: rgba(0, 0, 0, 0.7); +} + +//becouse of sidebar border 2px +form.filter_form .filter_form_field.filter_date_range .seperator { + width: 10px; +} + +//filter select box border radius +.filter_form_field select{ + border-radius: 3px; +} + +//radio button color change +input[type='radio'] { + &:before { + content:''; + display:block; + width:50%; + height:50%; + margin: 20% auto; + border-radius:50%; + } + &:checked:before{ + background: $skinMainSecondColor; + } +} diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 18053fc..a622daa 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -19,11 +19,10 @@ @import "font-awesome"; @import "chosen"; - // GENERAL // $white: rgba(255, 255, 255, 1); -$purple: #483C6B; +$purple: rgba(72, 60, 107, 1); $turqoise: rgba(78, 255, 239, 1); $purple-light: rgba(190, 151, 198, 1); $blue: rgba(1, 25, 54, 1); diff --git a/vendor/assets/stylesheets/bootstrap.css b/app/assets/stylesheets/bootstrap.css similarity index 100% rename from vendor/assets/stylesheets/bootstrap.css rename to app/assets/stylesheets/bootstrap.css diff --git a/vendor/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss similarity index 100% rename from vendor/assets/stylesheets/icons.scss rename to app/assets/stylesheets/icons.scss diff --git a/vendor/assets/stylesheets/materialize.scss b/app/assets/stylesheets/materialize.scss similarity index 100% rename from vendor/assets/stylesheets/materialize.scss rename to app/assets/stylesheets/materialize.scss diff --git a/vendor/assets/stylesheets/normalize.scss b/app/assets/stylesheets/normalize.scss similarity index 100% rename from vendor/assets/stylesheets/normalize.scss rename to app/assets/stylesheets/normalize.scss diff --git a/app/assets/stylesheets/responsive_active_admin.scss b/app/assets/stylesheets/responsive_active_admin.scss new file mode 100644 index 0000000..5946945 --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin.scss @@ -0,0 +1,11 @@ +@import "responsive_active_admin/responsive"; +@import "responsive_active_admin/blank_slates"; +@import "responsive_active_admin/columns"; +@import "responsive_active_admin/footer"; +@import "responsive_active_admin/forms"; +@import "responsive_active_admin/header"; +@import "responsive_active_admin/main_structure"; +@import "responsive_active_admin/pagination"; +@import "responsive_active_admin/tables"; +@import "responsive_active_admin/title_bar"; +@import "responsive_active_admin/logged_out"; diff --git a/app/assets/stylesheets/responsive_active_admin/_blank_slates.scss b/app/assets/stylesheets/responsive_active_admin/_blank_slates.scss new file mode 100644 index 0000000..f7bbfca --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_blank_slates.scss @@ -0,0 +1,5 @@ +.with_sidebar .blank_slate_container .blank_slate { + @include responsive { + margin-top: 20px; + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_columns.scss b/app/assets/stylesheets/responsive_active_admin/_columns.scss new file mode 100644 index 0000000..1ebf6dd --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_columns.scss @@ -0,0 +1,7 @@ +@include responsive { + .column { + float: none; + // Since columns are sized on the element, we have to be forceful. + width: 100% !important; + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_footer.scss b/app/assets/stylesheets/responsive_active_admin/_footer.scss new file mode 100644 index 0000000..3c3adf2 --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_footer.scss @@ -0,0 +1,6 @@ +// Index Footer (Under Table) +#index_footer { + @include responsive { + text-align: left; + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_forms.scss b/app/assets/stylesheets/responsive_active_admin/_forms.scss new file mode 100644 index 0000000..c68249a --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_forms.scss @@ -0,0 +1,55 @@ +form { + fieldset { + ol > li { + label { + @include responsive { + width: 100%; + } + } + } + } + + /* Nested Fieldsets and Legends */ + fieldset > ol > li { + fieldset { + legend { + @include responsive { + position: static; + width: 100%; + } + + &.label label { + @include responsive { + position: static; + float: none; + } + } + } + + &:not(.has_many_fields) ol { + @include responsive { + padding-left: 0; + } + } + } + + p.inline-hints { + @include responsive { + margin-left: 0; + } + } + } + + /* Text Fields */ + input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], input[type=tel], textarea { + @include responsive { + width: calc(100% - #{$text-input-total-padding}); + } + } + + select { + @include responsive { + width: 100%; + } + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_header.scss b/app/assets/stylesheets/responsive_active_admin/_header.scss new file mode 100644 index 0000000..98dbb49 --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_header.scss @@ -0,0 +1,47 @@ +#header { + @include responsive { + box-sizing: border-box; + + display: block; + height: auto; + + padding: 10px 22px; + } + + h1 { + @include responsive { + padding-left: 10px; + } + } + + ul.tabs { + @include responsive { + display: block; + } + + & > li { + @include responsive { + display: block; + } + } + } + + #utility_nav { + @include responsive { + display: block; + + margin-top: 5px; + padding-top: 5px; + + border-top: #444 1px solid; + + text-align: left; + } + + li { + @include responsive { + display: block; + } + } + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_logged_out.scss b/app/assets/stylesheets/responsive_active_admin/_logged_out.scss new file mode 100644 index 0000000..79b3b38 --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_logged_out.scss @@ -0,0 +1,39 @@ +body.logged_out { + #content_wrapper{ + @include responsive { + width: auto; + margin: 0; + } + } + + h2 { + @include section-header; + @include primary-gradient; + @include text-shadow(#000); + box-shadow: 0 1px 3px rgba(0,0,0,0.3); + border: none; + color: #fff; + margin: -13px -30px 20px -30px; + } + + #login { + /* Login Form */ + form { + fieldset { + @include no-shadow; + background: none; + padding: 0; + li { padding: 10px 0; } + + input[type=text], input[type=email], input[type=password] { + width: 70%; + } + &.buttons { margin-left: 20%; } + margin-bottom: 0; + } + } + + a { float: right; margin-top: -32px; } + } + +} diff --git a/app/assets/stylesheets/responsive_active_admin/_main_structure.scss b/app/assets/stylesheets/responsive_active_admin/_main_structure.scss new file mode 100644 index 0000000..8985c93 --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_main_structure.scss @@ -0,0 +1,27 @@ +.index #wrapper { + @include responsive { + display: block; + } +} + +#active_admin_content { + #main_content_wrapper { + @include responsive { + float: none; + + #main_content { + margin-right: inherit; + } + } + } + + #sidebar { + @include responsive { + float: none; + width: 100%; + + margin-top: 20px; + margin-left: inherit; + } + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_pagination.scss b/app/assets/stylesheets/responsive_active_admin/_pagination.scss new file mode 100644 index 0000000..0126806 --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_pagination.scss @@ -0,0 +1,11 @@ +.pagination_information { + @include responsive { + float: none; + } +} + +.download_links { + @include responsive { + float: none; + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_responsive.scss b/app/assets/stylesheets/responsive_active_admin/_responsive.scss new file mode 100644 index 0000000..7ca7a8a --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_responsive.scss @@ -0,0 +1,9 @@ +$active-admin-responsive: true !default; +$active-admin-responsive-width: 480px !default; +$active-admin-flip-table: true !default; + +@mixin responsive { + @media only screen and (max-width: $active-admin-responsive-width) { + @content; + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_tables.scss b/app/assets/stylesheets/responsive_active_admin/_tables.scss new file mode 100644 index 0000000..f52924f --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_tables.scss @@ -0,0 +1,74 @@ +// Index Tables +table.index_table { + @if $active-admin-flip-table { + // Based around: http://elvery.net/demo/responsive-tables/#flip-scroll + @include responsive { + display: block; + position: relative; + + th, td { + margin: 0; + vertical-align: top; + + border-left: 0; + border-top: solid 1px #e6e6e6; + + height: 1.5em; + padding: 5px 10px 3px 10px; + } + + th { + display: block; + text-align: right; + + & > * { + text-overflow: ellipsis; + overflow: hidden; + } + } + + td { + display: block; + + text-align: left; + border-right: 0; + } + + thead { + display: block; + float: left; + + max-width: 40%; + + tr { + display: block; + } + } + + tbody { + display: block; + + width: auto; + position: relative; + + overflow-x: auto; + overflow-y: hidden; + + white-space: nowrap; + + font-size: 0; /* remove space between rows */ + + tr { + font-size: 11.5px; + + display: inline-block; + vertical-align: top; + } + } + + th:last-child, td:last-child { + border-bottom: 1px solid #d4d4d4; + } + } + } +} diff --git a/app/assets/stylesheets/responsive_active_admin/_title_bar.scss b/app/assets/stylesheets/responsive_active_admin/_title_bar.scss new file mode 100644 index 0000000..bebacd6 --- /dev/null +++ b/app/assets/stylesheets/responsive_active_admin/_title_bar.scss @@ -0,0 +1,15 @@ +#title_bar { + #titlebar_left, #titlebar_right, #page_title { + @include responsive { + height: auto; + display: block; + } + } + + #titlebar_right { + @include responsive { + text-align: left; + margin-top: 10px; + } + } +} diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index f58adeb..0629a1d 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -26,7 +26,7 @@ def update private def sign_up_params - params.require(:user).permit(:avatar, :name, :email, :password, :password_confirmation, :type, :summary, :twitter, :linkedin, :github) + params.require(:user).permit(:name, :email, :password, :password_confirmation, :type) end def update_resource(resource, params) resource.update_without_password(params) diff --git a/app/models/admin.rb b/app/models/admin.rb new file mode 100644 index 0000000..6f8a91f --- /dev/null +++ b/app/models/admin.rb @@ -0,0 +1,5 @@ +class Admin < ApplicationRecord + # Include default devise modules. Others available are: + # :confirmable, :lockable, :timeoutable and :omniauthable + devise :database_authenticatable, :trackable, :timeoutable, :lockable +end diff --git a/app/models/admin_user.rb b/app/models/admin_user.rb new file mode 100644 index 0000000..029cf92 --- /dev/null +++ b/app/models/admin_user.rb @@ -0,0 +1,6 @@ +class AdminUser < ApplicationRecord + # Include default devise modules. Others available are: + # :confirmable, :lockable, :timeoutable and :omniauthable + devise :database_authenticatable, + :recoverable, :rememberable, :trackable, :validatable +end diff --git a/app/models/user.rb b/app/models/user.rb index 0d6007a..ee0128c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2,7 +2,7 @@ class User < ApplicationRecord # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable - devise :database_authenticatable, :registerable, + devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable has_many :projects @@ -14,7 +14,7 @@ class User < ApplicationRecord def mailboxer_email(object) email end - + def self.types %w(Speaker Attendee) end diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index a82d8c7..4b97e99 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,37 +1,10 @@