<commit_before><%= javascript_include_tag 'publishing' %>
<%= stylesheet_link_tag "publishing" %>
<div class="show_basic">
  <br/>

  <div class="box_infotext">
    <ul style="padding-left:1em;">
      <li>
        Here you can publish together with the selected items in previous step their related items. They are organized
        in ISA structure.
      </li>
      <li>
        Having the permission to publish an item, you can publish it by <b>checking</b> the
        <span class="published"><b>Publish</b></span> checkbox beside that asset.
      </li>
      <li>
        If you dont have the permission to publish an item or it was already published, the checkbox is
        <span style="color:gray;font-weight:bolder">disabled</span>
      </li>
      <li>
        The selected items in previous step are marked in the dash boxes, and the publish checkboxes are checked by
        default
      </li>
    </ul>
  </div>
  <br/>
  <%= form_tag({:action => :check_gatekeeper_required},:method=>:get) do %>
      <% @items_for_publishing.each do |item| %>
          <% if !item.assays.empty? %>
              <%= render :partial => "assets/publishing/isa_publishing_preview", :object => item %>
          <% else %>
              <%= check_box_tag publishing_item_param(item), 1, true, {:style => 'display:none;'} %>
          <% end %>
      <% end %>

      <% resource = (controller_name == 'people') ? current_user.person : @asset %>

      <%= submit_tag "Submit" -%>
      Or
      <%= link_to 'Cancel', resource %>
  <% end %>
</div><commit_msg>can not check the gatekeeper_reuqired until the items are chosen, so just draftly check based on the existing of projects gatekeepers<commit_after><%= javascript_include_tag 'publishing' %>
<%= stylesheet_link_tag "publishing" %>
<div class="show_basic">
  <br/>

  <div class="box_infotext">
    <ul style="padding-left:1em;">
      <li>
        Here you can publish together with the selected items in previous step their related items. They are organized
        in ISA structure.
      </li>
      <li>
        Having the permission to publish an item, you can publish it by <b>checking</b> the
        <span class="published"><b>Publish</b></span> checkbox beside that asset.
      </li>
      <li>
        If you dont have the permission to publish an item or it was already published, the checkbox is
        <span style="color:gray;font-weight:bolder">disabled</span>
      </li>
      <li>
        The selected items in previous step are marked in the dash boxes, and the publish checkboxes are checked by
        default
      </li>
    </ul>
  </div>
  <br/>
  <%= form_tag({:action => :check_gatekeeper_required},:method=>:get) do %>
      <% @items_for_publishing.each do |item| %>
          <% if !item.assays.empty? %>
              <%= render :partial => "assets/publishing/isa_publishing_preview", :object => item %>
          <% else %>
              <%= check_box_tag publishing_item_param(item), 1, true, {:style => 'display:none;'} %>
          <% end %>
      <% end %>

      <% resource = (controller_name == 'people') ? current_user.person : @asset %>

      <%
         # Can not check the gatekeeper_required until the items are chosen
         # So draftly check based on the existing of projects gatekeepers
         draftly_check_gatekeeper_required = !current_user.person.is_gatekeeper? && !current_user.person.projects.collect(&:gatekeepers).flatten.empty?
         submit_button_text = draftly_check_gatekeeper_required ? 'Next' : 'Submit'
      %>

      <%= submit_tag submit_button_text -%>
      Or
      <%= link_to 'Cancel', resource %>
  <% end %>
</div>
{'fraction_non_alphanumeric': 0.12975636463180948, 'fraction_numerical': 0.0010949904188338351, 'mean_word_length': 2.7786970010341263, 'pattern_counts': {'":': 0, '<': 80, '<?xml version=': 0, '>': 90, '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': '6124884', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1052, 'n_words': 324}