Commits

Anonymous committed aa8f71f

Initial import of flyspray theme for GD

Comments (0)

Files changed (150)

issuetracker/templates/.htaccess

+Deny From All

issuetracker/templates/admin.cat.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('categorylist')}</h3>
+  <?php $this->display('common.cat.tpl'); ?>
+</div>

issuetracker/templates/admin.editgroup.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('editgroup')}</h3>
+  <?php $this->display('common.editgroup.tpl'); ?>
+</div>

issuetracker/templates/admin.groups.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('usersandgroups')}</h3>
+  <fieldset class="box">
+    <legend>{L('usersandgroups')}</legend>
+    <p>
+      <img src="{$this->get_image('personal')}" alt="" class="middle" /> <a href="{CreateURL('admin', 'newuser', $proj->id)}">{L('newuser')}</a>
+    </p>
+    <p>
+      <img src="{$this->get_image('kuser')}" alt="" class="middle" /> <a href="{CreateURL('admin', 'newgroup', $proj->id)}">{L('newgroup')}</a>
+    </p>
+
+    <div class="groupedit">
+    <form action="{$baseurl}index.php" method="get">
+        <div>
+            <label for="selectgroup">{L('editgroup')}</label>
+            <select name="id" id="selectgroup">{!tpl_options(Flyspray::ListGroups())}</select>
+            <button type="submit">{L('edit')}</button>
+            <input type="hidden" name="do" value="admin" />
+            <input type="hidden" name="area" value="editgroup" />
+        </div>
+    </form>
+    
+    <form action="{$baseurl}index.php" method="get">
+        <div>
+            <label for="edit_user">{L('edituser')}</label>
+            {!tpl_userselect('user_name', '', 'edit_user')}       
+            <button type="submit">{L('edit')}</button>
+
+            <input type="hidden" name="do" value="admin" />
+            <input type="hidden" name="area" value="users" />
+        </div>
+    </form>
+    </div>
+  </fieldset>
+</div>

issuetracker/templates/admin.menu.tpl

+<div id="toolboxmenu">
+  <a id="globprefslink" href="{CreateURL('admin', 'prefs')}">{L('preferences')}</a>
+  <a id="globuglink" href="{CreateURL('admin', 'groups')}">{L('usersandgroups')}</a>
+  <a id="globttlink" href="{CreateURL('admin', 'tasktype')}">{L('tasktypes') }</a>
+  <a id="globstatuslink" href="{CreateURL('admin', 'status')}">{L('taskstatuses') }</a>
+  <a id="globreslink" href="{CreateURL('admin', 'resolution')}">{L('resolutions') }</a>
+  <a id="globcatlink" href="{CreateURL('admin', 'cat')}">{L('categories') }</a>
+  <a id="globoslink" href="{CreateURL('admin', 'os')}">{L('operatingsystems')}</a>
+  <a id="globverlink" href="{CreateURL('admin', 'version')}">{L('versions') }</a>
+  <a id="globnewprojlink" href="{CreateURL('admin', 'newproject')}">{L('newproject')}</a>
+</div>

issuetracker/templates/admin.newgroup.tpl

+<div id="toolbox">
+  <h3>{L('admintoolbox')} :: {$proj->prefs['project_title']} : {L('createnewgroup')}</h3>
+
+    <?php
+    $this->display('common.newgroup.tpl');
+    ?>
+</div>

issuetracker/templates/admin.newproject.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('createnewproject')}</h3>
+  <fieldset class="box">
+    <legend>{L('newproject')}</legend>
+    <form action="{CreateURL('admin', 'newproject')}" method="post">
+      <div>
+        <input type="hidden" name="action" value="admin.newproject" />
+        <input type="hidden" name="area" value="newproject" />
+      </div>
+      <table class="box">
+        <tr>
+          <td><label for="projecttitle">{L('projecttitle')}</label></td>
+          <td><input id="projecttitle" name="project_title" value="{Req::val('project_title')}" type="text" class="required text" size="40" maxlength="100" /></td>
+        </tr>
+        <tr>
+          <td><label for="themestyle">{L('themestyle')}</label></td>
+          <td>
+            <select id="themestyle" name="theme_style">
+              {!tpl_options(Flyspray::listThemes(), Req::val('theme_style', $proj->prefs['theme_style']), true)}
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <td><label for="langcode">{L('language')}</label></td>
+          <td>
+            <select id="langcode" name="lang_code">
+              {!tpl_options(Flyspray::listLangs(), Req::val('lang_code', $fs->prefs['lang_code']), true)}
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <td><label for="intromesg">{L('intromessage')}</label></td>
+          <td>
+            <?php if (defined('FLYSPRAY_HAS_PREVIEW')): ?>
+            <div class="hide preview" id="preview"></div>
+            <?php endif; ?>
+            {!TextFormatter::textarea('intro_message', 8, 70, array('accesskey' => 'r', 'tabindex' => 8, 'id' => 'intromesg'), Req::val('intro_message', $proj->prefs['intro_message']))}
+            <br />
+            <?php if (defined('FLYSPRAY_HAS_PREVIEW')): ?>
+            <button tabindex="9" type="button" onclick="showPreview('intromesg', '{#$baseurl}', 'preview')">{L('preview')}</button>
+            <?php endif; ?>
+          </td>
+        </tr>
+        <tr>
+          <td><label for="othersview">{L('othersview')}</label></td>
+          <td>{!tpl_checkbox('others_view', Req::val('others_view', Req::val('action') != 'admin.newproject'), 'othersview')}</td>
+        </tr>
+        <tr>
+          <td><label for="anonopen">{L('allowanonopentask')}</label></td>
+          <td>{!tpl_checkbox('anon_open', Req::val('anon_open'), 'anonopen')}</td>
+        </tr>
+        <tr>
+          <td class="buttons" colspan="2"><button type="submit">{L('createthisproject')}</button></td>
+        </tr>
+      </table>
+    </form>
+  </fieldset>
+</div>

issuetracker/templates/admin.newuser.tpl

+<div id="toolbox">
+  <h3>{L('admintoolbox')} :: {$proj->prefs['project_title']} : {L('newuser')}</h3>
+
+    <?php
+    $this->display('common.newuser.tpl');
+    ?>
+</div>

issuetracker/templates/admin.os.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('oslist')}</h3>
+
+  <fieldset class="box">
+    <legend>{L('operatingsystems')}</legend>
+    <?php
+    $this->assign('list_type', 'os');
+    $this->assign('rows', $proj->listOs(true));
+    $this->display('common.list.tpl');
+    ?>
+  </fieldset>
+</div>

