Bootstrap, Chosen gems. New settings

This commit is contained in:
magnolia-fan
2011-11-29 21:03:28 +04:00
parent 6f3d22b5e2
commit 927206b03c
15 changed files with 135 additions and 480 deletions
+36 -71
View File
@@ -1,71 +1,36 @@
%h1= I18n.t 'settings.title'
%ul.tabs#settings-tabs
%li.active
%a{ :href => "#", :'data-tab' => 'account' }= I18n.t 'settings.tab.account'
%li
%a{ :href => "#", :'data-tab' => 'site' }= I18n.t 'settings.tab.site'
%li
%a{ :href => "#", :'data-tab' => 'music' }= I18n.t 'settings.tab.music'
%li
%a{ :href => "#", :'data-tab' => 'lastfm' }= I18n.t 'settings.tab.lastfm'
.forms#settings-forms
.form.account
%form{ :action => "/", :method => 'post' }
%fieldset
.clearfix
%label{ :for => "name" }= I18n.t 'settings.username'
.input
%input.xlarge#name{ :name => "name", :size => 30, :type => "text", :value => @user.name }
.clearfix
%label{ :for => "email" }= I18n.t 'settings.email'
.input
%input.xlarge#email{ :name => "email", :size => 30, :type => "text", :value => @user.email }
.actions
%input.btn.primary{ :type => "submit", :value => I18n.t('settings.save') }
.form.site
%form
%fieldset
.clearfix
%label{ :for => "lang" }= I18n.t 'settings.lang.title'
.input
%select.medium#lang{ :name => "lang" }
%option{ :value => "en", :selected => (@user.lang == 'en') }= I18n.t 'settings.lang.en'
%option{ :value => "ru", :selected => (@user.lang == 'ru') }= I18n.t 'settings.lang.ru'
.actions
%input.btn.primary{ :type => "submit", :value => I18n.t('settings.save') }
.form.music
%form
%fieldset
.clearfix
%label{ :for => "album_types" }= I18n.t 'settings.music.title'
.input
%ul.inputs-list
%li
%label{ :for => "show_album" }
%input#show_album{ :name => "show[album]", :type => "checkbox", :checked => @user.music.include?(:album) }
%span= I18n.t 'settings.music.albums'
%li
%label{ :for => "show_single" }
%input#show_single{ :name => "show[single]", :type => "checkbox", :checked => @user.music.include?(:single) }
%span= I18n.t 'settings.music.singles'
%li
%label.disabled{ :for => "show_live" }
%input#show_live{ :name => "show[live]", :type => "checkbox", :disabled => "disabled", :checked => @user.music.include?(:live) }
%span= I18n.t 'settings.music.live'
%li
%label.disabled{ :for => "show_bootleg" }
%input#show_bootleg{ :name => "show[bootleg]", :type => "checkbox", :disabled => "disabled", :checked => @user.music.include?(:bootleg) }
%span= I18n.t 'settings.music.bootlegs'
.actions
%input.btn.primary{ :type => "submit", :value => I18n.t('settings.save') }
.form.lastfm
%form
%fieldset
.clearfix
%label{ :for => "lastfm_username" }= I18n.t 'settings.username'
.input
%input.borderless#lastfm_username{ :type => "text", :readonly => "readonly", :value => (@user.lastfm_username || I18n.t('settings.not_connected')) }
- unless @user.lastfm_username
%span.help-inline
%input.btn.lastfm-connect{ :type => "submit", :value => I18n.t('settings.connect') }
.modal#settings
.modal-header
%a.close.close-btn ×
%h3= t('settings.title')
.modal-body
.forms#settings-forms
.form.account
%form{ :action => "/", :method => 'post' }
%fieldset
.clearfix
%label{ :for => "name" }= I18n.t 'settings.username'
.input
%input.xlarge#name{ :name => "name", :size => 30, :type => "text", :value => "" }
.clearfix
%label{ :for => "lang" }= I18n.t 'settings.lang.title'
.input
%select.large#lang{ name: "lang" }
%option{ :value => "en" }= I18n.t 'settings.lang.en'
%option{ :value => "ru" }= I18n.t 'settings.lang.ru'
.clearfix.lastfm-on
%label= I18n.t 'settings.lastfm'
.input
%ul.inputs-list
%li
= t('settings.logged_in_as')
%span.label.notice.lastfm-login
%a.label.important.lastfm-disconnect= t('settings.disconnect')
.clearfix.lastfm-off
%label= I18n.t 'settings.lastfm'
.input
%ul.inputs-list
%li
%a.label.success.lastfm-connect= t('settings.connect')
.modal-footer
%a.save-btn.btn.primary= t('settings.save')
%a.close-btn.btn.secondary= t('settings.cancel')