<commit_before>-title "Каталог Ролей"
-search "Роль"
%h1
  Каталог Ролей
  -if params[:search].present?
    [ 
    = params[:search]
    ]

%table
  %tr
    %th= sortable "name", "Роль"
    %th= sortable "bproce_id", "Процесс"
    %th= sortable "description", "Действия роли в процессе"
    %th Исполнитель
    -if can? :manage, BusinessRole
      %th
    -if can? :destroy, BusinessRole
      %th

  -@business_roles.each do |ro|
    %tr
      %td= link_to ro.name, ro
      %td
        = link_to ro.bproce.shortname, bproce_path(ro.bproce_id) if !ro.bproce.nil?
      %td= truncate(ro.description, :length => 120, :omission => ' ...')
      -if ro.users.first
        %td
          = link_to ro.users.first.displayname, ro.users.first
          -if ro.users.count == 2
            = link_to ro.users.last.displayname, ro.users.last
          -else
            -if ro.users.count > 2
              +
              = ro.users.count - 1
      -else
        %td
      - if can? :manage, ro
        %td= link_to image_tag('page_edit.gif', :alt => 'Изменить'),  edit_business_role_path(ro), class: 'button-img'
      - if can? :destroy, ro
        %td=link_to image_tag('action_stop.gif', :alt => 'Удалить'), ro, data: { confirm: 'Роль"' + ro.name + "\"\nДействительно хотите удалить?" }, :method => 'delete', class: 'button-img'


.apple_pagination
  -#.page_info
    -#    = page_entries_info @business_roles
  = will_paginate @business_roles 
%p
- if can? :destroy, BusinessRole
  = link_to 'Каталог', business_roles_path + '.odt?all=1', :class => 'button'
  -if request.query_string
    = link_to 'Список', business_roles_path + '.odt?' + request.query_string, :class => 'button'
  -else
    = link_to 'Список', business_roles_path + '.odt', :class => 'button'
  = link_to "Добавить новую роль" , new_business_role_path, :class => 'button'<commit_msg>upd: список исполнителей роли содержит до 7 ФИО, следующие помечаются +<commit_after>-title "Каталог Ролей"
-search "Роль"
%h1
  Каталог Ролей
  -if params[:search].present?
    [ 
    = params[:search]
    ]

%table
  %tr
    %th= sortable "name", "Роль"
    %th= sortable "bproce_id", "Процесс"
    %th= sortable "description", "Действия роли в процессе"
    %th Исполнитель
    -if can? :manage, BusinessRole
      %th
    -if can? :destroy, BusinessRole
      %th

  -<EMAIL> do |ro|
    %tr
      %td= link_to ro.name, ro
      %td
        = link_to ro.bproce.shortname, bproce_path(ro.bproce_id) if !ro.bproce.nil?
      %td= truncate(ro.description, :length => 120, :omission => ' ...')

      -if ro.users.count > 0
        %td
          - user_count = 0
          - ro.users.order(:lastname).each do | user |
            -user_count = user_count + 1
            -if user_count < 8
              = link_to user.displayname, user
            -else
              \+
      -else
        %td
      - if can? :manage, ro
        %td= link_to image_tag('page_edit.gif', :alt => 'Изменить'),  edit_business_role_path(ro), class: 'button-img'
      - if can? :destroy, ro
        %td=link_to image_tag('action_stop.gif', :alt => 'Удалить'), ro, data: { confirm: 'Роль"' + ro.name + "\"\nДействительно хотите удалить?" }, :method => 'delete', class: 'button-img'


.apple_pagination
  -#.page_info
    -#    = page_entries_info @business_roles
  = will_paginate @business_roles 
%p
- if can? :destroy, BusinessRole
  = link_to 'Каталог', business_roles_path + '.odt?all=1', :class => 'button'
  -if request.query_string
    = link_to 'Список', business_roles_path + '.odt?' + request.query_string, :class => 'button'
  -else
    = link_to 'Список', business_roles_path + '.odt', :class => 'button'
  = link_to "Добавить новую роль" , new_business_role_path, :class => 'button'
{'fraction_non_alphanumeric': 0.1478797638217928, 'fraction_numerical': 0.004830917874396135, 'mean_word_length': 2.6114341085271318, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2259073', 'n_tokens_mistral': 1448, 'n_tokens_neox': 1430, 'n_words': 312}