issuetracker/templates/admin.prefs.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('preferences')}</h3>
+
+  <form action="{CreateURL('admin', 'prefs')}" method="post">
+  <ul id="submenu">
+   <li><a href="#general">{L('general')}</a></li>
+   <li><a href="#userregistration">{L('userregistration')}</a></li>
+   <li><a href="#notifications">{L('notifications')}</a></li>
+   <li><a href="#lookandfeel">{L('lookandfeel')}</a></li>
+  </ul>
+  
+   <div id="general" class="tab">
+      <table class="box">
+        <tr>
+          <td><label for="pagetitle">{L('pagetitle')}</label></td>
+          <td>
+            <input id="pagetitle" name="page_title" type="text" class="text" size="40" maxlength="100" value="{$fs->prefs['page_title']}" />
+          </td>
+        </tr>
+        <tr>
+          <td><label for="defaultproject">{L('defaultproject')}</label></td>
+          <td>
+            <select id="defaultproject" name="default_project">
+              {!tpl_options(array_merge(array(0 => L('allprojects')), Flyspray::listProjects()), $fs->prefs['default_project'])}
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <td><label for="langcode">{L('language')}</label></td>
+          <td>
+            <select id="langcode" name="lang_code">
+              {!tpl_options(Flyspray::listLangs(), $fs->prefs['lang_code'], true)}
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <td><label for="dateformat">{L('dateformat')}</label></td>
+          <td>
+            <input id="dateformat" name="dateformat" type="text" class="text" size="40" maxlength="30" value="{$fs->prefs['dateformat']}" />
+          </td>
+        </tr>
+        <tr>
+          <td><label for="dateformat_extended">{L('dateformat_extended')}</label></td>
+          <td>
+            <input id="dateformat_extended" name="dateformat_extended" class="text" type="text" size="40" maxlength="30" value="{$fs->prefs['dateformat_extended']}" />
+          </td>
+        </tr>
+        <tr>
+          <td><label for="cache_feeds">{L('cache_feeds')}</label></td>
+          <td>
+            <select id="cache_feeds" name="cache_feeds">
+            {!tpl_options(array('0' => L('no_cache'), '1' => L('cache_disk'), '2' => L('cache_db')), $fs->prefs['cache_feeds'])}
+            </select>
+          </td>
+        </tr>
+      </table>
+    </div>
+
+    <div id="userregistration" class="tab">
+      <table class="box">
+        <tr>
+          <td><label for="allowusersignups">{L('anonreg')}</label></td>
+          <td>{!tpl_checkbox('anon_reg', $fs->prefs['anon_reg'], 'allowusersignups')}</td>
+        </tr>
+        <tr>
+          <td><label for="spamproof">{L('spamproof')}</label></td>
+          <td>{!tpl_checkbox('spam_proof', $fs->prefs['spam_proof'], 'spamproof')}</td>
+        </tr>
+        <tr>
+          <td><label for="notify_registration">{L('notify_registration')}</label></td>
+          <td>{!tpl_checkbox('notify_registration', $fs->prefs['notify_registration'], 'notify_registration')}</td>
+        </tr>
+        <tr>
+          <td><label for="defaultglobalgroup">{L('defaultglobalgroup')}</label></td>
+          <td>
+            <select id="defaultglobalgroup" name="anon_group">
+              {!tpl_options(Flyspray::listGroups(), $fs->prefs['anon_group'])}
+            </select>
+          </td>
+        </tr>
+      </table>
+    </div>
+
+    <div id="notifications" class="tab">
+      <table class="box">
+        <tr>
+          <td><label for="usernotify">{L('forcenotify')}</label></td>
+          <td>
+            <select id="usernotify" name="user_notify">
+              {!tpl_options(array(L('neversend'), L('userchoose'), L('email'), L('jabber')), $fs->prefs['user_notify'])}
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <th colspan="2"><hr />
+            {L('emailnotify')}
+          </th>
+        </tr>
+        <tr>
+          <td><label for="adminemail">{L('fromaddress')}</label></td>
+          <td>
+            <input id="adminemail" name="admin_email" class="text" type="text" size="40" maxlength="100" value="{$fs->prefs['admin_email']}" />
+          </td>
+        </tr>
+        <tr>
+          <td><label for="smtpserv">{L('smtpserver')}</label></td>
+          <td>
+            <input id="smtpserv" name="smtp_server" class="text" type="text" size="40" maxlength="100" value="{$fs->prefs['smtp_server']}" />
+            <?php if (extension_loaded('openssl')) : ?>
+            {!tpl_checkbox('email_ssl', $fs->prefs['email_ssl'], 'email_ssl')} <label class="inline" for="email_ssl">{L('ssl')}</label>
+            {!tpl_checkbox('email_tls', $fs->prefs['email_tls'], 'email_tls')} <label class="inline" for="email_tls">{L('tls')}</label>
+            <?php endif; ?>
+          </td>
+        </tr>
+        <tr>
+          <td><label for="smtpuser">{L('smtpuser')}</label></td>
+          <td>
+            <input id="smtpuser" name="smtp_user" class="text" type="text" size="40" maxlength="100" value="{$fs->prefs['smtp_user']}" />
+          </td>
+        </tr>
+        <tr>
+          <td><label for="smtppass">{L('smtppass')}</label></td>
+          <td>
+            <input id="smtppass" name="smtp_pass" class="text" type="text" size="40" maxlength="100" value="{$fs->prefs['smtp_pass']}" />
+          </td>
+        </tr>
+        <tr>
+          <th colspan="2"><hr />
+            {L('jabbernotify')}
+          </th>
+        </tr>
+        <tr>
+          <td><label for="jabberserver">{L('jabberserver')}</label></td>
+          <td>
+            <input id="jabberserver" class="text" type="text" name="jabber_server" size="25" maxlength="100" value="{$fs->prefs['jabber_server']}" />
+		<?php if(extension_loaded('openssl')) : ?>
+            {!tpl_checkbox('jabber_ssl', $fs->prefs['jabber_ssl'], 'jabber_ssl')} <label class="inline" for="jabber_ssl">{L('ssl')}</label>
+        <?php endif; ?>  
+		</td>
+        </tr>
+        <tr>
+          <td><label for="jabberport">{L('jabberport')}</label></td>
+          <td>
+            <input id="jabberport" class="text" type="text" name="jabber_port" size="40" maxlength="100" value="{$fs->prefs['jabber_port']}" />
+          </td>
+        </tr>
+        <tr>
+          <td><label for="jabberusername">{L('jabberuser')}</label></td>
+          <td>
+            <input id="jabberusername" class="text" type="text" name="jabber_username" size="40" maxlength="100" value="{$fs->prefs['jabber_username']}" />
+          </td>
+        </tr>
+        <tr>
+          <td><label for="jabberpassword">{L('jabberpass')}</label></td>
+          <td>
+            <input id="jabberpassword" name="jabber_password" class="text" type="text" size="40" maxlength="100" value="{$fs->prefs['jabber_password']}" />
+          </td>
+        </tr>
+      </table>
+    </div>
+
+    <div id="lookandfeel" class="tab">
+      <table class="box">
+        <tr>
+          <td><label for="globaltheme">{L('globaltheme')}</label></td>
+          <td>
+            <select id="globaltheme" name="global_theme">
+              {!tpl_options(Flyspray::listThemes(), $fs->prefs['global_theme'], true)}
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <td><label id="viscollabel">{L('visiblecolumns')}</label></td>
+          <td class="text">
+            <?php // Set the selectable column names
+            $columnnames = array('id', 'project', 'tasktype', 'category', 'severity',
+            'priority', 'summary', 'dateopened', 'status', 'openedby', 'private',
+            'assignedto', 'lastedit', 'reportedin', 'dueversion', 'duedate',
+            'comments', 'attachments', 'progress', 'dateclosed', 'os', 'votes');
+            $selectedcolumns = explode(" ", $fs->prefs['visible_columns']);
+            ?>
+            {!tpl_double_select('visible_columns', $columnnames, $selectedcolumns, true)}
+          </td>
+        </tr>
+      </table>
+    </div>
+
+    <div class="tbuttons">
+      <input type="hidden" name="action" value="globaloptions" />
+      <button type="submit">{L('saveoptions')}</button>
+
+      <button type="reset">{L('resetoptions')}</button>
+    </div>
+
+  </form>
+
+</div>

issuetracker/templates/admin.resolution.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('resolutionlist')}</h3>
+
+  <fieldset class="box">
+    <legend>{L('resolutions')}</legend>
+    <?php
+    $this->assign('list_type', 'resolution');
+    $this->assign('rows', $proj->listResolutions(true));
+    $this->display('common.list.tpl');
+    ?>
+  </fieldset>
+</div>

issuetracker/templates/admin.status.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('taskstatuses')}</h3>
+
+  <fieldset class="box">
+    <legend>{L('taskstatuses')}</legend>
+    <?php
+    $this->assign('list_type', 'status');
+    $this->assign('rows', $proj->listTaskStatuses(true));
+    $this->display('common.list.tpl');
+    ?>
+  </fieldset>
+</div>

issuetracker/templates/admin.tasktype.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('tasktypes')}</h3>
+
+  <fieldset class="box">
+    <legend>{L('tasktypes')}</legend>
+    <?php
+    $this->assign('list_type', 'tasktype');
+    $this->assign('rows', $proj->listTaskTypes(true));
+    $this->display('common.list.tpl');
+    ?>
+  </fieldset>
+</div>

issuetracker/templates/admin.users.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('edituser')} : {$theuser->infos['user_name']}</h3>
+  <fieldset><legend>{L('edituser')}</legend>
+  <?php $this->display('common.profile.tpl'); ?>
+</div>

issuetracker/templates/admin.version.tpl

+<div id="toolbox">
+  <h3>{L('admintoolboxlong')} :: {L('versionlist')}</h3>
+  <fieldset class="box">
+    <legend>{L('versions')}</legend>
+    <?php
+    $this->assign('list_type', 'version');
+    $this->assign('rows', $proj->listVersions(true));
+    $this->display('common.list.tpl');
+    ?>
+  </fieldset>
+</div>

issuetracker/templates/common.attachments.tpl

+  <?php
+  if ($attachments && $user->can_view_task($task_details)): ?>
+  <div class="attachments">
+  <?php foreach ($attachments as $attachment): ?>
+    <?php if (file_exists(BASEDIR . '/attachments/' . $attachment['file_name'])): ?>
+    <a title="{$attachment['orig_name']}" href="?getfile={$attachment['attachment_id']}">
+    <?php else: ?>
+    <del>
+    <?php endif; ?>
+      <?php
+      // Strip the mimetype to get the icon image name
+      list($main) = explode('/', $attachment['file_type']);
+      $imgdir = BASEDIR . "/themes/{$proj->prefs['theme_style']}/mime/";
+      $imgpath = "{$baseurl}themes/{$proj->prefs['theme_style']}/mime/";
+      if (file_exists($imgdir.$attachment['file_type'] . '.png')):
+      ?>
+      <img src="{$imgpath}{$attachment['file_type']}.png" alt="({$attachment['file_type']})" title="{$attachment['file_type']}" />
+      <?php else: ?>
+      <img src="{$imgpath}{$main}.png" alt="" title="{$attachment['file_type']}" />
+      <?php endif; ?>
+      &nbsp;&nbsp;
+      <?php if (utf8_strlen($attachment['orig_name']) > 30): ?>
+      {utf8_substr($attachment['orig_name'], 0, 29)}...
+      <?php else: ?>
+      {$attachment['orig_name']}
+      <?php endif; ?>
+      <?php if (file_exists(BASEDIR . '/attachments/' . $attachment['file_name'])): ?>
+      </a>
+      <?php else: ?>
+      </del>
+      <?php endif; ?>
+      <?php if ($attachment['file_size'] < 1000000): ?>
+      ({round($attachment['file_size']/1024,1)} {L('KiB')})
+      <?php else: ?>
+      ({round($attachment['file_size']/1024/1024,2)} {L('MiB')})
+      <?php endif; ?>
+    <br />
+  <?php endforeach; ?>
+  </div>
+  <?php elseif (count($attachments)): ?>
+  <div class="attachments">{L('attachnoperms')}</div>
+  <?php endif; ?>
+

issuetracker/templates/common.cat.tpl

