Source

wdmmg / wdmmg / templates / entry / view.html

<html xmlns:py="http://genshi.edgewall.org/"
  xmlns:xi="http://www.w3.org/2001/XInclude">

  <py:def function="nav_class">nav-entry</py:def>

  <py:def function="page_title">View entry</py:def>

  <py:def function="primary_sidebar_extras">

  <ul id="dashboard-submenu" class="flash-menu"> 
    <li class="sharethis"> 
      <span class="st_twitter_hcount" displayText="Tweet"></span> 
      <span class="st_facebook_hcount" displayText="Share"></span> 
      <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'99b03eb4-c4cc-4604-89e9-a2ff6f595e17'});</script> 
    </li> 
    <li style="margin-top:10px;"><a href="#comments">Comment on this item &raquo;</a></li>
  </ul>

   <div style="clear: both;"></div>
   <py:if test="c.show_foi">
   
  </py:if>
   </py:def>
  
  <div py:def="content">

    <dl>

      <dt>In dataset:</dt>
        <dd><a href="/dataset/${c.dataset.get('id')}">
		<py:choose>
		  <py:when test="c.dataset.get('label')">
		    ${c.dataset.get('label')}
		  </py:when>
		  <py:otherwise>
		   ${c.row.get('dataset').get('name')}
		  </py:otherwise>
		</py:choose>
      </a></dd>
      <dt>To:</dt>
      <dd><a href="${url(controller='entity', action='view', id=c.to.get('_id'))}">${c.to.get('label')}</a></dd> 
      <dt>From:</dt>
      <dd><a href="${url(controller='entity', action='view', id=c.from_.get('_id'))}">
        ${c.from_.get('label')}
      </a></dd> 
      
     <dt>Date made:</dt>
      <dd>${c.time}</dd>
      <dt>Amount:</dt>
      <dd>
        ${c.currency} ${c.amount}
      </dd>
     
      <py:if test="c.row.items()">
        <py:for each="key, value in c.row.items()">
          <dt>
          <py:choose>
      		<py:when test="c.desc.get(key)">
      	      ${c.desc.get(key).get('label', key)}
      		</py:when>
      		<py:otherwise>
      		  ${key}
      		</py:otherwise>
      	  </py:choose>
            
          </dt>
          <dd>
              <py:choose>
            	<py:when test="isinstance(value, dict)">
            	    ${value.get('label', value.get('name', repr(value)))}
            	</py:when>
            	<py:otherwise>
            	    ${h.render_value(value)}
            	</py:otherwise>
              </py:choose>
          </dd>
          <py:if test="c.desc.get(key, {}).get('description')">
          <dt>
              &nbsp;
          </dt>
          <dd>
              ${c.desc.get(key, {}).get('description')}
          </dd>
          </py:if>
        </py:for>
      </py:if>

      <py:if test="c.row.get('description')">
        <h3>Notes:</h3>
        <dd>${h.markdown(c.row.get('description'))}</dd>
      </py:if>
    </dl>

    <div id="comments" class="comments">
      <h3>Comments</h3>
      <a name="comments"></a>
      ${disqus_thread(c.row.id)}
    </div>

<script type="text/javascript">
<py:for each="key, value in sorted(c.row.items(), key=lambda x: x[0])">
 $('dt#key').qtip({
    content: 'Some notes and a <a href="#">link</a>',
	position: {
	   corner: {
	      target: 'topLeft',
	      tooltip: 'bottomLeft'
	   }
	},
    style: { 
      name: 'light',
      tip: 'bottomLeft',
      border: {
         width: 1,
         radius: 5,
         color: '#6699CC'
      }
    }
 })
</py:for>
</script>

  </div>

  <xi:include href="../layout.html" />
</html>