Skip to content

Commit

Permalink
Holidays: do not scroll if not current year
Browse files Browse the repository at this point in the history
  • Loading branch information
lbayle committed Oct 5, 2016
1 parent 605e1ac commit dacb7ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion timetracking/holidays_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,15 @@ protected function display() {
);
}
$this->smartyHelper->assign('months', $months);
$this->smartyHelper->assign('thisMonth', Tools::formatDate("%B", time()));

// scroll to current month
if ($year == date('Y')) {
$thisMonth = Tools::formatDate("%B", time());
} else {
$thisMonth = Tools::formatDate("%B", Tools::date2timestamp($year.'-01-01'));
}
$this->smartyHelper->assign('thisMonth', $thisMonth);

}
}

Expand Down

0 comments on commit dacb7ed

Please sign in to comment.