+<fieldset class="box">
+  <legend>{L('categories')}</legend>
+  <p>{L('listnote')}</p>
+  <?php
+  $countlines = -1;
+  $categories = $proj->listCategories($proj->id, false, false, false);
+  $root = $categories[0];
+  unset($categories[0]);
+  
+  if (count($categories)) : ?>
+  <div id="controlBox">
+    <div class="grip"></div>
+    <div class="inner">
+        <a href="#" onclick="TableControl.up('catTable'); return false;"><img src="{$this->themeUrl()}/up.png" alt="Up" /></a>
+        <a href="#" onclick="TableControl.down('catTable'); return false;"><img src="{$this->themeUrl()}/down.png" alt="Down" /></a>
+        <a href="#" onclick="TableControl.shallower('catTable'); return false;"><img src="{$this->themeUrl()}/left.png" alt="Left" /></a>
+        <a href="#" onclick="TableControl.deeper('catTable'); return false;"><img src="{$this->themeUrl()}/right.png" alt="Right" /></a>
+    </div>
+  </div>
+  <?php endif; ?>
+    <form action="{CreateURL($do, 'cat', $proj->id)}" method="post">
+      <table class="list" id="catTable">
+         <thead>
+         <tr>
+           <th>{L('name')}</th>
+           <th>{L('owner')}</th>
+           <th>{L('show')}</th>
+           <th>{L('delete')}</th>
+         </tr>
+       </thead>
+       <tbody>
+        <?php
+        foreach ($categories as $row):
+            $countlines++;
+        ?>
+        <tr class="depth{$row['depth']}">
+          <td class="first">
+            <input type="hidden" name="lft[{$row['category_id']}]" value="{$row['lft']}" />
+            <input type="hidden" name="rgt[{$row['category_id']}]" value="{$row['rgt']}" />
+            <span class="depthmark">{!str_repeat('&rarr;', intval($row['depth']))}</span>
+            <input id="categoryname{$countlines}" class="text" type="text" size="15" maxlength="40" name="list_name[{$row['category_id']}]" 
+              value="{$row['category_name']}" />
+          </td>
+          <td title="{L('categoryownertip')}">
+            {!tpl_userselect('category_owner[' . $row['category_id'] . ']' . $countlines, $row['category_owner'], 'categoryowner' . $countlines)}
+          </td>
+          <td title="{L('listshowtip')}">
+            {!tpl_checkbox('show_in_list[' . $row['category_id'] . ']', $row['show_in_list'], 'showinlist'.$countlines)}
+          </td>
+          <td title="{L('listdeletetip')}">
+            <input id="delete{$row['category_id']}" type="checkbox"
+            <?php if ($row['used_in_tasks']): ?>disabled="disabled"<?php endif; ?>
+            name="delete[{$row['category_id']}]" value="1" />
+          </td>
+        </tr>
+        <?php endforeach; ?>
+        </tbody>
+        <?php if($countlines > -1): ?>
+        <tr>
+          <td colspan="3"></td>
+          <td class="buttons">
+            <input type="hidden" name="action" value="update_category" />
+            <input type="hidden" name="list_type" value="category" />
+            <input type="hidden" name="project_id" value="{$proj->id}" />
+            <button type="submit">{L('update')}</button>
+          </td>
+        </tr>
+        <?php endif; ?>
+      </table>
+      <?php if (count($categories)): ?>
+      <script type="text/javascript">
+        <?php
+            echo 'TableControl.create("catTable",{
+                controlBox: "controlBox",
+                tree: true,
+                spreadActiveClass: true
+            });';
+            echo 'new Draggable("controlBox",{
+                handle: "grip"
+            });';
+        ?>
+      </script>
+      <?php endif; ?>
+    </form>
+
+    <hr />
+
+    <!-- Form to add a new category to the list -->
+    <form action="{CreateURL($do, 'cat', $proj->id)}" method="post">
+      <table class="list">
+        <tr>
+          <td>
+            <input id="listnamenew" class="text" type="text" size="15" maxlength="40" name="list_name" />
+          </td>
+          <td title="{L('categoryownertip')}">
+            {!tpl_userselect('category_owner', Req::val('category_owner'), 'categoryownernew')}
+          </td>
+          <td title="{L('categoryparenttip')}">
+            <label for="parent_id">{L('parent')}</label>
+            <select id="parent_id" name="parent_id">
+              <option value="{$root['category_id']}">{L('notsubcategory')}</option>
+              {!tpl_options($proj->listCategories($proj->id, false), Req::val('parent_id'))}
+            </select>
+          </td>
+          <td class="buttons">
+            <input type="hidden" name="action" value="{$do}.add_category" />
+            <input type="hidden" name="area" value="{Req::val('area')}" />
+            <input type="hidden" name="project_id" value="{$proj->id}" />
+            <button type="submit">{L('addnew')}</button>
+          </td>
+        </tr>
+      </table>
+    </form>
+</fieldset>

issuetracker/templates/common.datepicker.tpl

+<?php if ($label): ?>
+<label for="{$name}">{$label}</label>
+<?php endif; ?>
+<input id="{$name}" type="text" class="text" size="10" name="{$name}" value="{$date}" />
+
+<a class="datelink" href="#" id="{$name}dateview"><img src="{$this->get_image('x-office-calendar')}" alt="{L('selectdate')}" /></a>
+<script type="text/javascript">Calendar.setup({daFormat: '{#$dateformat}',inputField: "{$name}", button: "{$name}dateview"});</script>

issuetracker/templates/common.dualselect.tpl

+<table class="double_select">
+  <tr>
+    <td class="c1">
+      <select id="l{$id}" multiple="multiple"
+        ondblclick="dualSelect(this, 'r', '{#$id}')">%s</select>
+    </td>
+    <td class="c2">
+      <button type="button" onmouseup="dualSelect('l', 'r', '{#$id}')">
+        add &#8594;
+      </button>
+      <br /><br />
+      <button type="button" onmouseup="dualSelect('r', 'l', '{#$id}')">
+         &#8592; del
+      </button>
+    </td>
+    <td class="c3">
+      <?php if($updown): ?><button type="button" onmouseup="selectMove('{#$id}', -1)">&#8593;</button><br /><?php endif; ?>
+      
+      <select id="r{$id}" multiple="multiple"
+        ondblclick="dualSelect(this, 'l', '{#$id}')">%s</select>
+      <br />
+      <?php if($updown): ?><button type="button" onmouseup="selectMove('{#$id}', 1)">&#8595;</button><?php endif; ?>
+      <input type="hidden" value="{join(' ', $selected)}" id="v{$id}" name="{$name}" />
+    </td>
+  </tr>
+</table>
+

issuetracker/templates/common.editattachments.tpl

+    <?php if ($attachments): ?>
+    <table class="attachments">
+      <thead><tr><th>{L('file')}</th><th>{L('size')}</th><th>{L('delete')}</th></tr></thead>
+      <?php foreach ($attachments as $attachment): ?>
+      <tr>
+        <td>
+          <?php if (file_exists(BASEDIR . '/attachments/' . $attachment['file_name'])): ?>
+          <a href="{$_SERVER['SCRIPT_NAME']}?getfile={$attachment['attachment_id']}" title="{$attachment['file_type']}">
+          <?php else: ?>
+          <del>
+          <?php endif; ?>
+          <?php
+          // Strip the mimetype to get the icon image name
+          list($main) = explode('/', $attachment['file_type']);
+          $imgdir = BASEDIR . "/themes/{$proj->prefs['theme_style']}/mime/";
+          $imgpath = "{$baseurl}themes/{$proj->prefs['theme_style']}/mime/";
+          if (file_exists($imgdir.$attachment['file_type'] . '.png')):
+          ?>
+          <img src="{$imgpath}{$attachment['file_type']}.png" alt="({$attachment['file_type']})" title="{$attachment['file_type']}" />
+          <?php else: ?>
+          <img src="{$imgpath}{$main}.png" alt="" title="{$attachment['file_type']}" />
+          <?php endif; ?>
+          &nbsp;&nbsp;{$attachment['orig_name']}
+          <?php if (file_exists(BASEDIR . '/attachments/' . $attachment['file_name'])): ?>
+          </a>
+          <?php else: ?>
+          </del>
+          <?php endif; ?>
+        </td>
+        <td>
+          <?php if ($attachment['file_size'] < 1000000): ?>
+          {round($attachment['file_size']/1024,1)} {L('KiB')}
+          <?php else: ?>
+          {round($attachment['file_size']/1024/1024,2)} {L('MiB')}
+          <?php endif; ?>
+        </td>
+        <td>
+          <input type="checkbox" {!tpl_disableif(!$user->perms('delete_attachments'))} name="delete_att[]" value="{$attachment['attachment_id']}" />
+        </td>
+      </tr>
+      <?php endforeach; ?>
+    </table>
+    <?php endif; ?>

issuetracker/templates/common.editgroup.tpl

