<commit_before><div class="span-24 last user_profile" id="content">
  <%= render :partial => "users/options"%>
  <div class="page-header">
    <h2><%= t('manage_delegates.delegations_show_t')%></h2>
  </div>
  <div id="q_dashboard">
    <div class="row group padded">
      <strong><%= t('generic.delegator')%>:</strong>
      <%= link_to h(@delegator.full_name), @delegator %>
    </div>
    <div class="row group padded">
      <strong><%= t('generic.delegate') %>:</strong>
      <%= link_to h(@delegation.user_delegate.delegate.full_name), user_delegate_path(@delegation.user_delegate) %>
    </div>
    <div class="row group padded">
      <strong><%= t('generic.questionnaire')%>:</strong>
      <%=h @delegation.questionnaire.present? ? @delegation.questionnaire.title(I18n.locale.to_s) : "-" %>
    </div>
    <div class="row group padded">
      <strong><%= t('generic.remarks') %>:</strong>
      <%= @delegation.remarks.present? ? h(@delegation.remarks) : "-" %>
    </div>
    <% if @delegation.delegation_sections.blank? -%>
      <p><strong><%= t('generic.details')%></strong> You have not specified a list of sections for the delegate to fill, so the system will allow the user to fill any part of the questionnaire.</p>
    <% else -%>
        </div>
        <div>
          <h4><%= t('manage_delegates.delegations_show_sl')%></h4>
          <table>
            <thead>
            <tr>
              <th width="35%"><%= t('generic.section') %></th>
              <th width="35%"><%= t('delegation_details.root_section_th') %></th>
              <th width="20%"><%= t('delegation_details.loop_th')%></th>
              <th width="10%"></th>
            </tr>
            </thead>
            <tbody>
            <% @delegation.delegation_sections.each do |delegation_section| -%>
                <tr>
                  <td><%= delegation_section.section.present? ? OrtSanitize.white_space_cleanse(delegation_section.section.title(I18n.locale.to_s)) : "-" %></td>
                  <td><%= delegation_section.section && delegation_section.section.root.present? ? OrtSanitize.white_space_cleanse(delegation_section.section.root.title(I18n.locale.to_s)) : "-"%></td>
                  <td>
                    <%= delegation_section.loop_item_names.map{|loop_item_name| h(loop_item_name.item_name(I18n.locale.to_s))}.join(', ') -%>
                  </td>
                  <td><%= link_to t('generic.edit'), edit_delegation_section_path(delegation_section) %> | <%= link_to t('generic.remove'), delegation_section, :method => :delete, :confirm => t('generic.are_you_sure') %></td>
                </tr>
            <% end -%>
            </tbody>
          </table>
    <% end -%>
    </div>
    <p class="clear"><%= link_to t('manage_delegates.add_sections'), new_delegation_delegation_section_path(@delegation)%></p>
    </div><!-- /content --><commit_msg>Strip html tags from section title<commit_after><div class="span-24 last user_profile" id="content">
  <%= render :partial => "users/options"%>
  <div class="page-header">
    <h2><%= t('manage_delegates.delegations_show_t')%></h2>
  </div>
  <div id="q_dashboard">
    <div class="row group padded">
      <strong><%= t('generic.delegator')%>:</strong>
      <%= link_to h(@delegator.full_name), @delegator %>
    </div>
    <div class="row group padded">
      <strong><%= t('generic.delegate') %>:</strong>
      <%= link_to h(@delegation.user_delegate.delegate.full_name), user_delegate_path(@delegation.user_delegate) %>
    </div>
    <div class="row group padded">
      <strong><%= t('generic.questionnaire')%>:</strong>
      <%=h @delegation.questionnaire.present? ? @delegation.questionnaire.title(I18n.locale.to_s) : "-" %>
    </div>
    <div class="row group padded">
      <strong><%= t('generic.remarks') %>:</strong>
      <%= @delegation.remarks.present? ? h(@delegation.remarks) : "-" %>
    </div>
    <% if @delegation.delegation_sections.blank? -%>
      <p><strong><%= t('generic.details')%></strong> You have not specified a list of sections for the delegate to fill, so the system will allow the user to fill any part of the questionnaire.</p>
    <% else -%>
        </div>
        <div>
          <h4><%= t('manage_delegates.delegations_show_sl')%></h4>
          <table>
            <thead>
            <tr>
              <th width="35%"><%= t('generic.section') %></th>
              <th width="35%"><%= t('delegation_details.root_section_th') %></th>
              <th width="20%"><%= t('delegation_details.loop_th')%></th>
              <th width="10%"></th>
            </tr>
            </thead>
            <tbody>
            <% @delegation.delegation_sections.each do |delegation_section| -%>
                <tr>
                  <td><%= delegation_section.section.present? ? strip_tags(OrtSanitize.white_space_cleanse(delegation_section.section.title(I18n.locale.to_s))) : "-" %></td>
                  <td><%= delegation_section.section && delegation_section.section.root.present? ? strip_tags(OrtSanitize.white_space_cleanse(delegation_section.section.root.title(I18n.locale.to_s))) : "-"%></td>
                  <td>
                    <%= delegation_section.loop_item_names.map{|loop_item_name| h(loop_item_name.item_name(I18n.locale.to_s))}.join(', ') -%>
                  </td>
                  <td><%= link_to t('generic.edit'), edit_delegation_section_path(delegation_section) %> | <%= link_to t('generic.remove'), delegation_section, :method => :delete, :confirm => t('generic.are_you_sure') %></td>
                </tr>
            <% end -%>
            </tbody>
          </table>
    <% end -%>
    </div>
    <p class="clear"><%= link_to t('manage_delegates.add_sections'), new_delegation_delegation_section_path(@delegation)%></p>
    </div><!-- /content -->
{'fraction_non_alphanumeric': 0.19070651235101055, 'fraction_numerical': 0.007600621869062014, 'mean_word_length': 2.804204993429698, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 183, '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': '5197907', 'n_tokens_mistral': 1976, 'n_tokens_neox': 1922, 'n_words': 311}