function info_icons(&$event) { $out = ''; if ($event->havePermission(Event::PERMISSION_READABLE) && (strtolower(get_class($event)) == 'seminarcalendarevent' || strtolower(get_class($event)) == 'seminarevent')) { $out .= Assets::img('images/projectevent-icon.gif', tooltip2(_('Veranstaltungstermin') . ' - ' . $event->getSemName())); } if ($event->getType() == 'PUBLIC') { $out .= Icon::create('visibility-visible', 'clickable', ['title' => $event->toStringAccessibility()])->asImg(16, ["alt" => $event->toStringAccessibility(), "border" => "0"]); } else if ($event->getType() == 'CONFIDENTIAL') { $out .= Icon::create('visibility-invisible', 'clickable', ['title' => $event->toStringAccessibility()])->asImg(16, ["alt" => $event->toStringAccessibility(), "border" => "0"]); } if ($event->getRepeat('rtype') != 'SINGLE') { $out .= Icon::create('refresh', 'clickable', ['title' => $event->toStringRecurrence()])->asImg(16, ["alt" => $event->toStringRecurrence(), "border" => "0"]); } if ($out != '') { $out = "<div align=\"right\">" . $out . "</div>"; } return $out; }
<td class="table_row_odd" align="left" width="40%"> <font size="-1"><b> <?php echo $title; ?> </b></font> </td> <td class="table_row_odd" align="left" width="40%"> <? if ($all_open) : ?> <a href="<?php echo URLHelper::getURL('?close_all=1&view=' . $view . '&cms_select=' . $cms_select . '&search_key=' . $search_key); ?> "> <?php echo Assets::img('close_all.png', tooltip2(_('Alle Module schließen'))); ?> </a> <? else : ?> <a href="<?php echo URLHelper::getLink('?open_all=1&view=' . $view . '&cms_select=' . $cms_select . '&search_key=' . $search_key); ?> "> <?php echo Assets::img('open_all.png', tooltip2(_('Alle Module öffnen'))); ?> </a> <? endif?> </td> </tr> </table>
<? foreach ($studygroups as $group) : ?> <tr> <td class="gruppe<?php echo $group['gruppe']; ?> "></td> <td> <?php echo CourseAvatar::getAvatar($group['seminar_id'])->is_customized() ? CourseAvatar::getAvatar($group['seminar_id'])->getImageTag(Avatar::SMALL, tooltip2(htmlReady($group['name']))) : Icon::create('studygroup', 'clickable', ['title' => htmlReady($group['name'])])->asImg(20); ?> </td> <td style="text-align: left"> <a href="<?php echo URLHelper::getLink('seminar_main.php', array('auswahl' => $group['seminar_id'])); ?> " <?php echo $group['lastvisitdate'] >= $group['chdate'] ? 'style="color: red;"' : ''; ?> > <?php echo htmlReady($group['name']); ?> </a> <? if ($group['visible'] == 0) : ?> <? $infotext = _("Versteckte Studiengruppen können über die Suchfunktionen nicht gefunden werden."); ?> <? $infotext .= " "; ?> <? if (Config::get()->ALLOW_DOZENT_VISIBILITY) : ?> <? $infotext .= _("Um die Studiengruppe sichtbar zu machen, wählen Sie den Punkt \"Sichtbarkeit\" im Administrationsbereich der Veranstaltung."); ?> <? else : ?> <? $infotext .= _("Um die Studiengruppe sichtbar zu machen, wenden Sie sich an die Admins."); ?>
function getAddLink($l, $i) { $add_link_timestamp = $this->base_date + $i * 60 * 60; $add_link_timestamp .= "&show_object=" . $this->show_columns[$l]; return sprintf("class=\"table_row_even\" align=\"right\" valign=\"bottom\"><a href=\"%s%s\">%s</a></td>", $this->add_link, $add_link_timestamp, Assets::img('calplus.gif', tooltip2(sprintf(_('Eine neue Belegung von %s bis %s Uhr anlegen'), date('H:i', $add_link_timestamp), date('H:i', $add_link_timestamp + 2 * 60 * 60))))); }
<th style="text-align: center"><?php echo _("Inhalt"); ?> </th> <th></th> </tr> </thead> <tbody> <? foreach ($institutes as $values) : ?> <? $lastVisit = $values['visitdate']; ?> <? $instid = $values['institut_id'] ?> <tr> <td style="width:1px"></td> <td> <?php echo InstituteAvatar::getAvatar($instid)->getImageTag(Avatar::SMALL, tooltip2(htmlReady($values['name']))) != '' ? Icon::create('institute', 'clickable', ['title' => htmlReady($values['name'])])->asImg(20) : InstituteAvatar::getAvatar($instid)->getImageTag(Avatar::SMALL, tooltip2(htmlReady($values['name']))); ?> </td> <td style="text-align: left"> <a href="<?php echo URLHelper::getLink('dispatch.php/institute/overview', array('auswahl' => $instid)); ?> "> <?php echo htmlReady($GLOBALS['INST_TYPE'][$values["type"]]["name"] . ": " . $values["name"]); ?> </a> </td> <td style="text-align: left; white-space: nowrap">
/** * Displays the folder and all of its documents and recursively subfolders. * This function is not dependent on the recursive-level so it looks as if it all starts from here. * */ function display_folder ($folder_id, $open, $change, $move, $upload, $refresh=FALSE, $filelink="", $anchor_id, $position="middle", $isissuefolder = false) { global $_fullname_sql,$SessionSeminar,$SessSemName, $rechte, $anfang, $user, $SemSecLevelWrite, $SemUserStatus, $check_all, $countfolder, $droppable_folder; $option = true; $countfolder++; $more = true; $db = DBManager::get(); $droppable_folder++; $javascriptok = true; //Einbinden einer Klasse, die Informationen über den ganzen Baum enthält $folder_tree = TreeAbstract::GetInstance('StudipDocumentTree', array('range_id' => $SessionSeminar)); //Hole alle Informationen, die es über $folder_id gibt $query = "SELECT ". $_fullname_sql['full'] ." AS fullname , username, folder_id, a.range_id, a.user_id, name, a.description, a.mkdate, a.chdate FROM folder a LEFT JOIN auth_user_md5 USING (user_id) LEFT JOIN user_info USING (user_id) WHERE a.folder_id = '$folder_id' ORDER BY a.name, a.chdate"; $result = $db->query($query)->fetch(); $depth = count($folder_tree->getParents($folder_id)); print "<div id=\"folder_".($depth > 2 ? $result['range_id'] : "root")."_".$countfolder."\"".($rechte ? " class=\"draggable_folder\"" : "").">"; print "<div style=\"display:none\" id=\"getmd5_fo".$result['range_id']."_".$countfolder."\">".$folder_id."</div>"; print "<table cellpadding=0 border=0 cellspacing=0 width=\"100%\"><tr>"; //Abzweigung, wenn Ordner ein Unterordner ist if ($depth > 2) // root > folder > subfolder print "<td class=\"tree-elbow-end\">" . Assets::img("datatree_2.gif") . "</td>"; else print "<td></td>"; print "<td valign=\"bottom\">"; //Farbe des Pfeils bestimmen: $chdate = (($result["chdate"]) ? $result["chdate"] : $result["mkdate"]); if (object_get_visit($SessSemName[1], "documents") < $chdate) $neuer_ordner = TRUE; else $neuer_ordner = FALSE; if ($neuer_ordner == TRUE) $timecolor = "#FF0000"; else { $timediff = (int) log((time() - doc_newest($folder_id)) / 86400 + 1) * 15; if ($timediff >= 68) $timediff = 68; $red = dechex(255 - $timediff); $other = dechex(119 + $timediff); $timecolor= "#" . $red . $other . $other; } //Jetzt fängt eine zweite Tabelle an mit den Zeilen: Titel, Beschreibung und Knöpfe, Unterdateien und Unterordner if ($rechte) { print "<div class=\"droppable handle\" id=\"dropfolder_$folder_id\">"; } print "<table cellpadding=0 border=0 cellspacing=0 width=\"100%\" id=\"droppable_folder_$droppable_folder\"><tr>"; // -> Pfeile zum Verschieben (bzw. die Ziehfläche) if (($rechte) && ($depth > 2)) { $bewegeflaeche = "<span class=\"updown_marker\" id=\"pfeile_".$folder_id."\">"; if (($position == "middle") || ($position == "bottom")) { $bewegeflaeche .= "<a href=\"".URLHelper::getLink('?open='.$folder_id)."_mfou_\" title=\""._("Nach oben verschieben"). "\">" . Icon::create('arr_2up', 'sort')->asImg(['class' => 'text-top']) . "</a>"; } if (($position == "middle") || ($position == "top")) { $bewegeflaeche .= "<a href=\"".URLHelper::getLink('?open='. $folder_id)."_mfod_\" title=\""._("Nach unten verschieben"). "\">" . Icon::create('arr_2down', 'sort')->asImg(['class' => 'text-top']) . "</a>"; } $bewegeflaeche .= "</span>"; } //Jetzt folgt der Link zum Aufklappen if ($open[$folder_id]) { //print "<td width=1px class=\"printhead\"> </td>"; print "<td id=\"folder_".$folder_id."_arrow_td\" nowrap valign=\"top\" align=\"left\" width=1% bgcolor=\"$timecolor\" class=\"printhead3\" valign=\"bottom\">"; print "<a href=\"".URLHelper::getLink("?close=".$folder_id."#anker"); print "\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">"; print Assets::img('forumgraurunt2.png', tooltip2(_('Objekt zuklappen')) + array('id' => 'folder_' . $folder_id . '_arrow_img')); print "</a>"; print "</td>"; //print ($javascriptok ? "<td class=\"printhead\"><a href=\"Javascript: changefolderbody('".$folder_id."')\" class=\"tree\"><span id=\"folder_".$folder_id."_header\" style=\"font-weight: bold\">" : print "<td class=\"printhead\" valign=\"bottom\">"; if ($move && ($move != $folder_id) && $folder_tree->isWritable($folder_id, $user->id) && (!$folder_tree->isFolder($move) || ($folder_tree->checkCreateFolder($folder_id, $user->id) && !$folder_tree->isExerciseFolder($folder_id, $user->id)))){ print "<a href=\"".URLHelper::getLink("?open=".$folder_id."_md_")."\">"; print Icon::create('arr_2right', 'sort')->asImg(); print "</a> "; } if (($anchor_id == $folder_id) || (($move == $folder_id))) { print "<a name=\"anker\"></a>"; } print "<a href=\"".URLHelper::getLink("?close=".$folder_id."#anker")."\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\"><span id=\"folder_".$folder_id."_header\" style=\"font-weight: bold\">"; } else { //print "<td width=1px class=\"printhead\"> </td>"; print "<td id=\"folder_".$folder_id."_arrow_td\" nowrap valign=\"top\" align=\"left\" width=1% bgcolor=\"$timecolor\" class=\"printhead2\" valign=\"bottom\">"; print "<a href=\""; print URLHelper::getLink("?open=".$folder_id."#anker"); print "\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">"; print Assets::img('forumgrau2.png', tooltip2(_('Objekt aufklappen')) + array('id' => 'folder_' . $folder_id . '_arrow_img')); print "</a></td>"; print "<td class=\"printhead\" valign=\"bottom\">"; if ($move && ($move != $folder_id) && $folder_tree->isWritable($folder_id, $user->id) && (!$folder_tree->isFolder($move) || ($folder_tree->checkCreateFolder($folder_id, $user->id) && !$folder_tree->isExerciseFolder($folder_id, $user->id)))){ print " <a href=\"".URLHelper::getLink("?open=".$folder_id."_md_")."\">"; print Icon::create('arr_2right', 'sort')->asImg(); print "</a> "; } print "<a href=\"".URLHelper::getLink("?open=".$folder_id."#anker")."\" class=\"tree\" " . "onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\"><span id=\"folder_".$folder_id."_header\" " . "style=\"font-weight: normal\">"; } $document_count = doc_count($folder_id); if ($document_count > 0) { print Icon::create('folder-full', 'clickable')->asImg() . ' '; } else { print Icon::create('folder-empty', 'clickable')->asImg() . ' '; } //Pfeile, wenn Datei bewegt werden soll if ($move && ($folder_id != $move) && $folder_tree->isWritable($folder_id, $user->id) && (!$folder_tree->isFolder($move) || ($folder_tree->checkCreateFolder($folder_id, $user->id) && !$folder_tree->isExerciseFolder($folder_id, $user->id)))){ print "</a><span class=\"move_arrows\"><a href=\"".URLHelper::getLink("?open=".$folder_id."_md_")."\">"; print Icon::create('arr_2right', 'sort')->asImg(); print "</a></span>"; if ($open[$folder_id]) print "<a href=\"".URLHelper::getLink("?close=".$folder_id."#anker")."\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">"; else print "<a href=\"".URLHelper::getLink("?open=".$folder_id."#anker")."\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">"; } //Dateiname, Rechte und Dokumente anzeigen $tmp_titel = htmlReady(mila($result['name'])); if ($isissuefolder) { $issue_id = $db->query("SELECT range_id FROM folder WHERE folder_id = ".$db->quote($folder_id))->fetch(); $dates_for_issue = IssueDB::getDatesforIssue($issue_id['range_id']); $dates_title = array(); foreach ($dates_for_issue as $date) { $dates_title[] .= date('d.m.y, H:i', $date['date']).' - '.date('H:i', $date['end_time']); } if (!empty($dates_title)) { $tmp_titel = sprintf(_("Sitzung am: %s"), implode(', ', $dates_title)) . ", " . ($tmp_titel ? $tmp_titel : _("Ohne Titel")); } else { $tmp_titel = $tmp_titel ? $tmp_titel : _("Ohne Titel"); } } if (($change == $folder_id) && (!$isissuefolder) && ((count($folder_tree->getParents($folder_id)) > 1) || $result['range_id'] == md5($SessSemName[1] . 'top_folder') || $folder_tree->isGroupFolder($result['folder_id']) ) ) { //Aenderungsmodus, Anker + Formular machen, Font tag direkt ausgeben (muss ausserhalb einer td stehen! $titel= "</a><input style=\"font-size:8 pt; width: 400px;\" type=\"text\" size=\"20\" maxlength=\"255\" aria-label=\"Ordnername eingeben\" name=\"change_name\" value=\"".htmlReady($result['name'])."\" >"; if ($rechte && $folder_tree->permissions_activated) $titel .= ' ['.$folder_tree->getPermissionString($result["folder_id"]).']'; } else { //create a link onto the titel, too if ($rechte && $folder_tree->permissions_activated ) { $tmp_titel .= ' '; $tmp_titel .= '['.$folder_tree->getPermissionString($result["folder_id"]).']'; } if ($document_count > 1) $titel= $tmp_titel."</span> " . sprintf(_("(%s Dokumente)"), $document_count); elseif ($document_count) $titel= $tmp_titel."</span> " . _("(1 Dokument)"); else $titel= $tmp_titel; } print $titel; if ($isissuefolder) { $dates_title = array(); foreach ($dates_for_issue as $date) { $dates_title[] .= date('d.m.y, H:i', $date['date']).' - '.date('H:i', $date['end_time']); } if (sizeof($dates_title) > 0) { $title_name = sprintf(_("Sitzung am: %s"), implode(', ', $dates_title)); if (!$result['name']) { $title_name .= ', '._("Ohne Titel"); } else { $title_name .= ', '.htmlReady($result['name']); } } } print "</a> "; // Schloss, wenn Folder gelockt if ($folder_tree->isLockedFolder($folder_id)) { print Icon::create('lock-locked', 'inactive', ['title' => _('Dieser Ordner ist gesperrt.')])->asImg(['class' => 'text-bottom']); } //Wenn verdeckt durch gesperrten übergeordneten Ordner else if ( ($super_folder = $folder_tree->getNextSuperFolder($folder_id)) ) { print Icon::create('lock-locked', 'inactive', ['title' => _('Dieser Ordner ist nicht zugänglich, da ein übergeordneter Ordner gesperrt ist.')])->asImg(['class' => 'text-bottom']); } // Wenn es ein Hausaufgabenordner ist if ($folder_tree->isExerciseFolder($folder_id)) { print Icon::create('edit', 'inactive', ['title' => _('Dieser Ordner ist ein Hausaufgabenordner. Es können nur Dateien eingestellt werden.')])->asImg(['class' => 'text-bottom']); } print "</td>"; //So und jetzt die rechtsbündigen Sachen: print "</td><td align=right class=\"printhead\" valign=\"bottom\">"; print "<a href=\"".URLHelper::getLink('dispatch.php/profile?username='******'username'])."\">".htmlReady($result['fullname'])."</a> "; print $bewegeflaeche." "; //Workaround for older data from previous versions (chdate is 0) print date("d.m.Y - H:i", (($result["chdate"]) ? $result["chdate"] : $result["mkdate"])); print "</td></tr></table>"; //Ende des Titels, Beschreibung und Knöpfen if ($rechte) print "</div>"; //End des Droppable-Divs if ($open[$folder_id]) { print "<div id=\"folder_".$folder_id."_body\">"; //Der ganze Teil des Unterbaus wurde in die folgende Funktion outsourced: display_folder_body($folder_id, $open, $change, $move, $upload, $refresh, $filelink, $anchor_id, $depth - 3); } else { print "<div id=\"folder_".$folder_id."_body\" style=\"display: none\">"; } print "</div></td></tr></table>"; print "</div>"; }
<? endif ?> <? if (in_array('name', $view_filter)) : ?> <td> <a href="<?php echo URLHelper::getLink('seminar_main.php', array('auswahl' => $semid)); ?> "> <?php echo htmlReady(trim($values['Name'])); ?> </a> <a data-dialog="buttons=false" href="<?php echo $controller->url_for(sprintf('course/details/index/%s', $semid)); ?> "> <? $params = tooltip2(_("Veranstaltungsdetails anzeigen")); ?> <? $params['style'] = 'cursor: pointer'; ?> <?php echo Icon::create('info-circle', 'inactive')->asImg($params); ?> </a> <? if ($values["visible"] == 0) : ?> <?php echo _("(versteckt)"); ?> <? endif ?> </td> <? endif ?> <? if (in_array('type', $view_filter)) : ?> <td> <strong><?php
function getFormButton($name, $attributes = array()) { if (is_array($this->form_buttons[$name]['attributes'])) { $attributes = array_merge((array) $attributes, (array) $this->form_buttons[$name]['attributes']); } if (!$this->form_buttons[$name]['is_picture']) { if (isset($this->form_buttons[$name]['info']) && !isset($attributes['title'])) { $attributes['title'] = $this->form_buttons[$name]['info']; } $caption = $this->form_buttons[$name]['caption'] ? $this->form_buttons[$name]['caption'] : $this->form_buttons[$name]['type']; if (in_array($this->form_buttons[$name]['type'], words('cancel accept'))) { $create = 'create' . $this->form_buttons[$name]['type']; } else { $create = 'create'; } $ret = Button::$create($caption, $this->form_name . "_" . $name, $attributes); } else { // Yes, this is kinda ugly $ret = Assets::input($this->form_buttons[$name]['type'], tooltip2($this->form_buttons[$name]['info']) + (array) $attributes + array('name' => $this->form_name . '_' . $name)); } return $ret; }
/** * TerminEingabeHilfe * * Liefert HTML-Code für Grafik und popup window für Kalender * * @param int Werte von 1 bis 7, bestimmt welche Formularfeldnamen verwendet werden * @param int counter wenn mehrere TerminFelder auf einer Seite * @param string ursprüngliche StartStunde * @param string ursprüngliche StartMinute * @param string ursprüngliche EndStunde * @param string ursprüngliche EndMinute * @return string html-code für popup window * */ function Termin_Eingabe_javascript($t = 0, $n = 0, $atime = 0, $ss = '', $sm = '', $es = '', $em = '', $bla = '') { global $auth, $CANONICAL_RELATIVE_PATH_STUDIP, $RELATIVE_PATH_CALENDAR; if (!$auth->auth["jscript"]) { return ''; } $km = $auth->auth["xres"] > 650 ? 8 : 6; $kx = $auth->auth["xres"] > 650 ? 780 : 600; $ky = $auth->auth["yres"] > 490 ? 500 : 480; $sb = $auth->auth["yres"] > 490 ? '' : ',scrollbars=yes '; $txt = ' '; $at = $atime ? '&atime=' . $atime : ''; $q = $ss !== '' ? "&ss={$ss}&sm={$sm}&es={$es}&em={$em}" : ''; $txt .= "<a href=\"javascript:window.open('"; $txt .= "termin_eingabe_dispatch.php?mcount={$km}&element_switch={$t}&c={$n}{$at}{$q}{$bla}', 'kalender', 'dependent=yes {$sb}, width={$kx}, height={$ky}');void(0);"; $txt .= '">'; $txt .= Assets::img('popupcalendar.png', tooltip2(_('Für eine Eingabehilfe zur einfacheren Terminwahl bitte hier klicken.')) + array('class' => 'middle')); $txt .= '</a>'; return $txt; }
<td> <? foreach ($GLOBALS['INSTALLED_LANGUAGES'] as $temp_language_key => $temp_language): ?> <a href="index.php?set_language=<?php echo $temp_language_key; ?> "> <?php echo Assets::img('languages/' . $temp_language['picture'], tooltip2($temp_language['name'])); ?> </a> <? endforeach; ?> </td> <td> <a href="dispatch.php/siteinfo/show"> <?php echo _("mehr"); ?> ... </a> </td> </tr> </table> <a href="http://www.studip.de"> <?php echo Assets::img('logos/logoklein@2x.png', tooltip2(_('Zur Portalseite')) + array('size' => '215@83')); ?> </a> </footer> </div>
/** * Returns a given text as html tooltip * * title and alt attribute is default, with_popup means a JS alert box * activated on click * * @param string $text * @param boolean $with_alt return text with alt attribute * @param boolean $with_popup return text with JS alert box on click * @return string */ function tooltip($text, $with_alt = TRUE, $with_popup = FALSE) { $result = ''; foreach (tooltip2($text, $with_alt, $with_popup) as $key => $value) { $result .= sprintf(' %s="%s"', $key, $value); } return $result; }
<? endif ?> <?php echo _("[versteckt]"); ?> <?php echo tooltipicon($infotext); ?> <? endif ?> </td> <td> <? if (!$sem_class['studygroup_mode']) : ?> <a data-dialog href="<?php echo $controller->url_for(sprintf('course/details/index/%s', $course['seminar_id'])); ?> "> <? $params = tooltip2(_("Veranstaltungsdetails")); ?> <? $params['style'] = 'cursor: pointer'; ?> <?php echo Icon::create('info-circle', 'inactive')->asImg(20, $params); ?> </a> <? else : ?> <?php echo Assets::img('blank.gif', array('width' => 20, 'height' => 20)); ?> <? endif ?> </td> <td style="text-align: left; white-space: nowrap;"> <? if (!empty($course['navigation'])) : ?> <? foreach (MyRealmModel::array_rtrim($course['navigation']) as $key => $nav) : ?> <? if (isset($nav) && $nav->isVisible(true)) : ?>