Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for nulls in metadata.json. #214

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 28 additions & 42 deletions includes/important_dates.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,45 @@
with what is in json/metadata.json, which is why we use
$META['submitdate'] and $META['dates'].
*/
?>
<article class="customCard">
<h4 class="customCardHeader">
Important Dates
</h4>
<div class="customCardRow row">
<h6 class="dateTitle col-5 col-md-4">
<?php echo $META['submitdate'];?>
</h6>
<p class="col-7 col-md-8">
Submission deadline at 21:00 UTC
</p>
</div>
<div class="customCardRow row">
<h6 class="dateTitle col-5 col-md-4">
<?php echo $META['firstRound'];?>
</h6>
<p class="col-7 col-md-8">
First round notification
</p>
</div>
<div class="customCardRow row">
function showDate($key, $title) {
global $META;
if (!array_key_exists($key, $META) || $META[$key] == null) {
return;
}
$date = $META[$key];
echo <<< EOR
<div class="customCardRow row">
<h6 class="dateTitle col-5 col-md-4">
<?php echo $META['rebuttalDue'];?>
$date
</h6>
<p class="col-7 col-md-8">
Rebuttal deadline at 11:45 UTC
</p>
</div>
<div class="customCardRow row">
<h6 class="dateTitle col-5 col-md-4">
<?php echo $META['finalNotification'];?>
</h6>
<p class="col-7 col-md-8">
Final notification
</p>
</div>
<div class="customCardRow row">
<h6 class="dateTitle col-5 col-md-4">
<?php echo $META['finalNotification'];?>
</h6>
<p class="col-7 col-md-8">
Final version due
$title
</p>
</div>
EOR;
}
?>
<article class="customCard">
<h4 class="customCardHeader">
Important Dates
</h4>
<?php showDate('submitdate', 'Submission deadline'); ?>
<?php showDate('firstRound', 'First round notification'); ?>
<?php showDate('rebuttalDue', 'Rebuttal deadline'); ?>
<?php showDate('notificationdate', 'Final Notification'); ?>
<?php showDate('finalversions', 'Final versions due'); ?>
<!-- An example of a custom date not in metadata.json. -->
<!--
<div class="customCardRow row">
<h6 class="dateTitle col-5 col-md-4">
<?php echo $META['startdate'];?>
1 Jan 1970
</h6>
<p class="col-7 col-md-8">
Conference begins
Custom date can be entered
</p>
</div>
-->
<?php showDate('startdate', 'Conference begins'); ?>
<div class="customCardFooter">
<img src="images/icons/exclamation.svg" class="icon" /> For further details,
consult the <a href="papersubmission.php">paper submission page</a>.
Expand Down
3 changes: 2 additions & 1 deletion json/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"submitdate": "11 Feb 2020",
"firstRound": "2 Apr 2020",
"rebuttalDue": "21 Apr 2020",
"finalNotification": "26 Apr 2020",
"notificationdate": "26 Apr 2020",
"finalversions": null,
"cameraReady": "5 Jul 2022",
"latitude": -119.84698971268,
"longitude": 34.411605668706,
Expand Down