+<fieldset class="box"> <legend>{L('editgroup')}</legend>
+    <form action="{$baseurl}index.php" method="get">
+        <div>
+            <label for="selectgroup">{L('editgroup')}</label>
+            <select name="id" id="selectgroup">{!tpl_options(Flyspray::ListGroups($proj->id), Req::num('id'))}</select>
+            <button type="submit">{L('edit')}</button>
+            <input type="hidden" name="do" value="{Req::val('do')}" />
+            <input type="hidden" name="area" value="editgroup" />
+        </div>
+    </form>
+    <hr />
+  <form action="{CreateURL('editgroup', Req::num('id'), $do)}" method="post">
+    <table class="box">
+      <tr>
+        <td>
+          <label for="groupname">{L('groupname')}</label>
+        </td>
+        <td><input id="groupname" class="text" type="text" name="group_name" size="20" maxlength="20" value="{Req::val('group_name', $group_details['group_name'])}" /></td>
+      </tr>
+      <tr>
+        <td><label for="groupdesc">{L('description')}</label></td>
+        <td><input id="groupdesc" class="text" type="text" name="group_desc" size="50" maxlength="100" value="{Req::val('group_desc', $group_details['group_desc'])}" /></td>
+      </tr>
+      <?php if ($group_details['group_id'] == 1): ?>
+      <tr>
+        <td colspan="2">{L('notshownforadmin')}</td>
+      </tr>
+      <?php else: ?>
+      <tr>
+        <td><label for="projectmanager">{L('projectmanager')}</label></td>
+        <td>{!tpl_checkbox('manage_project', Req::val('manage_project', !Req::val('action') && $group_details['manage_project']), 'projectmanager')}</td>
+      </tr>
+      <tr>
+        <td><label for="viewtasks">{L('viewtasks')}</label></td>
+        <td>{!tpl_checkbox('view_tasks', Req::val('view_tasks', !Req::val('action') && $group_details['view_tasks']), 'viewtasks')}</td>
+      </tr>
+      <tr>
+        <td><label for="canopenjobs">{L('opennewtasks')}</label></td>
+        <td>{!tpl_checkbox('open_new_tasks', Req::val('open_new_tasks', !Req::val('action') && $group_details['open_new_tasks']), 'canopenjobs')}</td>
+      </tr>
+      <tr>
+        <td><label for="modifyowntasks">{L('modifyowntasks')}</label></td>
+        <td>{!tpl_checkbox('modify_own_tasks', Req::val('modify_own_tasks', !Req::val('action') && $group_details['modify_own_tasks']), 'modifyowntasks')}</td>
+      </tr>
+      <tr>
+        <td><label for="modifyalltasks">{L('modifyalltasks')}</label></td>
+        <td>{!tpl_checkbox('modify_all_tasks', Req::val('modify_all_tasks', !Req::val('action') && $group_details['modify_all_tasks']), 'modifyalltasks')}</td>
+      </tr>
+      <tr>
+        <td><label for="viewcomments">{L('viewcomments')}</label></td>
+        <td>{!tpl_checkbox('view_comments', Req::val('view_comments', !Req::val('action') && $group_details['view_comments']), 'viewcomments')}</td>
+      </tr>
+      <tr>
+        <td><label for="canaddcomments">{L('addcomments')}</label></td>
+        <td>{!tpl_checkbox('add_comments', Req::val('add_comments', !Req::val('action') && $group_details['add_comments']), 'canaddcomments')}</td>
+      </tr>
+      <tr>
+        <td><label for="editowncomments">{L('editowncomments')}</label></td>
+        <td>{!tpl_checkbox('edit_own_comments', Req::val('edit_own_comments', !Req::val('action') && $group_details['edit_own_comments']), 'editowncomments')}</td>
+      </tr>
+      <tr>
+        <td><label for="editcomments">{L('editcomments')}</label></td>
+        <td>{!tpl_checkbox('edit_comments', Req::val('edit_comments', !Req::val('action') && $group_details['edit_comments']), 'editcomments')}</td>
+      </tr>
+      <tr>
+        <td><label for="deletecomments">{L('deletecomments')}</label></td>
+        <td>{!tpl_checkbox('delete_comments', Req::val('delete_comments', !Req::val('action') && $group_details['delete_comments']), 'deletecomments')}</td>
+      </tr>
+      <tr>
+        <td><label for="createattachments">{L('createattachments')}</label></td>
+        <td>{!tpl_checkbox('create_attachments', Req::val('create_attachments', !Req::val('action') && $group_details['create_attachments']), 'createattachments')}</td>
+      </tr>
+      <tr>
+        <td><label for="deleteattachments">{L('deleteattachments')}</label></td>
+        <td>{!tpl_checkbox('delete_attachments', Req::val('delete_attachments', !Req::val('action') && $group_details['delete_attachments']), 'deleteattachments')}</td>
+      </tr>
+      <tr>
+        <td><label for="viewhistory">{L('viewhistory')}</label></td>
+        <td>{!tpl_checkbox('view_history', Req::val('view_history', !Req::val('action') && $group_details['view_history']), 'viewhistory')}</td>
+      </tr>
+      <tr>
+        <td><label for="closeowntasks">{L('closeowntasks')}</label></td>
+        <td>{!tpl_checkbox('close_own_tasks', Req::val('close_own_tasks', !Req::val('action') && $group_details['close_own_tasks']), 'closeowntasks')}</td>
+      </tr>
+      <tr>
+        <td><label for="closeothertasks">{L('closeothertasks')}</label></td>
+        <td>{!tpl_checkbox('close_other_tasks', Req::val('close_other_tasks', !Req::val('action') && $group_details['close_other_tasks']), 'closeothertasks')}</td>
+      </tr>
+      <tr>
+        <td><label for="assigntoself">{L('assigntoself')}</label></td>
+        <td>{!tpl_checkbox('assign_to_self', Req::val('assign_to_self', !Req::val('action') && $group_details['assign_to_self']), 'assigntoself')}</td>
+      </tr>
+       <tr>
+        <td><label for="assignotherstoself">{L('assignotherstoself')}</label></td>
+        <td>{!tpl_checkbox('assign_others_to_self', Req::val('assign_others_to_self', !Req::val('action') && $group_details['assign_others_to_self']), 'assignotherstoself')}</td>
+      </tr>
+      <tr>
+        <td><label for="addtoassignees">{L('addtoassignees')}</label></td>
+        <td>{!tpl_checkbox('add_to_assignees', Req::val('add_to_assignees', !Req::val('action') && $group_details['add_to_assignees']), 'addtoassignees')}</td>
+      </tr>
+      <tr>
+        <td><label for="viewreports">{L('viewreports')}</label></td>
+        <td>{!tpl_checkbox('view_reports', Req::val('view_reports', !Req::val('action') && $group_details['view_reports']), 'viewreports')}</td>
+      </tr>
+      <tr>
+        <td><label for="canvote">{L('canvote')}</label></td>
+        <td>{!tpl_checkbox('add_votes', Req::val('add_votes', !Req::val('action') && $group_details['add_votes']), 'canvote')}</td>
+      </tr>
+      <tr>
+        <td><label for="editassignments">{L('editassignments')}</label></td>
+        <td>{!tpl_checkbox('edit_assignments', Req::val('edit_assignments', !Req::val('action') && $group_details['edit_assignments']), 'editassignments')}</td>
+      </tr>
+      <tr>
+        <td><label for="show_as_assignees">{L('showasassignees')}</label></td>
+        <td>{!tpl_checkbox('show_as_assignees', Req::val('show_as_assignees', !Req::val('action') && $group_details['show_as_assignees']), 'show_as_assignees')}</td>
+      </tr>
+
+      <?php if (!$proj->id): ?>
+      <tr>
+        <td><label for="groupopen">{L('groupenabled')}</label></td>
+        <td>{!tpl_checkbox('group_open', Req::val('group_open', !Req::val('action') && $group_details['group_open']), 'groupopen')}</td>
+      </tr>
+      <?php endif; ?>
+      <?php endif; ?>
+      <?php if ($group_details['group_id'] != '1'): ?>
+      <tr>
+        <td><label><input type="checkbox" name="delete_group" /> {L('deletegroup')}</label></td>
+        <td><select name="move_to">
+              {!tpl_options( array_merge( ($proj->id) ? array(L('nogroup')) : array(), Flyspray::listGroups($proj->id)), null, false, null, $group_details['group_id'])}
+            </select>
+        </td>
+      </tr>
+      <?php endif; ?>
+      <tr>
+        <td><label for="add_user">{L('addusergroup')}</label></td>
+        <td>
+            {!tpl_userselect('uid', '', 'add_user')}
+        </td>
+      </tr>
+      <tr>
+        <td colspan="2" class="buttons">
+          <input type="hidden" name="project_id" value="{$proj->id}" />
+          <input type="hidden" name="action" value="{Req::val('action', $do . '.editgroup')}" />
+          <input type="hidden" name="area" value="editgroup" />
+          <input type="hidden" name="group_id" value="{$group_details['group_id']}" />
+          <button type="submit">{L('updatedetails')}</button>
+        </td>
+      </tr>
+    </table>
+  </form>
+
+  <hr />
+
+  <form action="{CreateURL('editgroup', Req::num('id'), $do)}" method="post">
+   <div>
+    <h3>{L('groupmembers')}</h3>
+    <table id="manage_users_in_groups" class="userlist">
+    <tr>
+      <th>
+        <a href="javascript:ToggleSelected('manage_users_in_groups')">
+          <img title="{L('toggleselected')}" alt="{L('toggleselected')}" src="{$this->get_image('kaboodleloop')}" width="16" height="16" />
+        </a>
+      </th>
+      <th>{L('username')}</th>
+      <th>{L('realname')}</th>
+      <th>{L('accountenabled')}</th>
+    </tr>
+    <?php
+    foreach($proj->listUsersIn($group_details['group_id']) as $usr): ?>
+    <tr>
+      <td class="ttcolumn">{!tpl_checkbox('users['.$usr['user_id'].']')}</td>
+      <td><a href="{CreateURL('edituser', $usr['user_id'])}">{$usr['user_name']}</a></td>
+      <td>{$usr['real_name']}</td>
+      <?php if ($usr['account_enabled']) : ?>
+      <td class="imgcol"><img src="{$this->get_image('button_ok')}" alt="{L('yes')}" /></td>
+      <?php else: ?>
+      <td class="imgcol"><img src="{$this->get_image('button_cancel')}" alt="{L('no')}" /></td>
+      <?php endif; ?>
+    </tr>
+    <?php
+    $users_in[] = $usr['user_id'];
+    endforeach;
+    ?>
+
+    <tr>
+      <td colspan="4">
+        <button type="submit">{L('moveuserstogroup')}</button>
+        <select class="adminlist" name="switch_to_group">
+          <?php if ($proj->id): ?>
+          <option value="0">{L('nogroup')}</option>
+          <?php endif; ?>
+          {!tpl_options(Flyspray::listGroups($proj->id), null, false, null, $group_details['group_id'])}
+        </select>
+      </td>
+    </tr>
+  </table>
+  <input type="hidden" name="project_id" value="{$proj->id}" />
+  <input type="hidden" name="action" value="movetogroup" />
+  <input type="hidden" name="old_group" value="{$group_details['group_id']}" />
+  </div>
+ </form>
+</fieldset>

