self opening modals, loginredirects keep fragment data

This commit is contained in:
marko
2022-06-12 19:54:29 +02:00
parent 56fe127c81
commit 8329a6b2df
8 changed files with 72 additions and 57 deletions

View File

@@ -88,10 +88,23 @@ class event{
public function htmlTableRow(){
return
"<tr>".
"<td>".$this->date->format("Y-m-d")."</td>".
"<td>Datum ".$this->date->format("Y-m-d")."</td>".
"<td><a href=\"/pages/desktop/wkParticipo/showWkEvent.php?eventId=".$this->id."\" >".$this->shiai->getName()."</a></td>".
"<td><a class=\"waves-effect waves-light btn-floating modal-trigger\" href=\"#event-modal-".$this->id."\"><i class=\"material-icons\">add</i></a></td>".
"</tr>";
}
public function htmlModal(){
return
"<div id=\"event-modal-".$this->id."\" class=\"modal\">".
"<div class=\"modal-content\">".
"<h4>".$this->shiai->getName()."</h4>".
"<p>A bunch of text</p>".
"</div>". // end modal-content
"<div class=\"modal-footer\">".
"<a href=\"#!\" class=\"modal-close waves-effect waves-green btn-flat\">Agree</a>".
"</div>".
"</div>";
}
static public function fromArray($member){
$shiai = json_decode($member['bemerkungen'], true);
@@ -157,10 +170,14 @@ class eventPlaner{
static public function getHtmlEventTable($eventList){
$ret = "<table>";
$ret .= "<!-- And now the table -->";
foreach($eventList as $event){
$ret .= $event->htmlTableRow();
}
$ret .= "</table>";
foreach($eventList as $event){
$ret .= $event->htmlModal();
}
return $ret;
}
}