summaryrefslogtreecommitdiff
path: root/app/views/conferences
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/conferences')
-rw-r--r--app/views/conferences/_form.html.haml7
-rw-r--r--app/views/conferences/_form_core.html.haml11
-rw-r--r--app/views/conferences/_index_core.html.haml53
-rw-r--r--app/views/conferences/edit.html.haml3
-rw-r--r--app/views/conferences/index.html.haml6
-rw-r--r--app/views/conferences/new.html.haml3
-rw-r--r--app/views/conferences/show.html.haml43
7 files changed, 126 insertions, 0 deletions
diff --git a/app/views/conferences/_form.html.haml b/app/views/conferences/_form.html.haml
new file mode 100644
index 0000000..4bee1a4
--- /dev/null
+++ b/app/views/conferences/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @parent, @conference ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('conferences.form.submit') \ No newline at end of file
diff --git a/app/views/conferences/_form_core.html.haml b/app/views/conferences/_form_core.html.haml
new file mode 100644
index 0000000..04754de
--- /dev/null
+++ b/app/views/conferences/_form_core.html.haml
@@ -0,0 +1,11 @@
+.inputs
+ = f.input :name, :label => t('conferences.form.name.label'), :hint => conditional_hint('conferences.form.name.hint'), :autofocus => true
+ - if !f.object.start.nil?
+ = f.input :start, :label => t('conferences.form.start.label'), :hint => conditional_hint('conferences.form.start.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2
+ = f.input :end, :label => t('conferences.form.end.label'), :hint => conditional_hint('conferences.form.end.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2
+ = f.input :description, :label => t('conferences.form.description.label'), :hint => conditional_hint('conferences.form.description.hint')
+ = f.input :pin, :label => t('conferences.form.pin.label'), :hint => conditional_hint('conferences.form.pin.hint')
+ = f.input :max_members, :collection => 1..MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE, :include_blank => false, :label => t('conferences.form.max_members.label'), :hint => conditional_hint('conferences.form.max_members.hint')
+ = f.input :open_for_anybody, :label => t('conferences.form.open_for_anybody.label'), :hint => conditional_hint('conferences.form.open_for_anybody.hint')
+ = f.input :announce_new_member_by_name, :label => t('conferences.form.announce_new_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_new_member_by_name.hint')
+ = f.input :announce_left_member_by_name, :label => t('conferences.form.announce_left_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_left_member_by_name.hint') \ No newline at end of file
diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml
new file mode 100644
index 0000000..4073e83
--- /dev/null
+++ b/app/views/conferences/_index_core.html.haml
@@ -0,0 +1,53 @@
+%table
+ %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')
+
+ - reset_cycle
+ - for conference in conferences
+ - parent = conference.conferenceable
+ %tr{:class => cycle('odd', 'even')}
+ %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.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
+ %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')
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file
diff --git a/app/views/conferences/edit.html.haml b/app/views/conferences/edit.html.haml
new file mode 100644
index 0000000..bc190e7
--- /dev/null
+++ b/app/views/conferences/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("conferences.edit.page_title")
+
+= render "form"
diff --git a/app/views/conferences/index.html.haml b/app/views/conferences/index.html.haml
new file mode 100644
index 0000000..0324acd
--- /dev/null
+++ b/app/views/conferences/index.html.haml
@@ -0,0 +1,6 @@
+- title t("conferences.index.page_title")
+
+- if @conferences.count > 0
+ = render "index_core", :conferences => @conferences
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Conference} \ No newline at end of file
diff --git a/app/views/conferences/new.html.haml b/app/views/conferences/new.html.haml
new file mode 100644
index 0000000..102f6a9
--- /dev/null
+++ b/app/views/conferences/new.html.haml
@@ -0,0 +1,3 @@
+- title t("conferences.new.page_title")
+
+= render "form"
diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml
new file mode 100644
index 0000000..10ebaed
--- /dev/null
+++ b/app/views/conferences/show.html.haml
@@ -0,0 +1,43 @@
+- title t("conferences.show.page_title")
+
+%p
+ %strong= t('conferences.show.name') + ":"
+ = @conference.name
+- if @conference.start
+ %p
+ %strong= t('conferences.show.start') + ":"
+ = @conference.start
+ %p
+ %strong= t('conferences.show.end') + ":"
+ = @conference.end
+- if !@conference.description.blank?
+ %p
+ %strong= t('conferences.show.description') + ":"
+ = @conference.description
+- if !@conference.pin.blank?
+ %p
+ %strong= t('conferences.show.pin') + ":"
+ = @conference.pin
+%p
+ %strong= t('conferences.show.open_for_anybody') + ":"
+ = @conference.open_for_anybody
+%p
+ %strong= t('conferences.show.announce_new_member_by_name') + ":"
+ = @conference.announce_new_member_by_name
+%p
+ %strong= t('conferences.show.announce_left_member_by_name') + ":"
+ = @conference.announce_left_member_by_name
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @conference }
+
+%h2= t('phone_numbers.index.page_title')
+- if @phone_numbers.count > 0
+ = render "phone_numbers/index_core", :phone_numbers => @phone_numbers
+
+= render :partial => 'shared/create_link', :locals => {:parent => @conference, :child_class => PhoneNumber}
+
+%h2= t("conference_invitees.index.page_title")
+- if @conference.conference_invitees.count > 0
+ = render "conference_invitees/index_core", :conference_invitees => @conference.conference_invitees
+
+= render :partial => 'shared/create_link', :locals => {:parent => @conference, :child_class => ConferenceInvitee} \ No newline at end of file