issuetracker/templates/common.list.tpl

+<p>{L('listnote')}</p>
+<?php if (count($rows)): ?>
+<div id="controlBox">
+    <div class="grip"></div>
+    <div class="inner">
+        <a href="#" onclick="TableControl.up('listTable'); return false;"><img src="{$this->themeUrl()}/up.png" alt="Up" /></a>
+        <a href="#" onclick="TableControl.down('listTable'); return false;"><img src="{$this->themeUrl()}/down.png" alt="Down" /></a>
+    </div>
+</div>
+<?php endif; ?>
+<form action="{CreateURL($do, $list_type, $proj->id)}" method="post">
+  <table class="list" id="listTable">
+   <thead>
+     <tr>
+       <th>{L('name')}</th>
+       <th>{L('order')}</th>
+       <th>{L('show')}</th>
+       <?php if ($list_type == 'version'): ?><th>{L('tense')}</th><?php endif; ?>
+       <th>{L('delete')}</th>
+     </tr>
+   </thead>
+   <tbody>
+    <?php
+    $countlines = -1;
+    foreach ($rows as $row):
+    $countlines++; ?>
+    <tr>
+      <td class="first">
+        <input id="listname{$countlines}" class="text" type="text" size="15" maxlength="40" name="list_name[{$row[$list_type.'_id']}]"
+          value="{$row[$list_type.'_name']}" />
+      </td>
+      <td title="{L('ordertip')}">
+        <input id="listposition{$countlines}" class="text" type="text" size="3" maxlength="3" name="list_position[{$row[$list_type.'_id']}]" value="{$row['list_position']}" />
+      </td>
+      <td title="{L('showtip')}">
+        {!tpl_checkbox('show_in_list[' . $row[$list_type.'_id'] . ']', $row['show_in_list'], 'showinlist'.$countlines)}
+      </td>
+      <?php if ($list_type == 'version'): ?>
+      <td title="{L('listtensetip')}">
+        <select id="tense{$countlines}" name="{$list_type}_tense[{$row[$list_type.'_id']}]">
+          {!tpl_options(array(1=>L('past'), 2=>L('present'), 3=>L('future')), $row[$list_type.'_tense'])}
+        </select>
+      </td>
+      <?php endif; ?>
+      <td title="{L('deletetip')}">
+        <input id="delete{$row[$list_type.'_id']}" type="checkbox"
+        <?php if ($row['used_in_tasks'] || ($list_type == 'status' && $row[$list_type.'_id'] < 7) || ($list_type == 'resolution' && $row[$list_type.'_id'] == 6)): ?>
+        disabled="disabled"
+        <?php endif; ?>
+        name="delete[{$row[$list_type.'_id']}]" value="1" />
+      </td>
+    </tr>
+    <?php endforeach; ?>
+    </tbody>
+    <?php if(count($rows)): ?>
+    <tr>
+      <td colspan="3"></td>
+      <td class="buttons">
+        <?php if ($list_type == 'version'): ?>
+        <input type="hidden" name="action" value="update_version_list" />
+        <?php else: ?>
+        <input type="hidden" name="action" value="update_list" />
+        <?php endif; ?>
+        <input type="hidden" name="list_type" value="{$list_type}" />
+        <input type="hidden" name="project" value="{$proj->id}" />
+        <button type="submit">{L('update')}</button>
+      </td>
+    </tr>
+    <?php endif; ?>
+  </table>
+  <?php if (count($rows)): ?>
+  <script type="text/javascript">
+        <?php
+            echo 'TableControl.create("listTable",{
+                controlBox: "controlBox",
+                tree: false
+            });';
+            echo 'new Draggable("controlBox",{
+                handle: "grip"
+            });';
+        ?>
+  </script>
+  <?php endif; ?>
+</form>
+<hr />
+<form action="{CreateURL($do, $list_type, $proj->id)}" method="post">
+  <table class="list">
+    <tr>
+      <td>
+        <?php if ($list_type == 'version'): ?>
+        <input type="hidden" name="action" value="{$do}.add_to_version_list" />
+        <?php else: ?>
+        <input type="hidden" name="action" value="{$do}.add_to_list" />
+        <?php endif; ?>
+        <input type="hidden" name="list_type" value="{$list_type}" />
+        <?php if ($proj->id): ?>
+        <input type="hidden" name="project_id" value="{$proj->id}" />
+        <?php endif; ?>
+        <input type="hidden" name="area" value="{Req::val('area')}" />
+        <input type="hidden" name="do" value="{Req::val('do')}" />
+        <input id="listnamenew" class="text" type="text" size="15" maxlength="40" value="{Req::val('list_name')}" name="list_name" />
+      </td>
+      <td>
+        <input id="listpositionnew" class="text" type="text" size="3" maxlength="3" value="{Req::val('list_position')}" name="list_position" />
+      </td>
+      <td>
+        <input id="showinlistnew" type="checkbox" name="show_in_list" checked="checked" disabled="disabled" />
+      </td>
+      <?php if ($list_type == 'version'): ?>
+      <td title="{L('listtensetip')}">
+        <select id="tensenew" name="{$list_type}_tense">
+          {!tpl_options(array(1=>L('past'), 2=>L('present'), 3=>L('future')), 2)}
+        </select>
+      </td>
+      <?php endif; ?>
+      <td class="buttons">
+        <input type="hidden" name="project" value="{$proj->id}" />
+        <button type="submit">{L('addnew')}</button>
+      </td>
+    </tr>
+  </table>
+</form>

issuetracker/templates/common.multiuserselect.tpl

+                <div>
+                   <label for="find_user" class="inline" style="margin:0;padding:0;">{L('find')}</label>:
+                   <input type="text" style="vertical-align:middle" class="text" value="{Post::val('find_user')}" name="find_user" id="find_user" onkeyup="return entercheck(event)" />
+                   <a href="javascript:unselectAll()">{L('noone')}</a>
+                   <br />
+
+                   <select size="8" style="width:200px;" name="rassigned_to[]" id="rassigned_to" multiple="multiple">
+                     <?php foreach ($userlist as $group => $users): ?>
+                        <optgroup label="{$group}">
+                        <?php foreach ($users as $info): ?>
+                        <option value="{$info[0]}" <?php if (in_array($info[0], $assignees)): ?>selected="selected"<?php endif; ?>>{$info[1]}</option>
+                        <?php endforeach; ?>
+                        </optgroup>
+                     <?php endforeach; ?>
+                   </select>
+				</div>
+                <script type="text/javascript">
+                resetOption = null;
+                function entercheck(e)
+                {
+                    // Find user and select it
+                    if ($('find_user').value.length < 1) {
+                        if (resetOption != null) {
+                            resetOption.selected = false;
+                        }
+                    } else {
+                        var options = $('rassigned_to').options;
+                        for (var i = 0; i < options.length; i++) {
+                            if (options[i].text.toLowerCase().indexOf($('find_user').value.toLowerCase()) >= 0) {
+                                if (resetOption != null) {
+                                    resetOption.selected = false;
+                                }
+                                if (options[i].selected == false) {
+                                    resetOption = options[i];
+                                }
+                                options[i].selected=false; // focus
+                                options[i].selected=true;
+                                return true;
+                            }
+                        }
+                    }
+                }
+                
+                function unselectAll()
+				{
+					var options = $('rassigned_to').options;
+                    for (var i = 0; i < options.length; i++) {
+						options[i].selected=false;
+					}
+				}
+                </script>

issuetracker/templates/common.newgroup.tpl

