]> git.sur5r.net Git - contagged/blobdiff - templates/entry_show.tpl
Use leafletjs + OpenStreetMap instead of google maps
[contagged] / templates / entry_show.tpl
index 3f0c5f22dfdc619475b0c8755e1e7cf66bc30987..b10b45f4c1eb49f6a69fcd6f12020ccd315593e2 100644 (file)
 {include file="header.tpl"}
 
+<div id="show">
+
 {if $entry.photo != ''}
-  <a href="img.php?dn={$entry.dn|escape:url}&amp;.jpg" rel="imagebox" title="{$entry.givenname} {$entry.name}"><img src="img.php?dn={$entry.dn|escape:url}" align="right" class="photo" width="130" /></a>
+    <a href="img.php?dn={$entry.dn|escape:url}&amp;.jpg" rel="imagebox"
+       title="{$entry.givenname|h} {$entry.name|h}"><img src="img.php?dn={$entry.dn|escape:url}"
+       align="right" class="photo" width="130" alt="" /></a>
 {/if}
 <h1>
-  <img src="pix/{$entry.type}.png" border="0" width="22" height="22" align="middle" title="{$entry.type}" />
-  {$entry.givenname} {$entry.name}
+    <img src="pix/{$entry.type|h}.png" border="0" width="22" height="22"
+    align="middle" title="{$entry.type|h}" alt="" />
+    {$entry.givenname|h} {$entry.name|h}
 </h1>
 
-<table width="100%" {if $user}ondblclick="window.location.href='entry.php?dn={$entry.dn|escape:url}&mode=edit'"{/if}>
+<table width="100%" class="show"
+       {if $user}ondblclick="window.location.href='entry.php?dn={$entry.dn|escape:url}&amp;mode=edit'"{/if}>
   <tr>
     <td valign="top" width="50%">
-      <b>{$lang.business}</b>
-      <dl><dd>
-        <table>
+      <h3>{$lang.business}</h3>
+        <table width="100%">
           <tr>
             <td colspan="2">
-              {$entry.title} {$entry.givenname} {$entry.name}<br>
+
+              {$entry.title|h} {$entry.givenname|h} {$entry.name|h}<br />
 {if $entry.organization}
-              <a href="index.php?org={$entry.organization|escape:url}">{$entry.organization}</a><br>
+              <a href="index.php?org={$entry.organization|escape:url}">{$entry.organization|h}</a><br />
 {/if}
 {if $entry.office}
-              {$entry.office}<br>
+              {$entry.office|h}<br />
 {/if}
 {if $entry.street}
-              {$entry.street}<br>
+              {$entry.street|h}<br />
 {/if}
 {if $entry.location}
-              {$entry.zip} {$entry.location}<br>
+              {$entry.zip|h} {$entry.location|h}<br />
 {/if}
 {if $entry.state}
-              {$entry.state}
+              {$entry.state|h}
 {/if}
 {if $entry.country}
-              {$entry.country}
+              {$iso3166[$entry.country]}
 {/if}
-              <br><br>
+              <br /><br />
             </td>
           </tr>
 {if $entry.phone}
           <tr>
-            <td align="right">{$lang.phone}:</td>
-            <td>{$entry.phone}</td>
+            <th>{$lang.phone}:</th>
+            <td><a href="callto://{$entry.phone|escape:phone}">{$entry.phone|h}</a></td>
           </tr>
 {/if}
 {if $entry.switchboard}
           <tr>
-            <td align="right">{$lang.switchboard}:</td>
-            <td>{$entry.switchboard}</td>
+            <th>{$lang.switchboard}:</th>
+            <td>{$entry.switchboard|h}</td>
           </tr>
 {/if}
 {if $entry.fax}
           <tr>
-            <td align="right">{$lang.fax}:</td>
-            <td>{$entry.fax}</td>
+            <th>{$lang.fax}:</th>
+            <td>{$entry.fax|h}</td>
           </tr>
 {/if}
 {if $entry.pager}
           <tr>
-            <td align="right">{$lang.pager}:</td>
-            <td>{$entry.pager}</td>
+            <th>{$lang.pager}:</th>
+            <td>{$entry.pager|h}</td>
           </tr>
 {/if}
 {if $managername}
           <tr>
