Commit 57724fde authored by Loïc DAYOT's avatar Loïc DAYOT
Browse files

feat(): make easier purpose new event

For each day in a month of calendar, add link to show all events of the day.
For each day in a month of calendar, add link to add new event at this date.
Add link to add event from showoneday.php at this date.

close #37
parent a970ff28
......@@ -474,7 +474,11 @@ global $maxEventsInCalendar;
else
echo " <td class=\"current_month\"><h1>";
calendar_custom_icon($campaigns, $year, $month, $day);
echo $day;
$thisDate = onlyday_timestamp2humanreadable($curtime);
echo "<a href=\"showoneday.php?date=".
substr(date_timestamp2mysql($curtime),0,10). "\" title=\"".
sprintf( _("Les évènements du %s"), $thisDate ). "\">". $day. "</a> ";
echo "<a href='submit.php?start=$curtime' title='Proposer un &eacute;v&eacute;nement'><i class='fa fa-pencil'></i></a>";
echo "</h1>\n";
show_day_events ($db, $day, $month, $year, $region, $maxEventsInCalendar);
echo "</td>\n";
......
<?php
/*
* Copyright 2004-2015
* Copyright 2004-2017
* - Mélanie Bats <melanie POINT bats CHEZ utbm POINT fr>
* - Thomas Petazzoni <thomas POINT petazzoni CHEZ enix POINT org>
* - Loic Dayot <ldayot CHEZ ouvaton POINT org>
* - Loic Dayot <ldayot CHEZ epnadmin POINT net>
*
* This file is part of agenda-libre-php.
*
......@@ -36,6 +36,14 @@ put_header("Tous les événements du ". $human_date);
echo "<h2>Tous les événements du ". $human_date. "</h2>\n\n";
echo "<div id=\"localgroup-list\">\n";
// Display actions in context div
echo "<h1>Actions</h1>\n";
echo "<a href='submit.php?start=". strtotime($date). "'>".
"<i class='fa fa-pencil'></i>Proposer un &eacute;v&eacute;nement</a>\n";
echo "</h1>";
echo "</div>\n";
show_day_events ($db, $day, $month, $year, $region="all", $count=100);
put_footer();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment