- @page_title = t('calendar_admin.index.title') - @page_title += ' - ' + t('calendar_admin.defaults.title') + ' - ' + default_page_title - include_stylesheet 'admin/event_calendar' = render_region :top #calendars_table.outset %table.index %thead %tr - render_region :thead do |thead| - thead.name_header do %th.key= t('calendar_admin.index.name') - thead.url_header do %th.key= t('calendar_admin.index.url') - thead.refresh_header do %th.key= t('calendar_admin.index.last_refresh') %th.key= t('calendar_admin.index.auto_refresh') - thead.action_header do %th %tbody - @calendars.each do |calendar| %tr{:class => "node level-1"} - render_region :tbody do |tbody| - tbody.name_cell do %td.subscription-title = link_to image('calendar', :alt => ''), admin_calendar_url(calendar) = link_to calendar.name, admin_calendar_url(calendar) = "(#{calendar.events.count || '0'} " + t('calendar_admin.index.events') + ")" - tbody.url_cell do %td.url =h calendar.category.to_s.downcase \/ =h calendar.slug.downcase - tbody.refresh_cell do %td.refreshed - if calendar.ical =h calendar.ical.last_refresh_date.strftime("%m/%d at %H:%M") unless calendar.ical.last_refresh_date.blank? - else n/a %td.autorefresh - if calendar.ical = calendar.ical.refresh_automatically? ? t('calendar_admin.index.yes') : t('calendar_admin.index.no') - else n/a - tbody.action_cell do %td.actions - if calendar.ical = link_to image('redo') + ' ' + t('refresh_calendar'), refresh_admin_ical_url(calendar.ical.id), :method => :put, :class => 'action' - else %span.action.disabled = image('redo_disabled') + ' ' + t('refresh_calendar') = link_to image('delta') + ' ' + t('edit_calendar'), edit_admin_calendar_path(calendar), :class => 'action' = link_to image('minus') + ' ' + t('delete_calendar'), admin_calendar_path(calendar), :confirm => t('really_delete_calendar', :name => calendar.name), :method => :delete, :class => 'action' - render_region :bottom do |bottom| - bottom.buttons do #actions = pagination_for @calendars %ul %li= link_to image('plus') + " " + t('calendar_admin.index.new'), new_admin_calendar_url