-            <td align="right">{$lang.manager}:</td>
+            <th>{$lang.manager}:</th>
             <td>{$managername}</td>
           </tr>
 {/if}
 {if $entry.position}
           <tr>
-            <td align="right">{$lang.position}:</td>
-            <td>{$entry.position}</td>
+            <th>{$lang.position}:</th>
+            <td>{$entry.position|h}</td>
           </tr>
 {/if}
 {if $entry.department}
           <tr>
-            <td align="right">{$lang.department}:</td>
-            <td>{$entry.department}</td>
+            <th>{$lang.department}:</th>
+            <td>{$entry.department|h}</td>
           </tr>
 {/if}
 
         </table>
-      </dd></dl>
-
 
     </td>
 
 
     <td valign="top" width="50%">
-      <b>{$lang.private}</b>
-      <dl><dd>
-        <table>
+      <h3>{$lang.private}</h3>
+        <table width="100%">
           <tr>
             <td colspan="2">
-              {$entry.title} {$entry.givenname} {$entry.name}<br>
+              {$entry.title|h} {$entry.givenname|h} {$entry.name|h}<br />
 {if $entry.homestreet}
-              {$entry.homestreet|nl2br}<br><br>
+              {$entry.homestreet|h|nl2br}<br /><br />
 {/if}
             </td>
           </tr>
 {if $entry.homephone}
           <tr>
-            <td align="right">{$lang.homephone}:</td>
-            <td>{$entry.homephone}</td>
+            <th>{$lang.homephone}:</th>
+            <td><a href="callto://{$entry.homephone|escape:phone}">{$entry.homephone|h}</a></td>
           </tr>
 {/if}
 {if $entry.mobile}
           <tr>
-            <td align="right">{$lang.mobile}:</td>
-            <td>{$entry.mobile}</td>
-          </tr>
-{/if}
-{if $entry.url}
-          <tr>
-            <td align="right">{$lang.url}:</td>
-            <td><a href="{$entry.url}" target="_blank">{$entry.url}</a></td>
+            <th>{$lang.mobile}:</th>
+            <td><a href="callto://{$entry.mobile|escape:phone}">{$entry.mobile|h}</a></td>
           </tr>
 {/if}
 {if $entry.birthday}
           <tr>
-            <td align="right">{$lang.birthday}:</td>
-            <td>{$entry.birthday}</td>
+            <th>{$lang.birthday}:</th>
+            <td>{$entry.birthday|date_format:$conf.dateformat|h}</td>
           </tr>
 {/if}
 {if $entry.anniversary}
           <tr>
-            <td align="right">{$lang.anniversary}:</td>
-            <td>{$entry.anniversary|date_format:$conf.dateformat}</td>
+            <th>{$lang.anniversary}:</th>
+            <td>{$entry.anniversary|date_format:$conf.dateformat|h}</td>
           </tr>
 {/if}
 {if $entry.spouse}
           <tr>
-            <td align="right">{$lang.spouse}:</td>
-            <td>{$entry.spouse}</td>
+            <th>{$lang.spouse}:</th>
+            <td>{$entry.spouse|h}</td>
           </tr>
 {/if}
 
         </table>
-      </dd></dl>
 
-      <b>{$lang.communication}</b>
-      <dl><dd>
-        <table>
+      <h3>{$lang.communication}</h3>
+        <table width="100%">
+{if $entry.url}
+          <tr>
+            <th>{$lang.url}:</th>
+            <td>{$entry.url|http}</td>
+          </tr>
+{/if}
 {if $entry.mail}
           <tr>
-            <td valign="top" align="right">{$lang.mail}:</td>
+            <th>{$lang.mail}:</th>
             <td>
               {foreach from=$entry.mail item=mail}
-                <a href="mailto:{$mail}">{$mail}</a><br>
+                <a href="mailto:{$mail|escape:url}">{$mail|h}</a><br />
               {/foreach}
             </td>
           </tr>
 {/if}
 {if $entry.instantmessenger}
           <tr>
-            <td align="right">{$lang.instantmessenger}:</td>
-            <td>{$entry.instantmessenger}</td>
+            <th>{$lang.instantmessenger}:</th>
+            <td>{$entry.instantmessenger|h}</td>
           </tr>
 {/if}
 {if $entry.ipphone}
           <tr>
