app/views/calendars/index.html.slim
- breadcrumb :calendars, workbench
.page_content
.container-fluid
- if params[:q].present? or @calendars.any?
.row
.col-lg-12
= render 'filters'
- if @calendars.any?
.row
.col-lg-12
= table_builder_2 @calendars,
[ \
TableBuilderHelper::Column.new( \
key: :name, \
attribute: 'name', \
link_to: lambda do |calendar| \
workbench_calendar_path(workbench, calendar) \
end \
), \
TableBuilderHelper::Column.new( \
key: :organisation_name, \
name: Calendar.tmf('organisation'), \
attribute: Proc.new { |c| c.organisation.name } \
), \
TableBuilderHelper::Column.new( \
key: :shared, \
attribute: Proc.new { |c| t("#{c.try(:shared)}") } \
) \
],
cls: 'table has-filter'
= new_pagination @calendars, 'pull-right'
- unless @calendars.any?
.row.mt-xs
.col-lg-12
= replacement_msg t('.search_no_results')