Show takedate in photo-overlay when available

This commit is contained in:
Tobias Reich 2014-06-28 22:49:49 +02:00
parent cbddb79391
commit 386a0c2b8e
6 changed files with 28 additions and 14 deletions

View File

@ -148,6 +148,9 @@
.photo .overlay a {
margin: 155px 0px 5px 15px;
}
.photo .overlay a span {
margin: 0px 5px 0px 0px;
}
/* Badges ------------------------------------------------*/
.album .badge,

View File

@ -81,7 +81,13 @@ build = {
photo += "<img src='" + photoJSON.thumbUrl + "' width='200' height='200' alt='thumb'>";
photo += "<div class='overlay'>";
photo += "<h1 title='" + longTitle + "'>" + title + "</h1>";
photo += "<a>" + photoJSON.sysdate + "</a>";
if (photoJSON.cameraDate==1) {
photo += "<a><span class='icon-camera' title='Photo Date'></span>" + photoJSON.sysdate + "</a>";
} else {
photo += "<a>" + photoJSON.sysdate + "</a>";
}
photo += "</div>";
if (photoJSON.star==1) photo += "<a class='badge red icon-star'></a>";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -79,7 +79,7 @@ class Album extends Module {
$return = $albums->fetch_assoc();
$return['sysdate'] = date('d M. Y', $return['sysstamp']);
$return['password'] = ($return['password']=='' ? false : true);
$query = "SELECT id, title, tags, public, star, album, thumbUrl FROM lychee_photos WHERE album = '$this->albumIDs' " . $this->settings['sorting'];
$query = "SELECT id, title, tags, public, star, album, thumbUrl, takestamp FROM lychee_photos WHERE album = '$this->albumIDs' " . $this->settings['sorting'];
break;
}
@ -92,7 +92,12 @@ class Album extends Module {
# Parse
$photo['sysdate'] = date('d F Y', substr($photo['id'], 0, -4));
$photo['previousPhoto'] = $previousPhotoID;
$photo['nextPhoto'] = '';
$photo['nextPhoto'] = '';
if ($photo['takestamp']!=='0') {
$photo['cameraDate'] = 1;
$photo['sysdate'] = date('d F Y', $photo['takestamp']);
}
if ($previousPhotoID!=='') $return['content'][$previousPhotoID]['nextPhoto'] = $photo['id'];
$previousPhotoID = $photo['id'];