PageRenderTime 78ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/papers/nysa-horde_talk/24_nagtemplate.xml.html

https://github.com/horde/horde-web
HTML | 24 lines | 20 code | 4 blank | 0 comment | 0 complexity | 07d59448e49db3ffe58fda575b8aa4d8 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
  2. <html><head>
  3. <title>Presentations :: A Nag Template</title>
  4. <link href="presentation.css" rel="stylesheet" type="text/css" />
  5. </head>
  6. <body>
  7. <table class='oratorHeader' border='0' cellspacing='0' cellpadding='1' width='100%'><tr>
  8. <td width='1%' align='left' class='oratorHeaderBack' valign='center' nowrap='nowrap'><a href="23_templates.xml.html" onmouseout="status='';" onmouseover="status='Go to Templates'; return true;"><img src="presentation_back.gif" border="0" alt="Back" title="Back" /></a></td><td style="cursor: hand;" onclick="location.href='23_templates.xml.html';" align="left" class="oratorHeaderBack" width="24%"><table border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap"><div class='oratorTitleHigh'>Templates</div></td></tr></table></td>
  9. <td width='50%' align='center' style='cursor: hand;' class='oratorHeaderBack' valign='center' nowrap='nowrap' onclick='location.href="/horde/orator/slide.php?Horde=89b51803872c27be93225868fd7053c3&amp;p=nysa-horde_talk&amp;s=24";'><table border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap"><div class='oratorTitle'>A Nag Template</div></td></tr></table></td>
  10. <td style='cursor: hand;' onclick='location.href="25_nagprefs.xml.html";' width='24%' align='right' class='oratorHeaderBack' valign='center' nowrap='nowrap'><table border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap"><div class='oratorTitleHigh'>Nag Preferences</div></td></tr></table></td><td width="1%" align="right"><a href="25_nagprefs.xml.html" onmouseout="status='';" onmouseover="status='Go to Nag Preferences'; return true;"><img src="presentation_forward.gif" border="0" alt="Forward" title="Forward" /></a></td>
  11. </tr></table>
  12. <br /><br /><div align='center'>
  13. <table border='0' width='600'><tr><td align='left'>
  14. <p>An example template from Nag:</p>
  15. <code><font color="#000000">
  16. <br />&lt;tr class="<font color="#0000BB">&lt;?=&nbsp;$style&nbsp;?&gt;</font>"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;td width="3%" nowrap="nowrap"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type="checkbox" name="items[]" value="<font color="#0000BB">&lt;?=&nbsp;$task_id</font><font color="#007700">;&nbsp;</font><font color="#0000BB">?&gt;</font>" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;td width="67%" nowrap="nowrap"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000BB">&lt;?=&nbsp;Horde</font><font color="#007700">::</font><font color="#0000BB">link</font><font color="#007700">(</font><font color="#0000BB">Horde</font><font color="#007700">::</font><font color="#0000BB">applicationUrl</font><font color="#007700">(</font><font color="#DD0000">"view.php?task=$task_id"</font><font color="#007700">),&nbsp;</font><font color="#0000BB">_</font><font color="#007700">(</font><font color="#DD0000">"View Task Details"</font><font color="#007700">))&nbsp;</font><font color="#0000BB">?&gt;&lt;?=&nbsp;htmlspecialchars</font><font color="#007700">(</font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'name'</font><font color="#007700">])&nbsp;</font><font color="#0000BB">?&gt;</font>&lt;/a&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;td width="15%" nowrap="nowrap"&gt;<font color="#0000BB">&lt;?=&nbsp;strftime</font><font color="#007700">(</font><font color="#0000BB">$conf</font><font color="#007700">[</font><font color="#DD0000">'list'</font><font color="#007700">][</font><font color="#DD0000">'date_format'</font><font color="#007700">],&nbsp;</font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'added'</font><font color="#007700">]);&nbsp;</font><font color="#0000BB">?&gt;</font>&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;td width="15%" nowrap="nowrap"&gt;<br /><font color="#0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">if&nbsp;(</font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'due'</font><font color="#007700">]&nbsp;&gt;&nbsp;</font><font color="#0000BB">0</font><font color="#007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</font><font color="#0000BB">strftime</font><font color="#007700">(</font><font color="#0000BB">$conf</font><font color="#007700">[</font><font color="#DD0000">'list'</font><font color="#007700">][</font><font color="#DD0000">'date_format'</font><font color="#007700">],&nbsp;</font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'due'</font><font color="#007700">]);<br />&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</font><font color="#0000BB">_</font><font color="#007700">(</font><font color="#DD0000">"None"</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /></font><font color="#0000BB">?&gt;<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt;<br />&lt;/tr&gt;<br />&nbsp;&nbsp;</font>
  17. </code><br />
  18. </td></tr></table></div>
  19. </body>
  20. </html>