KyivKrishnaAcademy/ved_akadem_students

View on GitHub
app/views/academic_groups/_tab_student_list.html.haml

Summary

Maintainability
Test Coverage
- if show_pdf_export_menu?
  .row.vert-offset-top-1
    .col-xs-12
      - if current_person.can_act?('academic_group:group_list_pdf')
        = link_to t('academic_groups.show.group_list_pdf'),
                  group_list_pdf_path(academic_group),
                  rel: 'noopener noreferrer',
                  target: '_blank',
                  class: 'btn btn-success btn-xs glyphicon glyphicon-print'
      - if current_person.can_act?('academic_group:attendance_template_pdf')
        = link_to t('academic_groups.show.attendance_template_pdf'),
                  attendance_template_pdf_path(academic_group),
                  rel: 'noopener noreferrer',
                  target: '_blank',
                  class: 'btn btn-success btn-xs glyphicon glyphicon-print'
.row.vert-offset-top-1
  .col-xs-12
    .table-responsive
      %table.table.table-condensed.table-striped
        %thead
          %tr
            %th #
            %th= t('academic_groups.show.photo')
            %th= t('academic_groups.show.full_name')
            %th= t('academic_groups.show.birthday')
            - if am_i_group_elder?(academic_group)
              %th= t('academic_groups.show.telephones')
        %tbody
          - students.each_with_index do |student, index|
            %tr
              %td
                = index.next
              %td
                = thumb_with_pop(student)
              %td
                = link_to_show_person_or_name(student, short: true)
              %td
                = l(student.birthday, format: :short)
              - if am_i_group_elder?(academic_group)
                %td
                  = student.telephones.map(&:phone).join(', ')