aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/calendars/index.html.slim
blob: 2c87a6f7abd7080d956dc288573d4d4c8a131f8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- breadcrumb :calendars, workgroup

.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| \
                  workgroup_calendar_path(workgroup, calendar) \
                end \
              ), \
              TableBuilderHelper::Column.new( \
                key: :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')

= javascript_pack_tag 'date_filters'