-            <td align="right">{$lang.ipphone}:</td>
-            <td>{$entry.ipphone}</td>
+            <th>{$lang.ipphone}:</th>
+            <td>{$entry.ipphone|h}</td>
           </tr>
 {/if}
 
         </table>
-      </dd></dl>
 
     </td>
   </tr>
 </table>
 
-<hr noshade="noshade" size="1" />
+<h3>{$lang.extended}</h3>
 
-<table width="100%">
+<table width="100%" class="show">
   <tr>
     <td width="50%" valign="top">
-      <b>{$lang.extended}</b>
-      <dl><dd>
-        <table>
-{if $fields._marker}
-          <tr>
-            <td valign="top" align="right">
-              {$lang.marker}:
-            </td>
-            <td id="tedit_insert">
-              <span id="tedit_out">
-                {foreach from=$entry.marker item=marker}
-                  <a href="index.php?marker={$marker|escape:url}" class="tag">{$marker}</a> 
-                {/foreach}
-              </span>
-              {if $user}
-                <img src="pix/tag_blue_edit.png" align="right" width="16" height="16" onclick="tedit_showEditor('{$dn}')" class="click" />
-              {/if}
-            </td>
-          </tr>
-{/if}
+        <table width="100%">
 {if $fields.note}
           <tr>
-            <td valign="top" align="right">
+            <th>
               {$lang.note}:
-            </td>
+              <div {if $user}id="noteedit"{/if}>&nbsp;</div>
+            </th>
             <td>
-              {if $user}
-                 <img src="pix/phone.png" width="16" height="16" onclick="nedit_showEditor('call','{$entry.dn}','{$user|escape:javascript}');" class="click" />
-                 <img src="pix/email.png" width="16" height="16" onclick="nedit_showEditor('mail','{$entry.dn}','{$user|escape:javascript}');" class="click" />
-                 <img src="pix/arrow_right.png" width="16" height="16" onclick="nedit_showEditor('todo','{$entry.dn}','{$user|escape:javascript}');" class="click" />
-                 <img src="pix/note.png" width="16" height="16" onclick="nedit_showEditor('note','{$entry.dn}','{$user|escape:javascript}');" class="click" />
-              {/if}
-              <dl class="notes"><dd id="nedit_insert">
+              <div id="notes">
                 {$entry.note|noteparser}
-              </dd></dl>
+                &nbsp;
+              </div>
             </td>
           </tr>
 {/if}
         </table>
-      </dd></dl>
     </td>
     <td width="50%" valign="top">
-      <dl><dd>
-        <table >
+        <table width="100%">
+{if $fields._marker}
+          <tr>
+            <th>
+              {$lang.marker}:
+              <div {if $user}id="tagedit"{/if}>&nbsp;</div>
+            </th>
+            <td>
+              <span id="taglist">
+                {foreach from=$entry.marker item=marker}
+                  <a href="index.php?marker={$marker|escape:url}" class="tag">{$marker|h}</a>
+                {/foreach}
+                &nbsp;
+              </span>
+            </td>
+          </tr>
+{/if}
 {if $entry.certificate}
          <tr>
-           <td align="right">{$lang.certificate}:</td>
+           <th>{$lang.certificate}:</th>
            <td><form>
-              <textarea rows=3 cols=28 name='certificate' onClick='this.form.certificate.select();'>{$entry.certificate}</textarea>
+              <textarea rows=3 cols=28 name='certificate' onClick='this.form.certificate.select();'>{$entry.certificate|h}</textarea>
             </form></td>
           </tr>
 {/if}
 {if $entry.domain}
           <tr>
-            <td align="right">{$lang.domain}:</td>
-            <td>{$entry.domain}</td>
+            <th>{$lang.domain}:</th>
+            <td>{$entry.domain|h}</td>
           </tr>
 {/if}
 {if $entry.timezone}
           <tr>
-            <td align="right">{$lang.timezone}:</td>
-            <td>{$entry.timezone}</td>
+            <th>{$lang.timezone}:</th>
+            <td>{$entry.timezone|h}</td>
           </tr>
 {/if}
         </table>
-      </dd></dl>
     </td>
   </tr>
 </table>
 
-
+</div>
 
 {include file="footer.tpl"}