+<fieldset><legend>{L('createnewgroup')}</legend>
+
+<form action="{CreateUrl($do, 'newgroup', $proj->id)}" method="post" id="newgroup">
+  <table class="box">
+    <tr>
+      <td><label for="groupname">{L('groupname')}</label></td>
+      <td><input id="groupname" class="required text" type="text" value="{Req::val('group_name')}" name="group_name" size="20" maxlength="20" /></td>
+    </tr>
+    <tr>
+      <td><label for="groupdesc">{L('description')}</label></td>
+      <td><input id="groupdesc" class="text" type="text" value="{Req::val('group_desc')}" name="group_desc" size="50" maxlength="100" /></td>
+    </tr>
+    <tr>
+      <td><label for="manageproject">{L('projectmanager')}</label></td>
+      <td>{!tpl_checkbox('manage_project', Req::val('manage_project'), 'manageproject')}</td>
+    </tr>
+    <tr>
+      <td><label for="viewtasks">{L('viewtasks')}</label></td>
+      <td>{!tpl_checkbox('view_tasks', Req::val('view_tasks', Req::val('action') != 'newgroup.newgroup'), 'viewtasks')}</td>
+    </tr>
+    <tr>
+      <td><label for="opennewtasks">{L('opennewtasks')}</label></td>
+      <td>{!tpl_checkbox('open_new_tasks', Req::val('open_new_tasks', Req::val('action') != 'newgroup.newgroup'), 'opennewtasks')}</td>
+    </tr>
+    <tr>
+      <td><label for="modifyowntasks">{L('modifyowntasks')}</label></td>
+      <td>{!tpl_checkbox('modify_own_tasks', Req::val('modify_own_tasks'), 'modifyowntasks')}</td>
+    </tr>
+    <tr>
+      <td><label for="modifyalltasks">{L('modifyalltasks')}</label></td>
+      <td>{!tpl_checkbox('modify_all_tasks', Req::val('modify_all_tasks'), 'modifyalltasks')}</td>
+    </tr>
+    <tr>
+      <td><label for="viewcomments">{L('viewcomments')}</label></td>
+      <td>{!tpl_checkbox('view_comments', Req::val('view_comments', Req::val('action') != 'newgroup.newgroup'), 'viewcomments')}</td>
+    </tr>
+    <tr>
+      <td><label for="addcomments">{L('addcomments')}</label></td>
+      <td>{!tpl_checkbox('add_comments', Req::val('add_comments'), 'addcomments')}</td>
+    </tr>
+    <tr>
+      <td><label for="editowncomments">{L('editowncomments')}</label></td>
+      <td>{!tpl_checkbox('edit_own_comments', Req::val('edit_own_comments'), 'editowncomments')}</td>
+    </tr>
+    <tr>
+      <td><label for="editcomments">{L('editcomments')}</label></td>
+      <td>{!tpl_checkbox('edit_comments', Req::val('edit_comments'), 'editcomments')}</td>
+    </tr>
+    <tr>
+      <td><label for="deletecomments">{L('deletecomments')}</label></td>
+      <td>{!tpl_checkbox('delete_comments', Req::val('delete_comments'), 'deletecomments')}</td>
+    </tr>
+    <tr>
+      <td><label for="createattachments">{L('createattachments')}</label></td>
+      <td>{!tpl_checkbox('create_attachments', Req::val('create_attachments'), 'createattachments')}</td>
+    </tr>
+    <tr>
+      <td><label for="deleteattachments">{L('deleteattachments')}</label></td>
+      <td>{!tpl_checkbox('delete_attachments', Req::val('delete_attachments'), 'deleteattachments')}</td>
+    </tr>
+    <tr>
+      <td><label for="viewhistory">{L('viewhistory')}</label></td>
+      <td>{!tpl_checkbox('view_history', Req::val('view_history', Req::val('action') != 'newgroup.newgroup'), 'viewhistory')}</td>
+    </tr>
+    <tr>
+      <td><label for="closeowntasks">{L('closeowntasks')}</label></td>
+      <td>{!tpl_checkbox('close_own_tasks', Req::val('close_own_tasks'), 'closeowntasks')}</td>
+    </tr>
+    <tr>
+      <td><label for="closeothertasks">{L('closeothertasks')}</label></td>
+      <td>{!tpl_checkbox('close_other_tasks', Req::val('close_other_tasks'), 'closeothertasks')}</td>
+    </tr>
+    <tr>
+      <td><label for="assigntoself">{L('assigntoself')}</label></td>
+      <td>{!tpl_checkbox('assign_to_self', Req::val('assign_to_self'), 'assigntoself')}</td>
+    </tr>
+    <tr>
+      <td><label for="assignotherstoself">{L('assignotherstoself')}</label></td>
+      <td>{!tpl_checkbox('assign_others_to_self', Req::val('assign_others_to_self'), 'assignotherstoself')}</td>
+    </tr>
+    <tr>
+      <td><label for="addtoassignees">{L('addtoassignees')}</label></td>
+      <td>{!tpl_checkbox('add_to_assignees', Req::val('add_to_assignees'), 'addtoassignees')}</td>
+    </tr>
+    <tr>
+      <td><label for="viewreports">{L('viewreports')}</label></td>
+      <td>{!tpl_checkbox('view_reports', Req::val('view_reports', Req::val('action') != 'newgroup.newgroup'), 'viewreports')}</td>
+    </tr>
+    <tr>
+      <td><label for="canvote">{L('canvote')}</label></td>
+      <td>{!tpl_checkbox('add_votes', Req::val('add_votes', Req::val('action') != 'newgroup.newgroup'), 'canvote')}</td>
+    </tr>
+    <tr>
+      <td><label for="editassignments">{L('editassignments')}</label></td>
+      <td>{!tpl_checkbox('edit_assignments', Req::val('edit_assignments'), 'editassignments')}</td>
+    </tr>
+    <tr>
+      <td><label for="show_as_assignees">{L('showasassignees')}</label></td>
+      <td>{!tpl_checkbox('show_as_assignees', Req::val('show_as_assignees'), 'show_as_assignees')}</td>
+    </tr>
+    <?php if (!$proj->id): ?>
+    <tr>
+      <td><label for="groupopen">{L('groupenabled')}</label></td>
+      <td>{!tpl_checkbox('group_open', Req::val('group_open', Req::val('action') != 'newgroup.newgroup'), 'groupopen')}</td>
+    </tr>
+    <?php endif; ?>
+    <tr>
+      <td colspan="2" class="buttons">
+        <input type="hidden" name="action" value="<?php if ($proj->id): ?>pm<?php else: ?>admin<?php endif; ?>.newgroup" />
+        <input type="hidden" name="project_id" value="{Req::val('project')}" />
+        <button type="submit">{L('addthisgroup')}</button>
+      </td>
+    </tr>
+  </table>
+</form>
+</fieldset>

issuetracker/templates/common.newuser.tpl

+<fieldset class="box">
+<legend>{L('registernewuser')}</legend>
+
+<form action="<?php if ($do == 'admin'): ?>{CreateURL($do, 'newuser')}<?php else: ?>{$_SERVER['SCRIPT_NAME']}<?php endif; ?>" method="post" id="registernewuser">
+  <table class="box">
+    <tr>
+      <td>
+        <?php if ($do == 'admin'): ?>
+        <input type="hidden" name="action" value="admin.newuser" />
+        <input type="hidden" name="do" value="admin" />
+        <input type="hidden" name="area" value="newuser" />
+        <?php else: ?>
+        <input type="hidden" name="action" value="register.newuser" />
+        <?php endif; ?>
+        <label for="username">{L('username')}</label>
+      </td>
+      <td><input id="username" name="user_name" value="{Req::val('user_name')}" class="required text" type="text" size="20" maxlength="32" onblur="checkname(this.value);" />
+      <br /><span id="errormessage"></span></td>
+    </tr>
+    <tr>
+      <td><label for="userpass">{L('password')}</label></td>
+      <td><input id="userpass" class="password" name="user_pass" value="{Req::val('user_pass')}" type="password" size="20" maxlength="100" /> <em>{L('minpwsize')}</em></td>
+    </tr>
+    <tr>
+      <td><label for="userpass2">{L('confirmpass')}</label></td>
+      <td>
+        <input id="userpass2" class="password" name="user_pass2" value="{Req::val('user_pass2')}" type="password" size="20" maxlength="100" /><br />
+        {L('leaveemptyauto')}
+      </td>
+    </tr>
+    <tr>
+      <td><label for="realname">{L('realname')}</label></td>
+      <td><input id="realname" name="real_name" class="required text" value="{Req::val('real_name')}" type="text" size="20" maxlength="100" /></td>
+    </tr>
+    <tr>
+      <td><label for="emailaddress">{L('emailaddress')}</label></td>
+      <td><input id="emailaddress" name="email_address" class="text required" value="{Req::val('email_address')}" type="text" size="20" maxlength="100" /></td>
+    </tr>
+    <tr>
+      <td><label for="jabberid">{L('jabberid')}</label></td>
+      <td><input id="jabberid" name="jabber_id" class="text" type="text" value="{Req::val('jabber_id')}" size="20" maxlength="100" /></td>
+    </tr>
+    <tr>
+      <td><label for="notify_type">{L('notifications')}</label></td>
+      <td>
+        <select id="notify_type" name="notify_type">
+          {!tpl_options($fs->GetNotificationOptions(), Req::val('notify_type'))}
+        </select>
+      </td>
+    </tr>
+    <tr>
+      <td><label for="time_zone">{L('timezone')}</label></td>
+      <td>
+        <select id="time_zone" name="time_zone">
+          <?php
+            $times = array();
+            for ($i = -12; $i <= 13; $i++) {
+              $times[$i] = L('GMT') . (($i == 0) ? ' ' : (($i > 0) ? '+' . $i : $i));
+            }
+          ?>
+          {!tpl_options($times, Req::val('time_zone', 0))}
+        </select>
+      </td>
+    </tr>
+    <?php if (isset($groups)): ?>
+    <tr>
+      <td><label for="groupin">{L('globalgroup')}</label></td>
+      <td>
+        <select id="groupin" class="adminlist" name="group_in">
+          {!tpl_options($groups, Req::val('group_in'))}
+        </select>
+      </td>
+    </tr>
+    <?php endif; ?>
+  </table>
+  <p><button type="submit" id="buSubmit">{L('registeraccount')}</button></p>
+</form>
+</fieldset>

issuetracker/templates/common.profile.tpl

