Successful Upgrade-"Week Total" on Mobile Page

Discussion forum about Anuko Time Tracker
Post Reply
chrisohle
Posts: 12
Joined: Mon May 15, 2017 9:42 pm

Successful Upgrade-"Week Total" on Mobile Page

Post by chrisohle » Thu Aug 20, 2020 2:12 pm

I first installed Time Tracker in 2017 and our company has really enjoyed the product.

I recently moved from GoDaddy to our own hosted server with a database backup and code/Db upgrade. With a few minor tweaks everything is running great...with one exception. I cannot get the "Week Total" to display on the mobile site. The tag displays...but not the data. It works well on the desktop version. My users really like this feature and I am stumped!

Any suggestions are welcome! Thanks!

chrisohle
Posts: 12
Joined: Mon May 15, 2017 9:42 pm

Re: Successful Upgrade-"Week Total" on Mobile Page

Post by chrisohle » Thu Aug 20, 2020 3:24 pm

The "Day Total" still shows up...but not the Week Total. This is only affected on the mobile time.php page.

wrc
Posts: 305
Joined: Tue May 25, 2010 8:30 pm

Re: Successful Upgrade-"Week Total" on Mobile Page

Post by wrc » Thu Aug 20, 2020 9:18 pm

chrisohle wrote:
Thu Aug 20, 2020 2:12 pm
I cannot get the "Week Total" to display on the mobile site. The tag displays...but not the data. It works well on the desktop version. My users really like this feature and I am stumped!
Was it there, ever? If you want it there, it is rather trivial to add. See mobile/time.php how day_total is assigned to a smarty template.

Code: Select all

$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date));
You'll need to do something similar for week_total.

Code: Select all

$smarty->assign('week_total', ttTimeHelper::getTimeForWeek($cl_date));
Then print it in /WEB-INF/temlates/mobile/time.tpl as so

Code: Select all

        <tr>
          <td align="right">{$i18n.label.week_total}:</td>
          <td>{$week_total}</td>
        </tr>
Hope it helps.

chrisohle
Posts: 12
Joined: Mon May 15, 2017 9:42 pm

Re: Successful Upgrade-"Week Total" on Mobile Page

Post by chrisohle » Thu Aug 20, 2020 11:02 pm

Just what I needed!

I had it configured on my last hosted site but forgot about the smarty assign for this page with the upgrade and move... I appreciate the assist!

wrc
Posts: 305
Joined: Tue May 25, 2010 8:30 pm

Re: Successful Upgrade-"Week Total" on Mobile Page

Post by wrc » Mon Sep 14, 2020 6:56 pm

Correction: It should be

Code: Select all

$smarty->assign('week_total', ttTimeHelper::getTimeForWeek($selected_date));
in mobile/time.php as $cl_date will get you only the current week working.

Post Reply