diff --git a/app/assets/javascripts/admin/chosen-selects.js.coffee b/app/assets/javascripts/admin/chosen-selects.js.coffee index 9966d7b5..318e68ae 100644 --- a/app/assets/javascripts/admin/chosen-selects.js.coffee +++ b/app/assets/javascripts/admin/chosen-selects.js.coffee @@ -1,4 +1,4 @@ # enable chosen js $('.chosen-select').chosen -# allow_single_deselect: true + allow_single_deselect: true no_results_text: 'Ничего не найдено по запросу' \ No newline at end of file diff --git a/app/assets/stylesheets/custom.css b/app/assets/stylesheets/custom.css index 58a06ac9..95bbf7ad 100644 --- a/app/assets/stylesheets/custom.css +++ b/app/assets/stylesheets/custom.css @@ -1,290 +1,297 @@ -html, -body { - height: 100%; - border: none !important; -} -.main { - min-height: 100%; -} -.main > .container { - padding-bottom: 126px; -} -.formy, -.formy h5 { - color: #000 !important; - background: #fff !important; -} -.formy a { - color: #333 !important; -} -h1 { - margin-bottom: 30px !important; -} -header { - border: none !important; -} -header .info { - padding-top: 44px; -} -header .info h3 { - color: #d4724b; - text-transform: uppercase; - font-family: Arial; - font-size: 26px; - font-weight: bold !important; -} -header .info h3 .color { - color: #7c7852 !important; -} -.content h1.title { - font: bold 72px/60px Arial, sans-serif !important; - text-transform: uppercase !important; - margin: 0 0 30px !important; - padding: 0 !important; -} -.content h4 { - font: bold 24px/22px Arial, sans-serif !important; - margin: 0 0 20px !important; - color: #000 !important; -} -.da-slide p { - height: 150px; -} -.center { - text-align: center !important; - padding: 0 !important; -} -.border { - height: 4px !important; - background: #7c7852 !important; -} -footer { - position: relative; - margin-top: -96px; -} -footer .line { - width: 100%; - height: 1px; - font-size: 0; - position: absolute; - left: 0; - top: 10px; - background-color: #ddd; -} -footer .copy { - border: none !important; -} - -/* navbar */ -.navbar { - border: none !important; - padding: 25px 0 15px; - margin-bottom: 10px !important; -} -.navbar-inner { - background-color: #fff !important; -} -.navbar .nav { - padding-left: 15px; -} -.navbar .nav > li > a, .navbar .nav > li > a:visited { - padding: 0 !important; - margin-right: 20px; - color: #020202 !important; - font-family: Arial; - font-size: 18px !important; -} -.navbar .nav > li > a:hover { - color: #535353 !important; - background: none !important; -} - -/* Login form */ -.form-type-login input[type="email"], -.form-type-login input[type="text"], -.form-type-login input[type="password"] { - width: 100%; - height: 28px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.form-type-login .form-actions { - padding-left: 0; - padding-right: 0; -} -.formy input[type="submit"] { - color: #000; -} -.formy .help-inline { - font-size: 12px; -} -abbr[title], abbr[data-original-title] { - cursor: default; - border-bottom: none; -} - -/* Profile form */ -.form-horizontal.profile-form .control-label { - width: 200px; -} -.form-horizontal.profile-form .controls { - margin-left: 220px; -} -.form-horizontal.profile-form label.checkbox { - text-align: left; -} -.form-horizontal.profile-form input[type="email"], -.form-horizontal.profile-form input[type="text"], -.form-horizontal.profile-form input[type="password"] { - width: 300px; -} - -td.middle { - vertical-align: middle; -} - -.theme-block { - color: #fff; - padding: 20px; - min-height: 155px; -} -.theme-block h4 { - color: #fff !important; -} - -.g-blue { - background-color: #9d0102; -} -.g-red { - background-color: #019d9b; -} -.g-green { - background-color: #d0ce09; -} -.g-orange { - background-color: #839d01; -} -.g-yellow { - background-color: #70019d; -} -.g-violin { - background-color: #016f9d; -} -.g-disabled { - background-color: #ccc; -} - -.timetable { - margin-top: 20px; -} -.timetable thead th { - vertical-align: middle; - color: #fff; - font-weight: normal; - text-align: center; -} -.timetable .hour, -.timetable .hour td { - height: 120px; -} -.issue-container { - position: relative; - width: 100%; -} -.issue-wrap { - position: absolute; - margin: 0 0px; - width: 129px; -} -.issue-container .issue { - - background: #eee; - border: 1px solid #ccc; - border-radius: 4px; - padding: 4px; - width: 128px; -} -.hour_1 { - height: 100px; -} -.hour_3 { - height: 385px; -} -.hour_4 { - height: 520px; -} - -.error { - display: block; -} -.color { - color: #d4724b !important; -} -.no-padding { - padding-bottom: 0 !important; -} - -/* Foooter social */ -.social-share-links { - float: right; - height: 36px; - padding-top: 24px; -} -.social-share-links li { - float: left; - margin-left: 10px; - height: 20px; -} -.social-share-links li.vk { - width: 150px; -} -.social-share-links .gplus { - position: relative; - top: -1px; - overflow: hidden; -} -.social-public-links { - float: right; - padding-top: 23px; - margin-left: 30px; -} -.social-public-links li { - float: left; - margin-left: 10px; - font-size: 18px; -} - - -@font-face { - font-family: 'Bender-bold'; - src: url("/assets/bender_bold-webfont.eot"); - src: url("/assets/bender_bold-webfont.eot?#iefix") format('embedded-opentype'), - url("/assets/bender_bold-webfont.woff") format('woff'), - url("/assets/bender_bold-webfont.ttf") format('truetype'), - url("/assets/bender_bold-webfont.svg#fontello") format('svg'); - font-weight: normal; - font-style: normal; -} -.bender { - font-family: 'Bender-bold' !important; -} -.hero .bender { - font-weight: 100; - text-transform: uppercase; - color: #839d01 !important; - font-size: 30px !important; -} -.hero .bender .color { - color: #000 !important; -} - -@media (max-width: 767px) { - #reformal_tab { - display: none !important; - } -} -.ui-menu { - width: 220px !important; - list-style: none; -} +html, +body { + height: 100%; + border: none !important; +} +.main { + min-height: 100%; +} +.main > .container { + padding-bottom: 126px; +} +.formy, +.formy h5 { + color: #000 !important; + background: #fff !important; +} +.formy a { + color: #333 !important; +} +h1 { + margin-bottom: 30px !important; +} +header { + border: none !important; +} +header .info { + padding-top: 44px; +} +header .info h3 { + color: #d4724b; + text-transform: uppercase; + font-family: Arial; + font-size: 26px; + font-weight: bold !important; +} +header .info h3 .color { + color: #7c7852 !important; +} +.content h1.title { + font: bold 72px/60px Arial, sans-serif !important; + text-transform: uppercase !important; + margin: 0 0 30px !important; + padding: 0 !important; +} +.content h4 { + font: bold 24px/22px Arial, sans-serif !important; + margin: 0 0 20px !important; + color: #000 !important; +} +.da-slide p { + height: 150px; +} +.center { + text-align: center !important; + padding: 0 !important; +} +.border { + height: 4px !important; + background: #7c7852 !important; +} +footer { + position: relative; + margin-top: -96px; +} +footer .line { + width: 100%; + height: 1px; + font-size: 0; + position: absolute; + left: 0; + top: 10px; + background-color: #ddd; +} +footer .copy { + border: none !important; +} + +/* navbar */ +.navbar { + border: none !important; + padding: 25px 0 15px; + margin-bottom: 10px !important; +} +.navbar-inner { + background-color: #fff !important; +} +.navbar .nav { + padding-left: 15px; +} +.navbar .nav > li > a, .navbar .nav > li > a:visited { + padding: 0 !important; + margin-right: 20px; + color: #020202 !important; + font-family: Arial; + font-size: 18px !important; +} +.navbar .nav > li > a:hover { + color: #535353 !important; + background: none !important; +} + +/* Login form */ +.form-type-login input[type="email"], +.form-type-login input[type="text"], +.form-type-login input[type="password"] { + width: 100%; + height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.form-type-login .form-actions { + padding-left: 0; + padding-right: 0; +} +.formy input[type="submit"] { + color: #000; +} +.formy .help-inline { + font-size: 12px; +} +abbr[title], abbr[data-original-title] { + cursor: default; + border-bottom: none; +} + +/* Profile form */ +.form-horizontal.profile-form .control-label { + width: 200px; +} +.form-horizontal.profile-form .controls { + margin-left: 220px; +} +.form-horizontal.profile-form label.checkbox { + text-align: left; +} +.form-horizontal.profile-form input[type="email"], +.form-horizontal.profile-form input[type="text"], +.form-horizontal.profile-form input[type="password"] { + width: 300px; +} + +td.middle { + vertical-align: middle; +} + +.theme-block { + color: #fff; + padding: 20px; + min-height: 155px; +} +.theme-block h4 { + color: #fff !important; +} + +.g-blue { + background-color: #9d0102; +} +.g-red { + background-color: #019d9b; +} +.g-green { + background-color: #d0ce09; +} +.g-orange { + background-color: #839d01; +} +.g-yellow { + background-color: #70019d; +} +.g-violin { + background-color: #016f9d; +} +.g-disabled { + background-color: #ccc; +} + +.timetable { + margin-top: 20px; +} +.timetable thead th { + vertical-align: middle; + color: #fff; + font-weight: normal; + text-align: center; +} +.timetable .hour, +.timetable .hour td { + height: 120px; +} +.issue-container { + position: relative; + width: 100%; +} +.issue-wrap { + position: absolute; + margin: 0 0px; + width: 129px; +} +.issue-container .issue { + + background: #eee; + border: 1px solid #ccc; + border-radius: 4px; + padding: 4px; + width: 128px; +} +.hour_1 { + height: 100px; +} +.hour_3 { + height: 385px; +} +.hour_4 { + height: 520px; +} + +.error { + display: block; +} +.color { + color: #d4724b !important; +} +.no-padding { + padding-bottom: 0 !important; +} + +/* Foooter social */ +.social-share-links { + float: right; + height: 36px; + padding-top: 24px; +} +.social-share-links li { + float: left; + margin-left: 10px; + height: 20px; +} +.social-share-links li.vk { + width: 150px; +} +.social-share-links .gplus { + position: relative; + top: -1px; + overflow: hidden; +} +.social-public-links { + float: right; + padding-top: 23px; + margin-left: 30px; +} +.social-public-links li { + float: left; + margin-left: 10px; + font-size: 18px; +} + + +@font-face { + font-family: 'Bender-bold'; + src: url("/assets/bender_bold-webfont.eot"); + src: url("/assets/bender_bold-webfont.eot?#iefix") format('embedded-opentype'), + url("/assets/bender_bold-webfont.woff") format('woff'), + url("/assets/bender_bold-webfont.ttf") format('truetype'), + url("/assets/bender_bold-webfont.svg#fontello") format('svg'); + font-weight: normal; + font-style: normal; +} +.bender { + font-family: 'Bender-bold' !important; +} +.hero .bender { + font-weight: 100; + text-transform: uppercase; + color: #839d01 !important; + font-size: 30px !important; +} +.hero .bender .color { + color: #000 !important; +} + +@media (max-width: 767px) { + #reformal_tab { + display: none !important; + } +} +.ui-menu { + width: 220px !important; + list-style: none; +} + +/* lectors */ +.workshop p { + text-overflow: ellipsis; + overflow: hidden; + white-space: pre-wrap; +} diff --git a/app/controllers/web/admin/news_controller.rb b/app/controllers/web/admin/news_controller.rb index 2549ec18..131dc5f6 100644 --- a/app/controllers/web/admin/news_controller.rb +++ b/app/controllers/web/admin/news_controller.rb @@ -38,7 +38,7 @@ def update if @news.update_attributes params[:news] flash_success - redirect_to admin_news_path(@news) + redirect_to edit_admin_news_path(@news) else flash_error diff --git a/app/controllers/web/admin/pages_controller.rb b/app/controllers/web/admin/pages_controller.rb index d440caab..37fb4b37 100644 --- a/app/controllers/web/admin/pages_controller.rb +++ b/app/controllers/web/admin/pages_controller.rb @@ -39,7 +39,7 @@ def update if @page.update_attributes params[:page] flash_success - redirect_to admin_page_path(@page) + redirect_to edit_admin_page_path(@page) else flash_error diff --git a/app/controllers/web/admin/topics_controller.rb b/app/controllers/web/admin/topics_controller.rb index ca046e88..127269f6 100644 --- a/app/controllers/web/admin/topics_controller.rb +++ b/app/controllers/web/admin/topics_controller.rb @@ -26,7 +26,7 @@ def update @topic = ::Admin::TopicEditType.find params[:id] if @topic.update_attributes params[:topic] flash_success - redirect_to admin_topics_path + redirect_to edit_admin_topic_path else flash_error render :edit diff --git a/app/controllers/web/admin/users_controller.rb b/app/controllers/web/admin/users_controller.rb index e9fd6079..fe1653d1 100644 --- a/app/controllers/web/admin/users_controller.rb +++ b/app/controllers/web/admin/users_controller.rb @@ -40,7 +40,7 @@ def update if @user.update_attributes params[:user] flash_success - redirect_to admin_users_path + redirect_to edit_admin_user_path else flash_error render "edit" diff --git a/app/views/web/admin/users/index.html.haml b/app/views/web/admin/users/index.html.haml index 184896ad..6e33bd8f 100644 --- a/app/views/web/admin/users/index.html.haml +++ b/app/views/web/admin/users/index.html.haml @@ -1,20 +1,20 @@ .page-header %h1=t('.title') -= simple_form_for @search, url: admin_users_path, method: :get do |f| - .row - .span3 - = f.input :last_name_cont, label: t(".last_name"), required: false - .span3 - = f.input :first_name_cont, label: t(".first_name"), required: false - .span3 - = f.input :email_cont, label: t(".email"), required: false - .span3 - = f.input :state_in, :as => :chosen_select, collection: User.state_machine.states.map { |s| [s.human_name, s.name] }, label: t(".state"), required: false - .clearfix - = f.submit t(".search"), :class => 'btn btn-primary' - %br - %br += simple_form_for @search, url: admin_users_path, method: :get do |f| + %table.table + %thead + %tr + %td + = f.input_field :last_name_cont, placeholder: t(".last_name"), label: false, required: false + %td + = f.input_field :first_name_cont, placeholder: t(".first_name"), label: false, required: false + %td + = f.input_field :email_cont, placeholder: t(".email"), label: false, required: false + %td + = f.input :state_in, :as => :chosen_select, collection: User.state_machine.states.map { |s| [s.human_name, s.name] }, input_html: { data: { placeholder: t(".state") }}, label: false, required: false + %td + = f.submit t(".search"), :class => 'btn btn-primary' = link_to t('.new_user'), new_admin_user_path, :class => 'btn btn-primary' @@ -27,6 +27,7 @@ %th= sort_link(@search, :first_name, User.human_attribute_name(:first_name)) %th= sort_link(@search, :email, User.human_attribute_name(:email)) %th= sort_link(@search, :state, User.human_attribute_name(:state)) + %th= sort_link(@search, :role, User.human_attribute_name(:role)) %th= sort_link(@search, :created_at, t(".created_at")) %th= t(".actions") %tbody @@ -37,6 +38,7 @@ %td= user.first_name %td= user.email %td= user.state + %td= user.role %td= l user.created_at %td = link_to t('.edit'), edit_admin_user_path(user), :class => 'btn btn-mini' diff --git a/app/views/web/lectors/index.html.haml b/app/views/web/lectors/index.html.haml index 609028d4..f10a144c 100644 --- a/app/views/web/lectors/index.html.haml +++ b/app/views/web/lectors/index.html.haml @@ -4,17 +4,17 @@ .span12.workshop - @lectors.each do |lector| .row - .span3 + .span4 .pic - - if lector.photo.url - = image_tag(lector.photo.url) - .span9 + - if lector.photo.url + = image_tag(lector.photo.url) + .span8 %h5= lector.full_name %h6 %strong= lector.company - %h6.grey= lector.about + %p= lector.about -#.social -# %a.tip{"data-original-title" => "Facebook", :href => "#"} -# %i.icon-facebook.facebook .clearfix - %hr \ No newline at end of file + %hr diff --git a/app/views/web/welcome/_want_to_do.html.haml b/app/views/web/welcome/_want_to_do.html.haml index f9321792..b59d4396 100644 --- a/app/views/web/welcome/_want_to_do.html.haml +++ b/app/views/web/welcome/_want_to_do.html.haml @@ -1,9 +1,9 @@ .row .span6 - %h4 Что мы хотим сделать? - %p Мероприятие для IT-шников, где можно узнать что-то новое, познакомиться с интересными людьми как из Ульяновска, так и со всей страны. - %p Мероприятие планируется в формате конференции (т.е. параллельно на нескольких площадках выступают докладчики, проходят круглые столы, работает выставка). + %h4 Есть что рассказать? + %p В этом году на конференции ожидается более 3000 участников и около 100 докладчиков со всей России. + %p И если у вас в копилке есть сумасшедший доклад и вам есть о чем рассказать ИТ-общественности, пишите на #{mail_to "info@nastachku.ru"} .span6 - %h4 Кто наша аудитория, кого мы ждём? - %p Мероприятие будет интересно тем, кто каким-либо образом связывает свою жизнь с IT. - %p Это и программисты, и веб-дизайнеры, и люди, которые хотят связать своё будущее с IT, и те, кто хотят знать, что будет завтра, чтобы использовать информационные технологии уже сегодня. \ No newline at end of file + %h4 Кого мы ждем? + %p Хочешь знать, что будет завтра, чтобы использовать информационные технологии уже сегодня? + %p Тогда наше мероприятие для тебя! Ждем всех ИТ-неравнодушных. \ No newline at end of file diff --git a/db/migrate/20130222103504_update_default_user_role.rb b/db/migrate/20130222103504_update_default_user_role.rb new file mode 100644 index 00000000..01c8bdf6 --- /dev/null +++ b/db/migrate/20130222103504_update_default_user_role.rb @@ -0,0 +1,10 @@ +class UpdateDefaultUserRole < ActiveRecord::Migration + def up + User.reset_column_information + User.update_all({:role => :user}, :role => nil) + end + + def down + User.update_all(:role => nil) + end +end