<%  modul_uniq_id ||= controller_name + '_' + action_name %>
<%= toggling_container(modul_uniq_id, User.current, {:heading => l(:label_add_related_issues), :default_button_state => false, :wrapping_heading_element_classes => ' icon icon-relation'}) do %>
  <div class="splitcontent">
    <div class="splitcontentleft">
      <p>
        <label class="label-before"><%= l(:label_issue_new_relation_before) -%></label>
        <span class="relation-type">
          <%= select_tag 'issue[relation][relation_type]', options_for_select(collection_for_relation_type_select, issue.relation && issue.relation[:relation_type]), :style => 'width:auto;' -%>
        </span>
      </p>
    </div>
    <div class="splitcontentright">
      <p>
        <label class="label-after"><%= l(:label_issue_new_relation_after) -%></label>
        <span class="issue-selector"><%= issues_relations_field_tag 'issue[relation][issue_to_id]', 'relation_issue_to_id', issue.relation && issue.relation[:issue_to_id], :url => {:modal_project_id => issue.project_id, :query_name => 'issue_relation'} %></span>
        <span>
          <%= l(:field_delay) %>: <%= text_field_tag 'project[relation][delay]', nil, :size => 3 -%>
          <%= l(:label_day_plural) -%>
        </span>
      </p>
    </div>
  </div>

<% end unless in_mobile_view? %>
