Fix taken On / Posted On Media Dates
This commit is contained in:
@@ -208,7 +208,7 @@ class Spot extends Main
|
||||
}
|
||||
|
||||
/**
|
||||
* Get valid medias based on $sTimeRefField (both are on site time):
|
||||
* Get valid medias based on $sTimeRefField:
|
||||
* - taken_on: Date/time on which the media was taken
|
||||
* - posted_on: Date/time on which the media was uploaded
|
||||
* @param String $sTimeRefField Field to calculate relative times
|
||||
@@ -222,6 +222,7 @@ class Spot extends Main
|
||||
$sTimeRef = $asMedia[$sTimeRefField];
|
||||
if($sTimeRef >= $this->oProject->getActivePeriod('from') && $sTimeRef <= $this->oProject->getActivePeriod('to')) {
|
||||
$asMedia['taken_on_formatted'] = $this->getTimeFormat(strtotime($asMedia['taken_on']));
|
||||
$asMedia['posted_on_formatted'] = $this->getTimeFormat(strtotime($asMedia['posted_on']));
|
||||
$asMedia['displayed_id'] = $iIndex + 1;
|
||||
|
||||
$this->addTimeStamp($asMedia, strtotime($sTimeRef));
|
||||
|
||||
@@ -547,12 +547,12 @@ function getMediaLink(asData, sType) {
|
||||
var bVideo = (asData.subtype == 'video');
|
||||
|
||||
var $PostedOn =
|
||||
$('<span>', {'class': 'lb-caption-line', title: oSpot.lang(bVideo?'video':'pic')+' '+oSpot.lang('add_on', asData.formatted_time)})
|
||||
$('<span>', {'class': 'lb-caption-line', title: oSpot.lang(bVideo?'video':'pic')+' '+oSpot.lang('add_on', asData.posted_on_formatted)})
|
||||
.addIcon('fa-upload fa-lg fa-fw', true)
|
||||
.append(asData.formatted_time);
|
||||
.append(asData.posted_on_formatted);
|
||||
|
||||
var $TakenOn = (asData.taken_on == '0000-00-00 00:00:00')?'':
|
||||
$('<span>', {'class': 'lb-caption-line', title: oSpot.lang(bVideo?'video':'pic')+' '+oSpot.lang(bVideo?'video_taken':'pic_taken', asData.formatted_time)})
|
||||
$('<span>', {'class': 'lb-caption-line', title: oSpot.lang(bVideo?'video':'pic')+' '+oSpot.lang(bVideo?'video_taken':'pic_taken', asData.taken_on_formatted)})
|
||||
.addIcon('fa-'+asData.subtype+'-shot fa-lg fa-fw', true)
|
||||
.append(asData.taken_on_formatted+self.tmp('site_tz_notice'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user