<html>
  <head>
    <title tal:content="template/title">The title</title>
  </head>
  <link href="styles.css" rel="stylesheet" type="text/css">
  <body tal:define="DateTime python:modules['DateTime'].DateTime;Find python:modules['string'].find;IF python:lambda a,b,c:(a and [b] or [c])[0];ToInt python:modules['string'].atoi;Join python:modules['string'].join;Split python:modules['string'].split;Replace python:modules['string'].replace;req_info python:here.GetInfoRequest(here.REQUEST.form['request']);cert_info python:here.GetInfoCertificate(here.REQUEST.form['request'])">

    <div metal:use-macro="container/index_html/macros/top" tal:omit-tag="" id="logo-sep">TOP</div>
    <!-- ###### NAVIGATION BAR ##### -->
    <div id="navigation-bar" metal:use-macro="container/index_html/macros/navigation">NAV BAR</div>
    <!-- ###### END NAVIGATION BAR ##### -->

    <!-- ###### MAIN CONTENT ##### -->
    <div id="main-content">

<table class="table-group" style="width:500px;" tal:condition="python:req_info == None">
  <tr>
    <td colspan="2" class="table-group-title">Certificate info</td>
  </tr>
  <tr>
    <td colspan="2" class="table-group-row">The request id <span tal:content="python:here.REQUEST.form['request']"></span> does not exist</td>
  </tr>
</table>
<table class="table-group" style="width:500px;" tal:condition="python:req_info != None and req_info['status'] != 'certified'">
  <tr>
    <td colspan="2" class="table-group-title">Certificate info</td>
  </tr>
  <span tal:condition="python:req_info['ra_status'] != 'denied'" tal:omit-tag="">
    <tr>
    <td colspan="2" class="table-group-row">
	  The request id &quot;<span tal:content="python:here.REQUEST.form['request']"></span>&quot; is not certified yet
	</td>
	</tr>
  </span>
  <span tal:condition="python:req_info['ra_status'] == 'denied'" tal:omit-tag="">
    <tr>
    <td colspan="2" class="table-group-row">
	  The request id &quot;<span tal:content="python:here.REQUEST.form['request']"></span>&quot; has been denied because:
	</td>
	</tr>
	<tr>
    <td colspan="2" class="table-group-row">
      <span tal:omit-tag="" tal:repeat="line python:Split(req_info['denial_reason'],'\n')">
        <span tal:omit-tag="" tal:content="python:line">item</span><br>
      </span>	
	</td>
    </tr>
  </span>
</table>
<table class="table-group" style="width:500px;" tal:condition="python:req_info != None and req_info['status'] == 'certified'">
  <tr>
    <td colspan="2" class="table-group-title">Certificate info</td>
  </tr>
  <tr>
    <td class="table-group-row" align="center">
      <form action="manage_installCertificate" method="POST">
	    <input type="hidden" name="request" value="" tal:attributes="value python:here.REQUEST.form['request']">
        <input type="submit" value=" Install certificate ">
	  </form>
	</td>
    <td class="table-group-row" align="center">
      <form action="manage_downloadCertificate" method="POST">
	    <input type="hidden" name="request" value="" tal:attributes="value python:here.REQUEST.form['request']">
        <input type="submit" value=" Download certificate ">
	  </form>
    </td>
  </tr>
  <tr>
    <td colspan="2"><hr width="100%"></td>
  </tr>
  <tr>
    <td class="table-group-row" colspan="2">Cert info:</td>
  </tr>
  <tr>
	<td class="info-pre" colspan="2" tal:content="structure python:cert_info">
	</td>
  </tr>
  <tr>
    <td colspan="2"><hr width="100%"/></td>
  </tr>
  <tr>
    <td class="table-group-row" colspan="2">Request info:</td>
  </tr>
  <tr>
	<td class="info-pre" colspan="2">
      <span tal:omit-tag="" tal:repeat="line python:Split(req_info['content'],'\n')">
        <span tal:omit-tag="" tal:content="python:line">item</span><br>
      </span>	
	</td>
  </tr>
</table>

    </div>
    <!-- ###### END MAIN CONTENT ##### -->

    <!-- ###### FOOTER ##### -->
    <p metal:use-macro="container/index_html/macros/footer" id="footer-bar" align="right">
      The  eye <img src="logo.gif" width="34" height="18">
    </p>
    <!-- ###### END FOOTER ##### -->

</body>
</html>
