From 8fdc1332bbff9c23400459dc7018cba147279cc5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:21:49 +0100 Subject: Added %thead and %tbody to the tables. --- app/views/conferences/_index_core.html.haml | 93 +++++++++++++++-------------- 1 file changed, 47 insertions(+), 46 deletions(-) (limited to 'app/views/conferences') diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml index 50ea1c8..bd305df 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -1,53 +1,54 @@ %table{:class => 'table table-striped'} - %tr - %th= t('conferences.index.name') - - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count - %th= t('conferences.index.start') - %th= t('conferences.index.end') - %th= t('conferences.index.phone_numbers') - - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count - %th= t('conferences.index.pin') - %th= t('conferences.index.max_members') - %th= t('conferences.index.number_of_invitees') - %th= t('conferences.index.flags') - - - - for conference in conferences - - parent = conference.conferenceable + %thead %tr - %td= conference.name + %th= t('conferences.index.name') - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count + %th= t('conferences.index.start') + %th= t('conferences.index.end') + %th= t('conferences.index.phone_numbers') + - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count + %th= t('conferences.index.pin') + %th= t('conferences.index.max_members') + %th= t('conferences.index.number_of_invitees') + %th= t('conferences.index.flags') + + %tbody + - for conference in conferences + - parent = conference.conferenceable + %tr + %td= conference.name + - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count + %td + - if conference.start + = l conference.start, :format => :long + - else + = '-' + %td + - if conference.end + = l conference.end, :format => :long + - else + = '-' %td - - if conference.start - = l conference.start, :format => :long - - else - = '-' - %td - - if conference.end - = l conference.end, :format => :long - - else - = '-' - %td - - if conference.phone_numbers.count > 0 - = render 'phone_numbers/listing', :phone_numbers => conference.phone_numbers.order(:number) - %br - = render :partial => 'shared/create_link', :locals => {:parent => conference, :child_class => PhoneNumber, :short_link => true} + - if conference.phone_numbers.count > 0 + = render 'phone_numbers/listing', :phone_numbers => conference.phone_numbers.order(:number) + %br + = render :partial => 'shared/create_link', :locals => {:parent => conference, :child_class => PhoneNumber, :short_link => true} - - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count + - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count + %td + - if !conference.pin.blank? + = conference.pin + - else + = '-' + %td= conference.max_members + %td= conference.conference_invitees.count %td - - if !conference.pin.blank? - = conference.pin - - else - = '-' - %td= conference.max_members - %td= conference.conference_invitees.count - %td - %ul - - if conference.open_for_anybody - %li= t('conferences.index.open_for_anybody') - - if conference.announce_new_member_by_name - %li= t('conferences.index.announce_new_member_by_name') - - if conference.announce_left_member_by_name - %li= t('conferences.index.announce_left_member_by_name') + %ul + - if conference.open_for_anybody + %li= t('conferences.index.open_for_anybody') + - if conference.announce_new_member_by_name + %li= t('conferences.index.announce_new_member_by_name') + - if conference.announce_left_member_by_name + %li= t('conferences.index.announce_left_member_by_name') - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file -- cgit v1.2.3 From de2369863c8cb0d2ea61a236f869d91dd0cce3af Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 00:20:38 +0100 Subject: Optimized UI (for the use on mobile phones). --- app/views/conferences/_index_core.html.haml | 43 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 16 deletions(-) (limited to 'app/views/conferences') diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml index bd305df..8670418 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -5,12 +5,20 @@ - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count %th= t('conferences.index.start') %th= t('conferences.index.end') - %th= t('conferences.index.phone_numbers') + %th + %span.hidden-phone + = t('conferences.index.phone_numbers') - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count %th= t('conferences.index.pin') - %th= t('conferences.index.max_members') - %th= t('conferences.index.number_of_invitees') - %th= t('conferences.index.flags') + %th + %span.hidden-phone + = t('conferences.index.max_members') + %th + %span.hidden-phone + = t('conferences.index.number_of_invitees') + %th + %span.hidden-phone + = t('conferences.index.flags') %tbody - for conference in conferences @@ -29,10 +37,8 @@ - else = '-' %td - - if conference.phone_numbers.count > 0 + - if conference.phone_numbers.any? = render 'phone_numbers/listing', :phone_numbers => conference.phone_numbers.order(:number) - %br - = render :partial => 'shared/create_link', :locals => {:parent => conference, :child_class => PhoneNumber, :short_link => true} - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count %td @@ -40,15 +46,20 @@ = conference.pin - else = '-' - %td= conference.max_members - %td= conference.conference_invitees.count %td - %ul - - if conference.open_for_anybody - %li= t('conferences.index.open_for_anybody') - - if conference.announce_new_member_by_name - %li= t('conferences.index.announce_new_member_by_name') - - if conference.announce_left_member_by_name - %li= t('conferences.index.announce_left_member_by_name') + %span.hidden-phone + = conference.max_members + %td + %span.hidden-phone + = conference.conference_invitees.count + %td + %span.hidden-phone + %ul + - if conference.open_for_anybody + %li= t('conferences.index.open_for_anybody') + - if conference.announce_new_member_by_name + %li= t('conferences.index.announce_new_member_by_name') + - if conference.announce_left_member_by_name + %li= t('conferences.index.announce_left_member_by_name') =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file -- cgit v1.2.3 From 387f0949d62121f145f80b017329c83aeffc8355 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 10:01:48 +0100 Subject: Improved UI. --- app/views/conferences/_index_core.html.haml | 55 +++++++++-------------------- 1 file changed, 16 insertions(+), 39 deletions(-) (limited to 'app/views/conferences') diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml index 8670418..6e82316 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -2,20 +2,9 @@ %thead %tr %th= t('conferences.index.name') - - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count - %th= t('conferences.index.start') - %th= t('conferences.index.end') %th %span.hidden-phone = t('conferences.index.phone_numbers') - - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count - %th= t('conferences.index.pin') - %th - %span.hidden-phone - = t('conferences.index.max_members') - %th - %span.hidden-phone - = t('conferences.index.number_of_invitees') %th %span.hidden-phone = t('conferences.index.flags') @@ -24,42 +13,30 @@ - for conference in conferences - parent = conference.conferenceable %tr - %td= conference.name - - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count - %td - - if conference.start - = l conference.start, :format => :long - - else - = '-' - %td - - if conference.end - = l conference.end, :format => :long - - else - = '-' + %td + %span.hidden-phone + = conference.name + %span.visible-phone + = truncate(conference.name, :length => 8) %td - if conference.phone_numbers.any? = render 'phone_numbers/listing', :phone_numbers => conference.phone_numbers.order(:number) - - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count - %td - - if !conference.pin.blank? - = conference.pin - - else - = '-' - %td - %span.hidden-phone - = conference.max_members - %td - %span.hidden-phone - = conference.conference_invitees.count %td + - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count + - if !conference.pin.blank? + %span.label.label-info + = "PIN: #{conference.pin}" + %span.hidden-phone - %ul - if conference.open_for_anybody - %li= t('conferences.index.open_for_anybody') + %span.label + = t('conferences.index.open_for_anybody') - if conference.announce_new_member_by_name - %li= t('conferences.index.announce_new_member_by_name') + %span.label + = t('conferences.index.announce_new_member_by_name') - if conference.announce_left_member_by_name - %li= t('conferences.index.announce_left_member_by_name') + %span.label + = t('conferences.index.announce_left_member_by_name') =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file -- cgit v1.2.3 From 680073d4cf7619bddfb7f79ea9e538a33d9dcdee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:11:45 +0100 Subject: Refactoring --- app/views/conferences/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/conferences') diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml index 6e82316..18ef6b0 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('conferences.index.name') -- cgit v1.2.3