{extends "base_full.tpl.html"}
{block page_classes}issue_view{/block}

{block "content"}
{if $issue|default:'' != ''}
  {include file="view_form.tpl.html"}

  {if $issue.remote_links|@count > 0}
  {include file="remote_links.tpl.html" remote_links=$issue.remote_links}
  {/if}

  {if $custom_fields|@count > 0}
  {include file="custom_fields.tpl.html"}
  {/if}
  {if $issue_access.partners && $enabled_partners|@count > 0}
  <div class="view_issue_separator"></div>
  {include file="partners.tpl.html"}
  {/if}
  <div class="view_issue_separator"></div>

  {if $core.has_crm and $issue.iss_customer_id}
  {include file="`$core.crm_template_path`/customer_info.tpl.html"}
  {/if}

  {if $issue_access.files}
  {include file="attachments.tpl.html"}
  <div class="view_issue_separator"></div>
  {/if}

  {if $core.app_setup.scm_integration|default:'' == 'enabled' and $issue_access.checkins}
  {include file="checkins.tpl.html"}
  {/if}

  {if $issue_access.time}
  {include file="time_tracking.tpl.html"}
  {/if}

  {if $issue_access.notes}
  {include file="notes.tpl.html"}
  {/if}

  {if $issue_access.phone}
  {include file="phone_support.tpl.html"}
  {/if}

  {if $core.app_setup.support_email == 'enabled' && $ema_id != ""}
    {if $issue_access.drafts}
      {include file="email_drafts.tpl.html"}
    {/if}
  {include file="support_emails.tpl.html"}
  {/if}
{/if}

{/block}