Compare commits

...

3 Commits

2 changed files with 9 additions and 7 deletions

View File

@ -7,8 +7,8 @@
// menu entry for admin plugins // menu entry for admin plugins
$lang['wiyh_heading'] = 'Raumstatus'; $lang['wiyh_heading'] = 'Raumstatus';
$lang['wiyh_open'] = 'ist geöffnet.'; $lang['wiyh_open'] = 'ist geöffnet';
$lang['wiyh_closed'] = 'ist geschlossen.'; $lang['wiyh_closed'] = 'ist geschlossen';
$lang['wiyh_stats'] = 'Raumöffnungsstatistiken'; $lang['wiyh_stats'] = 'Raumöffnungsstatistiken';
$lang['wiyh_no_api_path'] = 'Es wurde kein API-Pfad angegeben.'; $lang['wiyh_no_api_path'] = 'Es wurde kein API-Pfad angegeben.';
$lang['wiyh_fetch_error'] = 'Der API-Pfad konnte nicht abgerufen werden.'; $lang['wiyh_fetch_error'] = 'Der API-Pfad konnte nicht abgerufen werden.';

View File

@ -76,16 +76,18 @@ class syntax_plugin_whoisinyourhackspace extends DokuWiki_Syntax_Plugin {
$content .= "<h3>" . $this->getLang('wiyh_heading') . "</h3>"; $content .= "<h3>" . $this->getLang('wiyh_heading') . "</h3>";
if ($api->state->open) { if ($api->state->open) {
$content .= $api->state->icon->open ? "<img class=\"icon\" src=\"{$api->state->icon->open}\" alt=\"{$api->space} ist besetzt.\" title=\"{$api->space} ist besetzt.\" />" : ''; $message = "{$api->space} {$this->getLang('wiyh_open')}";
$content .= "<p class=\"text\">{$api->space} " . $this->getLang('wiyh_open') . "</p>"; $content .= $api->state->icon->open ? "<img class=\"icon\" src=\"{$api->state->icon->open}\" alt=\"{$message}\" title=\"{$message}\" />" : '';
$content .= "<p class=\"text\">{$message}</p>";
} else { } else {
$content .= $api->state->icon->open ? "<img class=\"icon\" src=\"{$api->state->icon->closed}\" alt=\"{$api->space} ist geschlossen.\" title=\"{$api->space} ist geschlossen.\" />" : ''; $message = "{$api->space} {$this->getLang('wiyh_closed')}";
$content .= "<p class=\"text\">{$api->space} " . $this->getLang('wiyh_closed') . "</p>"; $content .= $api->state->icon->closed ? "<img class=\"icon\" src=\"{$api->state->icon->closed}\" alt=\"{$message}\" title=\"{$message}\" />" : '';
$content .= "<p class=\"text\">{$message}</p>";
} }
$date = new DateTime(); $date = new DateTime();
$date->setTimeStamp($api->state->lastchange); $date->setTimeStamp($api->state->lastchange);
$content .= "<p class=\"text\"> seit " . $date->format('d.m.Y H:i') . " Uhr</p>"; $content .= "<p class=\"text\">seit " . $date->format('d.m.Y H:i') . " Uhr</p>";
$content .= '<hr />'; $content .= '<hr />';
$content .= '</div>'; $content .= '</div>';