Permalink
Browse files

Merge remote branch 'origin/master'

  • Loading branch information...
2 parents b1d5ba3 + 2e15785 commit f6ef1f030d51f1f88381021174b651025eab7c7c @huerlisi committed Dec 17, 2010
View
@@ -62,7 +62,7 @@ gem 'validates_timeliness', '~> 3.0.0'
gem 'event_calendar', :git => 'git://github.com/huerlisi/event_calendar.git'
# Vcards
-gem 'has_vcards', '~> 0.6.1'
+gem 'has_vcards', '~> 0.7.0'
# Tagging
gem 'acts-as-taggable-on', '~> 2.0.6'
View
@@ -78,7 +78,7 @@ GEM
term-ansicolor (~> 1.0.5)
haml (3.0.24)
has_scope (0.5.0)
- has_vcards (0.6.1)
+ has_vcards (0.7.0)
activerecord
i18n
hpricot (0.8.3)
@@ -177,7 +177,7 @@ DEPENDENCIES
formtastic (~> 1.2.1)
haml
has_scope
- has_vcards (~> 0.6.1)
+ has_vcards (~> 0.7.0)
hpricot
i18n_rails_helpers (~> 0.9)
inherited_resources
@@ -1,20 +1,20 @@
module ApplicationHelper
# Tabs
def ui_tab_link(name, options = {})
- only = options.delete(:only)
- return if only and !only.call
+ return if options[:if] and not options[:if].call
+ return if options[:unless] and options[:unless].call
content_tag 'li' do
link_to t(name, :scope => 'tabs'), "#tab-#{name}"
end
end
def ui_tab_content(name, options = {})
- only = options.delete(:only)
- return if only and !only.call
-
+ return if options[:if] and !options[:if].call
+ return if options[:unless] and options[:unless].call
+
partial = options.delete(:partial)
- partial ||= "#{name}_tab"
+ partial ||= "tab_#{name}"
content_tag 'div', :id => "tab-#{name}", :class => "ui-tabs-hide" do
render partial
@@ -11,10 +11,11 @@ body
#content-column
+column($column_content)
- +last
+ margin-right: 0.7%
#sidebar-column
+column($column_sidebar)
+ +last
#sidebar-column,
#content-column
@@ -35,7 +35,6 @@ body
#content-column
background-color: white
border: 1px solid #dddddd
- margin-left: -2px
+border-radius($border_radius)
* html #content
@@ -67,7 +66,6 @@ html>body
ul
+no-bullets
#sidebar-column
- margin-right: 10px
border: 1px solid #dddddd
// Login form
#login-form
@@ -43,3 +43,6 @@ ul.overview-list.level-1
a
border-bottom: none
+
+.level-3
+ display: none
@@ -108,15 +108,15 @@
font-size: 1em
.ui-widget-content
- border: 1px solid #e4e4e4
- background: #f6f6f6 url(/images/jquery-ui/ui-bg_inset-hard_100_f6f6f6_1x100.png) 50% bottom repeat-x
+ //border: 1px solid #e4e4e4
+ //background: #f6f6f6 url(/images/jquery-ui/ui-bg_inset-hard_100_f6f6f6_1x100.png) 50% bottom repeat-x
color: #222222
a
color: #222222
.ui-widget-header
- border: 1px solid #7e89a0
- background: #aeb9cf url(/images/jquery-ui/ui-bg_gloss-wave_55_aeb9cf_500x100.png) 50% 50% repeat-x
+ //border: 1px solid #7e89a0
+ //background: #aeb9cf url(/images/jquery-ui/ui-bg_gloss-wave_55_aeb9cf_500x100.png) 50% 50% repeat-x
color: white
font-weight: bold
a
@@ -127,20 +127,22 @@
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
border: 1px solid #e4e4e4
- background: #aeb9cf url(/images/jquery-ui/ui-bg_glass_85_aeb9cf_1x400.png) 50% 50% repeat-x
+ //background: #aeb9cf url(/images/jquery-ui/ui-bg_glass_85_aeb9cf_1x400.png) 50% 50% repeat-x
+ background: white
font-weight: bold
- color: white
+ color: #555555
.ui-state-default a
- color: white
+ color: #555555
text-decoration: none
&:link, &:visited
- color: white
+ color: #555555
text-decoration: none
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus
border: 1px solid #e4e4e4
- background: #759fcf url(/images/jquery-ui/ui-bg_glass_75_759fcf_1x400.png) 50% 50% repeat-x
+ //background: #759fcf url(/images/jquery-ui/ui-bg_glass_75_759fcf_1x400.png) 50% 50% repeat-x
+ background: #759FCF
font-weight: bold
color: black
@@ -153,7 +155,8 @@
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active
border: 1px solid #e4e4e4
- background: #759fcf url(/images/jquery-ui/ui-bg_inset-hard_100_759fcf_1x100.png) 50% 50% repeat-x
+ //background: #759fcf url(/images/jquery-ui/ui-bg_inset-hard_100_759fcf_1x100.png) 50% 50% repeat-x
+ background: #AEB9CF
font-weight: bold
color: black 0
@@ -1259,17 +1262,20 @@ button.ui-button::-moz-focus-inner
padding: 0.2em 0.2em 0
li
list-style: none
- float: left
- position: relative
- top: 1px
- margin: 0 0.2em 1px 0
- border-bottom: 0 !important
+ //float: left
+ //position: relative
+ //top: 1px
+ //margin: 0 0.2em 1px 0
+ //border-bottom: 0 !important
padding: 0
white-space: nowrap
+ +border-bottom-left-radius(5px)
+ +border-top-right-radius(0px)
a
- float: left
+ //float: left
padding: 0.5em 1em
text-decoration: none
+ display: block
&.ui-tabs-selected
margin-bottom: 0
padding-bottom: 1px
@@ -1284,8 +1290,14 @@ button.ui-button::-moz-focus-inner
.ui-tabs-panel
display: block
border-width: 0
- padding: 1em 1.4em
- background: none
+ padding: 10px
+ //background: none
+ border: 1px solid #e4e4e4
+ background: #f6f6f6 url(/images/jquery-ui/ui-bg_inset-hard_100_f6f6f6_1x100.png) 50% bottom repeat-x
+ float: left
+ +border-radius(5px)
+ width: 85%
+ min-height: 540px
.ui-tabs-hide
display: none !important
@@ -1471,3 +1483,10 @@ button.ui-button::-moz-focus-inner
.ui-progressbar-value
margin: -1px
height: 100%
+
+// Custom modifications
+#tabs ul
+ disply: inline-table
+ float: left
+ padding: 0
+ margin-top: 20px
@@ -16,3 +16,6 @@
&:hover,
&.selected
border-bottom: 1px solid #AEB9CF
+
+#third-main-menu a.selected
+ color: black
@@ -25,11 +25,6 @@
#main-menu
= render_navigation(:context => :main, :level => 1)
= render_navigation(:context => :user, :level => 1)
- #sidebar-column
- #second-main-menu.sidebar
- = render_navigation(:context => :main, :level => 2)
- #sidebar.sidebar
- = yield :sidebar
#content-column
#content
@@ -39,4 +34,12 @@
#alert.flash.alert= alert
= yield
+ #sidebar-column
+ #second-main-menu.sidebar
+ = render_navigation(:context => :main, :level => 2)
+ #third-main-menu.sidebar
+ = render_navigation(:context => :main, :level => 3)
+ #sidebar.sidebar
+ = yield :sidebar
+
= javascript_include_tag :defaults
@@ -1,7 +0,0 @@
-%h2= t('learnyt.address')
-
-= full_address(resource.vcard)
-
-%h2= t_attr(:remarks, Person)
-
-%p.remarks<= resource.remarks
@@ -1,3 +0,0 @@
-%h2= t('learnyt.address')
-
-= full_address(resource.vcard)
@@ -1,7 +0,0 @@
-#tabs.ui-tabs
- %ul
- = ui_tab_link 'address'
- = ui_tab_link 'user', :only => lambda { resource.user }
-
- = ui_tab_content 'address'
- = ui_tab_content 'user', :only => lambda { resource.user }
@@ -0,0 +1,5 @@
+= render 'people/tab_header'
+
+%h2
+ = t('learnyt.address')
+= full_address(resource.vcard)
@@ -0,0 +1,7 @@
+= render 'people/tab_header'
+
+%h2
+ = t_title(:new, User)
+
+- @user = resource.build_user
+= render 'users/form'
@@ -0,0 +1,4 @@
+%h1
+ = resource
+
+= contextual_links
@@ -0,0 +1,6 @@
+= render 'people/tab_header'
+
+%h2
+ = t_attr(:remarks, Person)
+
+%p.remarks<= resource.remarks
@@ -1 +1 @@
-<%= show_new_form(People) %>
+<%= show_new_form(Person) %>
@@ -1,6 +1,7 @@
-= contextual_links
-
-%h1= resource
-
%div[resource]
- = render 'show'
+ = ui_tabs [ |
+ {:name => 'address', :partial => 'people/tab_address' }, |
+ {:name => 'remarks', :partial => 'people/tab_remarks' }, |
+ {:name => 'user', :partial => 'people/tab_user', :if => lambda { resource.user } }, |
+ {:name => 'create_user', :partial => 'people/tab_create_user', :unless => lambda { resource.user } } |
+ ] |
@@ -1,3 +0,0 @@
-%h2= t_attr(:remarks, Person)
-
-%p.remarks<= resource.remarks
@@ -1,5 +0,0 @@
-= ui_tabs [ |
- {:name => "address", :partial => 'people/address_tab' }, |
- {:name => "remarks"}, |
- {:name => "user", :partial => 'people/user_tab', :only => lambda { resource.user} } |
- ] |
@@ -7,13 +7,5 @@
-# f.input :current_password, :required => true unless can?(:manage, User)
= f.input :role_texts, :as => :select, :collection => Ability.roles_for_collection, :include_blank => false, :input_html => {:multiple => 'multiple'}, :required => true if can?(:manage, Role)
- - f.object.build_person unless f.object.person
- = f.semantic_fields_for :person do |p|
- = p.inputs t_attr(:address, Person) do
- = render 'vcards/form', :f => p
-
- = f.inputs t('learnyt.tags') do
- = f.input :tag_list
-
= f.buttons do
= f.commit_button
@@ -1,5 +1,5 @@
%tr[user]
- %td= link_to user, user, {'data-href-container' => 'tr'}
+ %td= link_to user, user.person, {'data-href-container' => 'tr'}
%td= user.email
%td= user.roles.map{|role| t(role.name, :scope => 'cancan.roles')}.join(', ')
%td= user.created_at.to_date
@@ -3,13 +3,6 @@
%h1= @user
#user
- - @person = @user.person
- = render 'people/show'
-
- %h2= t('learnyt.tags')
-
- = @user.tag_list
-
%h2= t_attr(:roles)
%ul#roles
@@ -70,6 +70,16 @@ de:
address: Adresse
user: Login
type: Art
+ roles: Rollen
+
+ student:
+ roles: Rollen
+
+ teacher:
+ roles: Rollen
+
+ parent:
+ roles: Rollen
possible_answer:
question: Frage
@@ -143,9 +153,10 @@ de:
all: Alle Aufgaben
tabs:
- address: Personalien
- remarks: Bemerkungen
- user: Login
+ address: Personalien
+ remarks: Bemerkungen
+ user: Login
+ create_user: Benutzer anlegen
formtastic:
hints:
@@ -159,13 +170,14 @@ de:
teacher: 'Lehrer'
main_navigation:
- settings: Einstellungen
- overview: Übersicht
+ settings: Einstellungen
+ overview: Übersicht
destroy_user_session: Abmelden
new_user_session: Anmelden
- correspondence: Korrespondenz
- e_mail_index: E-Mails
- post_mail_index: Briefe
+ correspondence: Korrespondenz
+ e_mail_index: E-Mails
+ post_mail_index: Briefe
+ administration: Administration
crud:
title:
Oops, something went wrong. Retry.

0 comments on commit f6ef1f0

Please sign in to comment.