Ejemplo n.º 1
0
<?php 
if ($this->DayCount < 25) {
    $weekSeparator = ' top-separated';
    $monthSeparator = ' top-separated-light';
} else {
    $weekSeparator = ' top-separated-light';
    $monthSeparator = ' top-separated';
}
$Context = new \Runalyze\Dataset\Context(new Runalyze\Model\Activity\Entity(), $this->AccountID);
$Table = new \Runalyze\View\Dataset\Table($this->DatasetConfig);
?>

	<div id="data-browser-container">
		<table class="zebra-style">
			<?php 
if (\Runalyze\Configuration::DataBrowser()->showLabels()) {
    ?>
			<thead class="data-browser-labels">
				<tr class="small">
					<td colspan="<?php 
    echo 2 + $this->ShowEditLink + $this->ShowPublicLink;
    ?>
"></td>
					<?php 
    echo $Table->codeForColumnLabels();
    ?>
				</tr>
			</thead>
			<?php 
}
?>
Ejemplo n.º 2
0
 /**
  * Reload data browser for new timerange
  */
 public static function showNewTimerangeInDB()
 {
     $mode = \Runalyze\Configuration::DataBrowser()->mode();
     $rel = $mode->showMonth() ? 'month-link' : 'week-link';
     echo Ajax::wrapJSasFunction('$("#data-browser .panel-heading a[rel=\'' . $rel . '\']").click();');
 }
Ejemplo n.º 3
0
 /**
  * All categories
  * @return ConfigurationCategory[]
  */
 private function allCategories()
 {
     return array(Configuration::General(), Configuration::Privacy(), Configuration::ActivityView(), Configuration::ActivityForm(), Configuration::Design(), Configuration::DataBrowser(), Configuration::Vdot(), Configuration::Trimp(), Configuration::BasicEndurance(), Configuration::Misc());
 }
Ejemplo n.º 4
0
 /**
  * Init private timestamps from request
  */
 protected function initTimestamps()
 {
     if (!isset($_GET['start']) || !isset($_GET['end'])) {
         $Mode = Configuration::DataBrowser()->mode();
         if ($Mode->showMonth()) {
             $this->timestamp_start = mktime(0, 0, 0, date("m"), 1, date("Y"));
             $this->timestamp_end = mktime(23, 59, 50, date("m") + 1, 0, date("Y"));
         } else {
             $this->timestamp_start = Time::weekstart(time());
             $this->timestamp_end = Time::weekend(time());
         }
     } else {
         $this->timestamp_start = $_GET['start'];
         $this->timestamp_end = $_GET['end'];
     }
     $this->day_count = round(($this->timestamp_end - $this->timestamp_start) / 86400);
 }
Ejemplo n.º 5
0
 /**
  * Get date string for given timestamp
  * @param int $timestamp
  * @return string
  */
 protected function dateString($timestamp)
 {
     $date = date('d.m.', $timestamp);
     $addLink = '';
     $weekDay = Time::weekday(date('w', $timestamp), true);
     if (Configuration::DataBrowser()->showCreateLink() && !FrontendShared::$IS_SHOWN) {
         $addLink = ImporterWindow::linkForDate($timestamp);
     }
     if (Time::isToday($timestamp)) {
         $weekDay = '<strong>' . $weekDay . '</strong>';
     }
     return $date . ' ' . $addLink . ' ' . $weekDay;
 }
Ejemplo n.º 6
0
 /**
  * Display edit link if used in DataBrowser
  */
 public function displayEditLink()
 {
     if (Configuration::DataBrowser()->showEditLink()) {
         if ($this->isSummary || FrontendShared::$IS_SHOWN) {
             echo HTML::emptyTD();
         } else {
             echo HTML::td($this->Linker->smallEditLink());
         }
     }
 }