+  <form action="<?php if ($do == 'myprofile'): ?>{CreateUrl('myprofile')}<?php else: ?>{CreateUrl('edituser', $theuser->id)}<?php endif; ?>" method="post">
+    <table class="box">
+      <tr>
+        <td><label for="realname">{L('realname')}</label></td>
+        <td>
+          <input id="realname" class="text" type="text" name="real_name" size="50" maxlength="100"
+            value="{Req::val('real_name', $theuser->infos['real_name'])}" />
+        </td>
+      </tr>
+      <tr>
+        <td><label for="emailaddress">{L('emailaddress')}</label></td>
+        <td>
+          <input id="emailaddress" class="text" type="text" name="email_address" size="50" maxlength="100"
+            value="{Req::val('email_address', $theuser->infos['email_address'])}" />
+        </td>
+      </tr>
+      <tr>
+        <td><label for="jabberid">{L('jabberid')}</label></td>
+        <td>
+          <input id="jabberid" class="text" type="text" name="jabber_id" size="50" maxlength="100"
+            value="{Req::val('jabber_id', $theuser->infos['jabber_id'])}" />
+          <input type="hidden" name="old_jabber_id" value="{$theuser->infos['jabber_id']}" />
+        </td>
+      </tr>
+      <tr>
+        <td><label for="notifytype">{L('notifytype')}</label></td>
+        <td>
+          <select id="notifytype" name="notify_type">
+            {!tpl_options($fs->GetNotificationOptions(),
+                                Req::val('notify_type', $theuser->infos['notify_type']))}
+          </select>
+          {!tpl_checkbox('notify_own', Req::val('notify_own', !Post::val('action') && $theuser->infos['notify_own']), 'notify_own')}
+          <label class="left notable" for="notify_own">{L('notifyown')}</label>
+        </td>
+      </tr>
+      <tr>
+        <td><label for="dateformat">{L('dateformat')}</label></td>
+        <td>
+          <input id="dateformat" class="text" name="dateformat" type="text" size="40" maxlength="30"
+            value="{Req::val('dateformat', $theuser->infos['dateformat'])}" />
+        </td>
+      </tr>
+      <tr>
+        <td><label for="dateformat_extended">{L('dateformat_extended')}</label></td>
+        <td>
+          <input id="dateformat_extended" class="text" name="dateformat_extended" type="text"
+            size="40" maxlength="30" value="{Req::val('dateformat_extended', $theuser->infos['dateformat_extended'])}" />
+        </td>
+      </tr>
+      <tr>
+        <td><label for="tasks_perpage">{L('tasksperpage')}</label></td>
+        <td>
+          <select name="tasks_perpage" id="tasks_perpage">
+            {!tpl_options(array(10, 25, 50, 100, 250), Req::val('tasks_perpage', $theuser->infos['tasks_perpage']), true)}
+          </select>
+        </td>
+      </tr>
+      <tr>
+        <td><label for="time_zone">{L('timezone')}</label></td>
+        <td>
+          <select id="time_zone" name="time_zone">
+            <?php
+              $times = array();
+              for ($i = -12; $i <= 13; $i++) {
+                $times[$i] = L('GMT') . (($i == 0) ? ' ' : (($i > 0) ? '+' . $i : $i));
+              }
+            ?>
+            {!tpl_options($times, Req::val('time_zone', $theuser->infos['time_zone']))}
+          </select>
+        </td> 
+      </tr>
+      <tr>
+        <td colspan="2"><hr /></td>
+      </tr>
+      <?php if ($user->perms('is_admin')): ?>
+      <tr>
+        <td><label for="accountenabled">{L('accountenabled')}</label></td>
+        <td>{!tpl_checkbox('account_enabled', Req::val('account_enabled', !Post::val('action') && $theuser->infos['account_enabled']), 'accountenabled')}</td>
+      </tr>
+      <tr>
+        <td><label for="delete_user">{L('deleteuser')}</label></td>
+        <td>{!tpl_checkbox('delete_user', false, 'delete_user')}</td>
+      </tr>
+      <?php endif; ?>
+      <tr>
+        <td><label for="groupin">{L('globalgroup')}</label></td>
+        <td>
+          <select id="groupin" class="adminlist" name="group_in" {tpl_disableif(!$user->perms('is_admin'))}>
+            {!tpl_options($groups, Req::val('group_in', $theuser->infos['global_group']))}
+          </select>
+          <input type="hidden" name="old_global_id" value="{$theuser->infos['global_group']}" />
+        </td>
+      </tr>
+      <?php if ($proj->id): ?>
+      <tr>
+        <td><label for="projectgroupin">{L('projectgroup')}</label></td>
+        <td>
+          <select id="projectgroupin" class="adminlist" name="project_group_in" {tpl_disableif(!$user->perms('manage_project'))}>
+            {!tpl_options(array_merge($project_groups, array(0 => array('group_name' => L('none'), 0 => 0, 'group_id' => 0, 1 => L('none')))), Req::val('project_group_in', $theuser->perms('project_group')))}
+          </select>
+          <input type="hidden" name="old_project_id" value="{$theuser->perms('project_group')}" />
+        </td>
+      </tr>
+      <?php endif; ?>
+      <tr>
+        <td colspan="2"><hr /></td>
+      </tr>
+      <?php if (!$user->perms('is_admin') || $user->id == $theuser->id): ?>
+      <tr>
+        <td><label for="oldpass">{L('oldpass')}</label></td>
+        <td><input id="oldpass" class="password" type="password" name="oldpass" value="{Req::val('oldpass')}" size="40" maxlength="100" /></td>
+      </tr>
+      <?php endif; ?>
+      <tr>
+        <td><label for="changepass">{L('changepass')}</label></td>
+        <td><input id="changepass" class="password" type="password" name="changepass" value="{Req::val('changepass')}" size="40" maxlength="100" /></td>
+      </tr>
+      <tr>
+        <td><label for="confirmpass">{L('confirmpass')}</label></td>
+        <td><input id="confirmpass" class="password" type="password" name="confirmpass" value="{Req::val('confirmpass')}" size="40" maxlength="100" /></td>
+      </tr>
+      <tr>
+        <td colspan="2" class="buttons">
+          <input type="hidden" name="action" value="{Req::val('action', $do . '.edituser')}" />
+          <?php if (Req::val('area') || $do == 'admin'): ?><input type="hidden" name="area" value="users" /><?php endif; ?>
+          <input type="hidden" name="user_id" value="{$theuser->id}" />
+          <button type="submit">{L('updatedetails')}</button>
+        </td>
+      </tr>
+    </table>
+  </form>
+</fieldset>

issuetracker/templates/common.userselect.tpl

+<input class="users text" {!join_attrs($attrs)} type="text" name="{$name}" <?php if ($id): ?>id="{$id}"<?php endif; ?> value="{$value}" />
+<span class="autocomplete hide" id="{$name}_complete"></span>
+<script type="text/javascript">
+    showstuff('{#$name}_complete');
+    new Ajax.Autocompleter('{#$id}', '{#$name}_complete', '{$baseurl}javascript/callbacks/usersearch.php', {})
+</script>

issuetracker/templates/depends.tpl

+<div class="box"><p><b>{L('pruninglevel')}: </b>{!implode(" &nbsp;|&nbsp; \n", $strlist)}</p>
+<h2><a href="{CreateUrl('details', $task_id)}">FS#{!$task_id}</a>: {L('dependencygraph')}</h2>
+
+<?php if ($fmt == 'svg'): ?>
+<object class="depimage" data="{$image}"
+    width="{$width}" height="{$height}"
+    type="image/svg+xml">
+</object>
+<?php else: ?>
+    <?php if ($remote): ?>
+    <a href="{$map}">
+    <?php else: ?>
+    <div>{!$map}</div>
+    <?php endif; ?>
+       
+    <img src="{$image}" alt="Dependencies for task {$task_id}" class="depimage"
+         <?php if ($remote): ?>ismap="ismap"<?php else: ?>usemap="#{$graphname}"<?php endif; ?> />
+
+    <?php if ($remote): ?>
+    </a>
+    <?php endif; ?>
+<?php endif; ?>
+
+<p>{sprintf(L('pagegenerated'), $time)}<p>
+</div>

issuetracker/templates/details.edit.tpl

