]> wagnertech.de Git - timetracker.git/commitdiff
Added Timeheets plugin checkbox.
authorNik Okuntseff <support@anuko.com>
Thu, 14 Feb 2019 15:07:12 +0000 (15:07 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 14 Feb 2019 15:07:12 +0000 (15:07 +0000)
WEB-INF/resources/en.lang.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/plugins.tpl
plugins.php

index 101a5b71e2a2395e38a97962a321e6cc1a5ef509..ef63eb635572bee65212a2cc7f795c4e788976e2 100644 (file)
@@ -52,6 +52,7 @@ $i18n_key_words = array(
 'menu.time' => 'Time',
 'menu.expenses' => 'Expenses',
 'menu.reports' => 'Reports',
+'menu.timesheets' => 'Timesheets',
 'menu.charts' => 'Charts',
 'menu.projects' => 'Projects',
 'menu.tasks' => 'Tasks',
index de0c021a00c676ea907684f49d3b78527360537c..8ed3563b00071e0baf3c262deb9d7fc6765dce62 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.37.4719 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.37.4720 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index c064d18bb05a6e599b21e7bcd0977fa2c868ef7f..9ab38ab9139cee9df980e62f435b83ea67eb7a7c 100644 (file)
@@ -134,6 +134,12 @@ function handlePluginCheckboxes() {
             <td align="right" nowrap>{$forms.pluginsForm.work_units.control}</td>
             <td><label for="work_units">{$i18n.label.work_units}</label> <span id="work_units_config"><a href="work_units.php">{$i18n.label.configure}</a></span></td>
           </tr>
+{if isTrue('TIMESHEET_DEBUG')}
+          <tr>
+            <td align="right" nowrap>{$forms.pluginsForm.timesheets.control}</td>
+            <td><label for="charts">{$i18n.menu.timesheets}</label></td>
+          </tr>
+{/if}
           <tr>
             <td colspan="2">&nbsp;</td>
           </tr>
index 5027420e03e8d84988b387a7eb9b8cced1b42aad..64615aa25563d03878f39442fbf66007c1324074 100644 (file)
@@ -51,6 +51,7 @@ if ($request->isPost()) {
   $cl_quotas = $request->getParameter('quotas');
   $cl_week_view = $request->getParameter('week_view');
   $cl_work_units = $request->getParameter('work_units');
+  $cl_timesheets = $request->getParameter('timesheets');
 } else {
   // Note: we get here in get, and also in post when group changes.
   // Which plugins do we have enabled in currently selected group?
@@ -68,6 +69,7 @@ if ($request->isPost()) {
   $cl_quotas = in_array('mq', $plugins);
   $cl_week_view = in_array('wv', $plugins);
   $cl_work_units = in_array('wu', $plugins);
+  $cl_timesheets = in_array('ts', $plugins);
 }
 
 $form = new Form('pluginsForm');
@@ -86,6 +88,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'locking','value'=>$cl_locking,
 $form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()'));
 $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()'));
 $form->addInput(array('type'=>'checkbox','name'=>'work_units','value'=>$cl_work_units,'onchange'=>'handlePluginCheckboxes()'));
+$form->addInput(array('type'=>'checkbox','name'=>'timesheets','value'=>$cl_timesheets));
 // Submit button.
 $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save')));
 
@@ -120,6 +123,8 @@ if ($request->isPost()) {
     $plugins .= ',wv';
   if ($cl_work_units)
     $plugins .= ',wu';
+  if ($cl_timesheets)
+    $plugins .= ',ts';
 
   // Recycle week view plugin options as they are not configured on this page.
   $existing_plugins = explode(',', $user->getPlugins());