Blame view

sources/apps/activity/templates/activities.part.php 1.63 KB
d1bafeea1   Kload   [fix] Upgrade to ...
1
2
3
  <?php
  
  /**
6d9380f96   Cédric Dupont   Update sources OC...
4
   * ownCloud - Activity App
d1bafeea1   Kload   [fix] Upgrade to ...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
   *
   * @author Frank Karlitschek
   * @copyright 2013 Frank Karlitschek frank@owncloud.org
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
   * License as published by the Free Software Foundation; either
   * version 3 of the License, or any later version.
   *
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
   *
6d9380f96   Cédric Dupont   Update sources OC...
19
   * You should have received a copy of the GNU Affero General Public
d1bafeea1   Kload   [fix] Upgrade to ...
20
21
22
23
24
25
   * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
   *
   */
  
  /** @var $l OC_L10N */
  /** @var $theme OC_Defaults */
6d9380f96   Cédric Dupont   Update sources OC...
26
  /** @var $_ array */
d1bafeea1   Kload   [fix] Upgrade to ...
27
28
  
  $lastDate = null;
d1bafeea1   Kload   [fix] Upgrade to ...
29
30
31
32
  foreach ($_['activity'] as $event) {
  	// group by date
  	// TODO: use more efficient way to group by date (don't group by localized string...)
  	$currentDate = (string)(\OCP\relative_modified_date($event['timestamp'], true));
6d9380f96   Cédric Dupont   Update sources OC...
33

d1bafeea1   Kload   [fix] Upgrade to ...
34
  	// new date group
6d9380f96   Cédric Dupont   Update sources OC...
35
  	if ($currentDate !== $lastDate) {
d1bafeea1   Kload   [fix] Upgrade to ...
36
  		// not first date group ?
6d9380f96   Cédric Dupont   Update sources OC...
37
38
39
40
41
42
  		if ($lastDate !== null) {
  ?>
  	</div>
  </div>
  
  <?php
d1bafeea1   Kload   [fix] Upgrade to ...
43
44
  		}
  		$lastDate = $currentDate;
6d9380f96   Cédric Dupont   Update sources OC...
45
46
47
48
49
50
51
52
53
  ?>
  <div class="section activity-section group" data-date="<?php p($currentDate) ?>">
  	<h2>
  		<span class="tooltip" title="<?php p(\OCP\Util::formatDate(strip_time($event['timestamp']), true)) ?>">
  			<?php p(ucfirst($currentDate)) ?>
  		</span>
  	</h2>
  	<div class="boxcontainer">
  <?php
d1bafeea1   Kload   [fix] Upgrade to ...
54
  	}
6d9380f96   Cédric Dupont   Update sources OC...
55
  	echo \OCA\Activity\Display::show($event);
d1bafeea1   Kload   [fix] Upgrade to ...
56
  }
6d9380f96   Cédric Dupont   Update sources OC...
57
58
59
60
  if (!empty($_['activity'])): ?>
  	</div>
  </div>
  <?php endif;