+<div id="taskdetails">
+  <form action="{CreateUrl('details', $task_details['task_id'])}" id="taskeditform" enctype="multipart/form-data" method="post">
+	 <div>
+		<h2 class="summary severity{Req::val('task_severity', $task_details['task_severity'])}">
+		  <a href="{CreateUrl('details', $task_details['task_id'])}">FS#{$task_details['task_id']}</a> -
+		  <input class="text severity{Req::val('task_severity', $task_details['task_severity'])}" type="text"
+			name="item_summary" size="80" maxlength="100"
+			value="{Req::val('item_summary', $task_details['item_summary'])}" />
+		</h2>
+		<input type="hidden" name="action" value="details.update" />
+        <input type="hidden" name="edit" value="1" />
+		<input type="hidden" name="task_id" value="{$task_details['task_id']}" />
+		<input type="hidden" name="edit_start_time" value="{Req::val('edit_start_time', time())}" />
+
+		<div id="fineprint">
+		  {L('attachedtoproject')}:
+		  <select name="project_id">
+			{!tpl_options($fs->projects, Req::val('project_id', $proj->id))}
+		  </select>
+		  <br />
+		  {L('openedby')} {!tpl_userlink($task_details['opened_by'])}
+		  - {!formatDate($task_details['date_opened'], true)}
+		  <?php if ($task_details['last_edited_by']): ?>
+		  <br />
+		  {L('editedby')}  {!tpl_userlink($task_details['last_edited_by'])}
+		  - {formatDate($task_details['last_edited_time'], true)}
+		  <?php endif; ?>
+		</div>
+
+        <table><tr><td id="taskfieldscell"><?php // small layout table ?>
+
+		<div id="taskfields">
+		  <table class="taskdetails">
+			<tr>
+			 <td><label for="tasktype">{L('tasktype')}</label></td>
+			 <td>
+				<select id="tasktype" name="task_type">
+				 {!tpl_options($proj->listTaskTypes(), Req::val('task_type', $task_details['task_type']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="category">{L('category')}</label></td>
+			 <td>
+				<select id="category" name="product_category">
+				 {!tpl_options($proj->listCategories(), Req::val('product_category', $task_details['product_category']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="status">{L('status')}</label></td>
+			 <td>
+				<select id="status" name="item_status">
+				 {!tpl_options($proj->listTaskStatuses(), Req::val('item_status', $task_details['item_status']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label>{L('assignedto')}</label></td>
+			 <td>
+                <?php if ($user->perms('edit_assignments')): ?>
+
+				<input type="hidden" name="old_assigned" value="{$old_assigned}" />
+                <?php $this->display('common.multiuserselect.tpl'); ?>
+                <?php else: ?>
+                    <?php if (empty($assigned_users)): ?>
+                     {L('noone')}
+                     <?php else:
+                     foreach ($assigned_users as $userid):
+                     ?>
+                     {!tpl_userlink($userid)}<br />
+                     <?php endforeach;
+                     endif; ?>
+                <?php endif; ?>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="os">{L('operatingsystem')}</label></td>
+			 <td>
+				<select id="os" name="operating_system">
+				 {!tpl_options($proj->listOs(), Req::val('operating_system', $task_details['operating_system']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="severity">{L('severity')}</label></td>
+             <td>
+				<select id="severity" name="task_severity">
+				 {!tpl_options($fs->severities, Req::val('task_severity', $task_details['task_severity']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="priority">{L('priority')}</label></td>
+			 <td>
+				<select id="priority" name="task_priority">
+				 {!tpl_options($fs->priorities, Req::val('task_priority', $task_details['task_priority']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="reportedver">{L('reportedversion')}</label></td>
+			 <td>
+				<select id="reportedver" name="reportedver">
+				{!tpl_options($proj->listVersions(false, 2, $task_details['product_version']), Req::val('reportedver', $task_details['product_version']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="dueversion">{L('dueinversion')}</label></td>
+			 <td>
+				<select id="dueversion" name="closedby_version">
+				 <option value="0">{L('undecided')}</option>
+				 {!tpl_options($proj->listVersions(false, 3), Req::val('closedby_version', $task_details['closedby_version']))}
+				</select>
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="duedate">{L('duedate')}</label></td>
+			 <td id="duedate">
+                {!tpl_datepicker('due_date', '', Req::val('due_date', $task_details['due_date']))}
+			 </td>
+			</tr>
+			<tr>
+			 <td><label for="percent">{L('percentcomplete')}</label></td>
+			 <td>
+				<select id="percent" name="percent_complete">
+				 <?php $arr = array(); for ($i = 0; $i<=100; $i+=10) $arr[$i] = $i.'%'; ?>
+				 {!tpl_options($arr, Req::val('percent_complete', $task_details['percent_complete']))}
+				</select>
+			 </td>
+			</tr>
+            <?php if ($user->can_change_private($task_details)): ?>
+            <tr>
+              <td><label for="private">{L('private')}</label></td>
+              <td>
+                {!tpl_checkbox('mark_private', Req::val('mark_private', $task_details['mark_private']), 'private')}
+              </td>
+            </tr>
+            <?php endif; ?>
+		  </table>
+		</div>
+
+        </td><td style="width:100%">
+
+		<div id="taskdetailsfull">
+          <h3 class="taskdesc">{L('details')}</h3>
+        <?php $attachments = $proj->listTaskAttachments($task_details['task_id']);
+          $this->display('common.editattachments.tpl', 'attachments', $attachments); ?>
+
+          <?php if ($user->perms('create_attachments')): ?>
+          <div id="uploadfilebox">
+            <span style="display: none"><?php // this span is shown/copied in javascript when adding files ?>
+              <input tabindex="5" class="file" type="file" size="55" name="usertaskfile[]" />
+                <a href="javascript://" tabindex="6" onclick="removeUploadField(this);">{L('remove')}</a><br />
+            </span>
+            <noscript>
+                <span>
+                  <input tabindex="5" class="file" type="file" size="55" name="usertaskfile[]" />
+                    <a href="javascript://" tabindex="6" onclick="removeUploadField(this);">{L('remove')}</a><br />
+                </span>
+            </noscript>
+          </div>
+          <button id="uploadfilebox_attachafile" tabindex="7" type="button" onclick="addUploadFields()">
+            {L('uploadafile')} ({L('max')} {$fs->max_file_size} {L('MiB')})
+          </button>
+          <button id="uploadfilebox_attachanotherfile" tabindex="7" style="display: none" type="button" onclick="addUploadFields()">
+             {L('attachanotherfile')} ({L('max')} {$fs->max_file_size} {L('MiB')})
+          </button>
+          <?php endif; ?>
+          <?php if (defined('FLYSPRAY_HAS_PREVIEW')): ?>
+          <div class="hide preview" id="preview"></div>
+          <?php endif; ?>
+          {!TextFormatter::textarea('detailed_desc', 15, 70, array('id' => 'details'), Req::val('detailed_desc', $task_details['detailed_desc']))}
+          <br />
+          <?php if ($user->perms('add_comments') && (!$task_details['is_closed'] || $proj->prefs['comment_closed'])): ?>
+              <button type="button" onclick="showstuff('edit_add_comment');this.style.display='none';">{L('addcomment')}</button>
+              <div id="edit_add_comment" class="hide">
+              <label for="comment_text">{L('comment')}</label>
+
+              <?php if ($user->perms('create_attachments')): ?>
+              <div id="uploadfilebox_c">
+                <span style="display: none"><?php // this span is shown/copied in javascript when adding files ?>
+                  <input tabindex="5" class="file" type="file" size="55" name="userfile[]" />
+                    <a href="javascript://" tabindex="6" onclick="removeUploadField(this, 'uploadfilebox_c');">{L('remove')}</a><br />
+                </span>
+              </div>
+              <button id="uploadfilebox_c_attachafile" tabindex="7" type="button" onclick="addUploadFields('uploadfilebox_c')">
+                {L('uploadafile')} ({L('max')} {$fs->max_file_size} {L('MiB')})
+              </button>
+              <button id="uploadfilebox_c_attachanotherfile" tabindex="7" style="display: none" type="button" onclick="addUploadFields('uploadfilebox_c')">
+                 {L('attachanotherfile')} ({L('max')} {$fs->max_file_size} {L('MiB')})
+              </button>
+              <?php endif; ?>
+
+              <textarea accesskey="r" tabindex="8" id="comment_text" name="comment_text" cols="50" rows="10"></textarea>
+              </div>
+          <?php endif; ?>
+		  <p class="buttons">
+              <button type="submit" accesskey="s" onclick="return checkok('{#$baseurl}javascript/callbacks/checksave.php?time={time()}&amp;taskid={$task_details['task_id']}', '{#L('alreadyedited')}', 'taskeditform')">{L('savedetails')}</button>
+              <?php if (defined('FLYSPRAY_HAS_PREVIEW')): ?>
+              <button tabindex="9" type="button" onclick="showPreview('details', '{#$baseurl}', 'preview')">{L('preview')}</button>
+              <?php endif; ?>
+              <button type="reset">{L('reset')}</button>
+          </p>
+		</div>
+
+        </td></tr></table>
+
+	 </div>
+     <div class="clear"></div>
+  </form>
+</div>

issuetracker/templates/details.tabs.comment.tpl

+<div id="comments" class="tab">
+  <?php foreach($comments as $comment): ?>
+  <em>
+    <a name="comment{$comment['comment_id']}" id="comment{$comment['comment_id']}"
+      href="{CreateURL('details', $task_details['task_id'])}#comment{$comment['comment_id']}">
+      <img src="{$this->get_image('comment')}"
+        title="{L('commentlink')}" alt="" />
+    </a>
+    {L('commentby')} {!tpl_userlink($comment['user_id'])} -
+    {formatDate($comment['date_added'], true)}
+  </em>
+
+  <span class="DoNotPrint">
+    <?php if ($user->perms('edit_comments') || ($user->perms('edit_own_comments') && $comment['user_id'] == $user->id)): ?>
+    &mdash;
+    <a href="{$_SERVER['SCRIPT_NAME']}?do=editcomment&amp;task_id={$task_details['task_id']}&amp;id={$comment['comment_id']}">
+      {L('edit')}</a>
+    <?php endif; ?>
+
+    <?php if ($user->perms('delete_comments')): ?>
+    &mdash;
+    <a href="{$_SERVER['SCRIPT_NAME']}?do=details&amp;action=details.deletecomment&amp;task_id={$task_details['task_id']}&amp;comment_id={$comment['comment_id']}"
+      onclick="return confirm('{#L('confirmdeletecomment')}');">
+      {L('delete')}</a>
+    <?php endif ?>
+  </span>
+  <div class="comment">
+  <?php if(isset($comment_changes[$comment['date_added']])): ?>
+  <ul class="comment_changes">
+  <?php foreach($comment_changes[$comment['date_added']] as $change): ?>
+    <li>{!event_description($change)}</li>
+  <?php endforeach; ?>
+  </ul>
+  <?php endif; ?>
+  <div class="commenttext">{!TextFormatter::render($comment['comment_text'], false, 'comm', $comment['comment_id'], $comment['content'])}</div></div>
+
+  <?php if (isset($comment_attachments[$comment['comment_id']])) {
+            $this->display('common.attachments.tpl', 'attachments', $comment_attachments[$comment['comment_id']]);
+        }
+  ?>
+
+  <?php endforeach; ?>