aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/stif/dashboards/_dashboard.html.slim
blob: 74e607e267382475e6ee4f11542de8fdc565d8ab (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.row
  .col-lg-6.col-md-6.col-sm-6.col-xs-12
    .panel.panel-default
      .panel-heading
        h3.panel-title
          = t('.organisation')

      - if @dashboard.workbench.output.referentials.present?
        - @dashboard.workbench.output.referentials.first(5).each do |referential|
          .list-group
            = link_to referential.name, referential_path(referential), class: 'list-group-item'
      - else
        .panel-body
          em.small.text-muted = t('.no_content')

    .panel.panel-default
      .panel-heading
        h3.panel-title
          = t('.idf')

      .panel-body
        em.small.text-muted = t('.no_content')

    .panel.panel-default
      .panel-heading
        h3.panel-title
          = t('.api_keys')
          span.badge.ml-xs = current_organisation.api_keys.count if current_organisation.api_keys.present?
      - if current_organisation.api_keys.present?
        - current_organisation.api_keys.each do |api_key|
          .list-group
            = policy(api_key).edit? ? link_to( "#{api_key.name} : #{api_key.token}", edit_api_key_path(api_key), class: 'list-group-item') : "#{api_key.name} : #{api_key.token}"
      - else
        .panel-body
          em.small.text-muted = t('.no_content')

  .col-lg-6.col-md-6.col-sm-6.col-xs-12
    .panel.panel-default
      .panel-heading
        h3.panel-title.with_actions
          div
            = t('.referentials')
            span.badge.ml-xs = @dashboard.referentials.count if @dashboard.referentials.present?

          div
            = link_to '', workbench_path(@dashboard.workbench), class: ' fa fa-chevron-right pull-right', title: t('.see')

      - if @dashboard.referentials.present?
        .list-group
          - @dashboard.referentials.first(5).each_with_index do |referential, i|
            = link_to referential.name, referential_path(referential), class: 'list-group-item' if i < 6

      - else
        .panel-body
          em.small.text-muted = t('.no_content')

    .panel.panel-default
      .panel-heading
        h3.panel-title.with_actions
          = I18n.t("calendars.index.title")
          span.badge.ml-xs = @dashboard.workbench.calendars.count if @dashboard.calendars.present?

          div
            = link_to '', workgroup_calendars_path(@dashboard.workbench.workgroup), class: ' fa fa-chevron-right pull-right', title: t('.see')

      - if @dashboard.calendars.present?
        .list-group
          - @dashboard.calendars.first(5).each_with_index do |calendar, i|
            = link_to calendar.name, workgroup_calendar_path(@dashboard.workbench.workgroup, calendar), class: 'list-group-item' if i < 6

      - else
        .panel-body
          em.small.text-muted = t('.no_content')