本文整理汇总了PHP中Studip\Button::createCancel方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::createCancel方法的具体用法?PHP Button::createCancel怎么用?PHP Button::createCancel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Studip\Button
的用法示例。
在下文中一共展示了Button::createCancel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlReady
//.........这里部分代码省略.........
echo _("Ersteller");
?>
</label>
<input type="radio" onChange="jQuery(this).closest('form').submit()" name="reply_recipients" id="reply_recipients_lecturer" value="lecturer" <?php
echo $reqObj->reply_recipients == 'lecturer' ? 'checked' : '';
?>
>
<label for="reply_recipients_lecturer">
<?php
echo _("Ersteller und alle Lehrenden");
?>
</label>
<br>
<b><?php
echo "Anfrage markieren";
?>
:</b><br>
<input type="radio" onChange="jQuery(this).closest('form').submit()" name="request_user_status" id="request_user_status_0" value="0" checked>
<label for="request_user_status_0">
<?php
echo _("unbearbeitet");
?>
</label>
<input type="radio" onChange="jQuery(this).closest('form').submit()" name="request_user_status" id="request_user_status_1" value="1" <?php
echo $user_status_mkdate ? 'checked' : '';
?>
>
<label for="request_user_status_1">
<?php
echo _("bearbeitet");
?>
</label>
<br><br>
<b><?php
echo _("Kommentar zur Belegung (intern)");
?>
:</b><br><br>
<textarea name="comment_internal" style="width: 90%" rows="2"></textarea>
</td>
</tr>
<tr>
<td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">
</td>
<td class="<? echo $cssSw->getClass() ?>" colspan="2" width="96%" valign="top" align="center">
<div class="button-group">
<?
// can we dec?
if ($_SESSION['resources_data']["requests_working_pos"] > 0) {
$d = -1;
if ($_SESSION['resources_data']["skip_closed_requests"])
while ((!$_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $d]["request_id"]]) && ($_SESSION['resources_data']["requests_working_pos"] + $d > 0))
$d--;
if ((sizeof($_SESSION['resources_data']["requests_open"]) > 1) && (($_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $d]["request_id"]]) || (!$_SESSION['resources_data']["skip_closed_requests"])))
$inc_possible = TRUE;
}
if ($inc_possible) {
echo Button::create('<< ' . _('Zurück'), 'dec_request');
}
echo Button::createCancel(_('Abbrechen'), 'cancel_edit_request');
echo Button::create(_('Löschen'), 'delete_request');
if ((($reqObj->getResourceId()) || (sizeof($matching_rooms)) || (sizeof($clipped_rooms)) || (sizeof($grouped_rooms))) &&
((is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) || ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["assign_objects"]))) {
echo Button::createAccept(_('Speichern'), 'save_state');
echo Button::createCancel(_('Ablehnen'), 'suppose_decline_request');
}
// can we inc?
if ($_SESSION['resources_data']["requests_working_pos"] < sizeof($_SESSION['resources_data']["requests_working_on"])-1) {
$i = 1;
if ($_SESSION['resources_data']["skip_closed_requests"])
while ((!$_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $i]["request_id"]]) && ($_SESSION['resources_data']["requests_working_pos"] + $i < sizeof($_SESSION['resources_data']["requests_working_on"])-1))
$i++;
if ((sizeof($_SESSION['resources_data']["requests_open"]) > 1) && (($_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $i]["request_id"]]) || (!$_SESSION['resources_data']["skip_closed_requests"])))
$dec_possible = TRUE;
}
if ($dec_possible) {
echo Button::create(_('Weiter') . ' >>', 'inc_request');
}
?>
</div>
<?
if (sizeof($_SESSION['resources_data']["requests_open"]) > 1)
printf ("<br><font size=\"-1\">" . _("<b>%s</b> von <b>%s</b> Anfragen in der Bearbeitung wurden noch nicht aufgelöst.") . "</font>", sizeof($_SESSION['resources_data']["requests_open"]), sizeof($_SESSION['resources_data']["requests_working_on"]));
printf ("<br><font size=\"-1\">" . _("Aktueller Request: ")."<b>%s</b></font>", $_SESSION['resources_data']["requests_working_pos"]+1);
?>
</td>
</tr>
</table>
</form>
<br><br>
<?
}
示例2: Lebenslauf
<label class="file-upload">
Lebenslauf (Datei)
<input type="file">
</label>
</fieldset>
<fieldset>
<label>
Einrichtung
<input type="text" class="size-l">
</label>
<label>
Lebenslauf
<textarea class="size-l"></textarea>
</label>
</fieldset>
<footer>
<?php
echo \Studip\Button::createAccept(_("Speichern"));
?>
<?php
echo \Studip\Button::createCancel(_("Abbrechen"));
?>
</footer>
</form>
示例3: checkIntegrity
/**
* check db-integrity
*
* checks if there are broken links in the database
* @access public
* @return boolean successful
*/
function checkIntegrity()
{
global $ELEARNING_INTERFACE_MODULES, $messages;
$db = DBManager::get();
foreach ($ELEARNING_INTERFACE_MODULES as $cms_type => $data) {
$cmsystems[$cms_type] = array();
}
$config = Config::get();
foreach ($config->getFields('global', null, 'ELEARNING_INTERFACE_') as $key) {
$parts = explode("_", $key);
$cmsystems[$parts[2]]["config"]++;
}
$rs = $db->query("SELECT external_user_system_type, COUNT(*) as c FROM auth_extern GROUP BY external_user_system_type");
while ($row = $rs->fetch()) {
$cmsystems[$row["external_user_system_type"]]["accounts"] = $row['c'];
}
$rs = $db->query("SELECT system_type, COUNT(*) FROM object_contentmodules GROUP BY system_type");
while ($row = $rs->fetch()) {
$cmsystems[$row["system_type"]]["modules"] = $row['c'];
}
if (Request::submitted('delete')) {
$messages["info"] .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">";
$messages["info"] .= CSRFProtection::tokenTag();
$messages["info"] .= "<table>";
$messages["info"] .= "<tr><td> </td></tr>";
$messages["info"] .= "<tr><td>" . sprintf(_("Durch das Löschen der Daten zum System mit dem Index \"%s\" werden %s Konfigurationseinträge und Verknüpfungen von Stud.IP-Veranstaltungen und -User-Accounts unwiederbringlich aus der Stud.IP-Datenbank entfernt. Wollen Sie diese Daten jetzt löschen?"), Request::quoted('delete_cms'), $cmsystems[Request::quoted('delete_cms')]["accounts"] + $cmsystems[Request::quoted('delete_cms')]["modules"] + $cmsystems[Request::quoted('delete_cms')]["config"]) . "</td></tr>";
$messages["info"] .= "<tr><td align=\"center\"><input type=\"hidden\" name=\"delete_cms\" value=\"" . Request::quoted('delete_cms') . "\">";
$messages["info"] .= '<div class="button-group">' . Button::create(_('Alle löschen'), 'confirm_delete') . Button::createCancel(_('Abbrechen'), 'abbruch') . '<div></td></tr>';
$messages["info"] .= "<tr><td align=\"center\"></td></tr>";
$messages["info"] .= "</table>";
$messages["info"] .= "</form>";
}
if (Request::submitted('confirm_delete')) {
unset($cmsystems[Request::quoted('delete_cms')]);
// deleteCMSData(Request::quoted('delete_cms'));
$messages["info"] .= _("Daten wurden gelöscht.");
}
foreach ($cmsystems as $cms_type => $data) {
if ($ELEARNING_INTERFACE_MODULES[$cms_type]) {
$output .= ELearningUtils::getCMSHeader($ELEARNING_INTERFACE_MODULES[$cms_type]["name"]);
$output .= "<table>";
$output .= "<tr><td colspan=\"2\"> </td></tr>";
if (ELearningUtils::getConfigValue("ACTIVE", $cms_type)) {
$output .= "<tr><td>" . Icon::create('checkbox-checked', 'clickable')->asImg(['class' => 'text-top']) . "</td><td><b>" . sprintf(_("Die Schnittstelle zum System %s ist aktiv."), $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</b></td></tr>";
$output .= "<tr><td colspan=\"2\"> </td></tr>";
} elseif ($data["config"] < 1) {
$output .= "<tr><td>" . Icon::create('checkbox-unchecked', 'clickable')->asImg(['class' => 'text-top']) . "</td><td><i>" . sprintf(_("Die Schnittstelle für das System %s wurde noch nicht eingerichtet."), $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</i></td></tr>";
} elseif ($data["config"] < 1) {
$output .= "<tr><td>" . Icon::create('checkbox-unchecked', 'clickable')->asImg(['class' => 'text-top']) . "</td><td><i>" . sprintf(_("Die Schnittstelle wurde noch nicht aktiviert."), $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</i></td></tr>";
}
if ($data["accounts"]) {
$output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Stud.IP-User-Accounts sind mit Accounts im System %s verknüpft."), $data["accounts"], $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</td></tr>";
}
if ($data["modules"]) {
$output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Objekte sind Stud.IP-Veranstaltungen oder -Einrichtungen zugeordnet."), $data["modules"]) . "</td></tr>";
}
if ($data["config"]) {
$output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Einträge in der config-Tabelle der Stud.IP-Datenbank."), $data["config"]) . "</td></tr>";
}
$output .= "<tr><td colspan=\"2\"> </td></tr>";
$output .= "</table>";
$output .= ELearningUtils::getCMSFooter($ELEARNING_INTERFACE_MODULES[$cms_type]["logo_file"] ? "<img src=\"" . $ELEARNING_INTERFACE_MODULES[$cms_type]["logo_file"] . "\" border=\"0\">" : $cms_type);
} else {
$output .= ELearningUtils::getCMSHeader("<font color=FF0000> Unbekanntes System: " . $cms_type . "</font>");
$output .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">";
$output .= CSRFProtection::tokenTag();
$output .= "<table>";
$output .= "<tr><td colspan=\"2\"> </td></tr>";
$output .= "<tr><td>" . Icon::create('decline', 'attention')->asImg(['class' => 'text-top']) . "</td><td><i>" . sprintf(_("Für das System mit dem Index \"%s\" existieren keine Voreinstellungen in den Konfigurationsdateien mehr."), $cms_type) . "</i></td></tr>";
$output .= "<tr><td colspan=\"2\"> </td></tr>";
$output .= "<tr><td colspan=\"2\"><b>" . _("In der Stud.IP-Datenbank sind noch folgende Informationen zu diesem System gespeichert:") . "</b></td></tr>";
if ($data["accounts"]) {
$output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Stud.IP-User-Accounts sind mit externen Accounts mit dem Index \"%s\" verknüpft."), $data["accounts"], $cms_type) . "</td></tr>";
}
if ($data["modules"]) {
$output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Objekte sind Stud.IP-Veranstaltungen oder -Einrichtungen zugeordnet."), $data["modules"]) . "</td></tr>";
}
if ($data["config"]) {
$output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Einträge in der config-Tabelle der Stud.IP-Datenbank."), $data["config"]) . "</td></tr>";
}
$output .= "<tr><td colspan=\"2\"> </td></tr>";
$output .= "<tr><td align=\"center\" colspan=\"2\"><input type=\"hidden\" name=\"delete_cms\" value=\"" . $cms_type . "\">" . Button::create(_('Löschen'), 'delete') . "</td></tr>";
$output .= "<tr><td colspan=\"2\"> </td></tr>";
$output .= "</table>";
$output .= "</form>";
$output .= ELearningUtils::getCMSFooter('');
}
$output .= "<br>";
}
return $output;
}
示例4: testCreateCancel
function testCreateCancel()
{
$this->assertEquals('<button type="submit" class="cancel button" name="cancel">Abbrechen</button>', '' . Button::createCancel());
}
示例5: array
use Studip\Button, Studip\LinkButton;
?>
<div id="conditionfields">
<?php
echo $this->render_partial('userfilter/field/configure.php', array('is_first' => true));
?>
</div>
<br/>
<a href="#" onclick="return STUDIP.UserFilter.addConditionField('conditionfields', '<?php
echo $controller->url_for('userfilter/field/configure');
?>
')">
<?php
echo Icon::create('add', 'clickable')->asImg(16, ["alt" => _('Auswahlfeld hinzufügen')]);
?>
<?php
$text = _('Auswahlfeld hinzufügen');
echo $text;
?>
</a>
<br/><br/>
<div class="submit_wrapper" data-dialog-button>
<?php
echo Button::createAccept(_('Speichern'), 'submit', array('onclick' => "STUDIP.UserFilter.addCondition('" . $containerId . "', '" . $controller->url_for('userfilter/filter/add') . "');"));
?>
<?php
echo Button::createCancel(_('Abbrechen'));
?>
</div>
示例6: array
echo Button::create(_('Tour neu beginnen'), 'tour_reset', array('id' => 'tour_reset', 'style' => 'display:none'));
?>
</td>
<td width="120" style="text-align: center">
<?php
echo Button::create(_('Weiter'), 'tour_next', array('id' => 'tour_next'));
?>
<?php
echo Button::create(_('Tour fortsetzen'), 'tour_proceed', array('id' => 'tour_proceed', 'style' => 'display:none'));
?>
</td>
<td width="120" style="text-align: center">
<?php
echo Button::createCancel(_('Abbrechen'), 'tour_cancel', array('id' => 'tour_cancel', 'style' => 'display:none'));
?>
<?php
echo Button::createCancel(_('Beenden'), 'tour_end', array('id' => 'tour_end'));
?>
</td>
</tr>
</table>
</div>
</div>
<div id="tour_tip" class="tour_tip" style="display: none">
<div id="tour_tip_title"></div>
<div id="tour_tip_content"></div>
</div>
<div id="tour_tip_interactive" class="tour_tip" style="display: none">
<div id="tour_tip_title"></div>
<div id="tour_tip_content"></div>
</div>
示例7: display_folder_body
/**
* Displays the body of a folder including the description, changeform, subfolder and files
*
*/
function display_folder_body($folder_id, $open, $change, $move, $upload, $refresh=FALSE, $filelink="", $anchor_id, $level = 0) {
global $_fullname_sql, $SessionSeminar, $SemUserStatus, $SessSemName, $user, $perm, $rechte, $countfolder;
$db = DBManager::get();
//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();
$document_count = doc_count($folder_id);
$super_folder = $folder_tree->getNextSuperFolder($folder_id);
$is_issue_folder = ((count($folder_tree->getParents($folder_id)) > 1) && IssueDB::isIssue($result["range_id"]));
if ($is_issue_folder) {
$dates_for_issue = IssueDB::getDatesforIssue($result['range_id']);
}
print "<table cellpadding=0 border=0 cellspacing=0 width=\"100%\">";
//Ausgabe der Optionen zu dem Ordner mit Beschreibung, Knöpfen und PiPaPo
print "<tr>";
if ((($document_count > 0) || ($folder_tree->hasKids($folder_id))) && ($folder_tree->isReadable($folder_id))) {
print "<td style=\"background-image: url(".Assets::image_path('datatree_grau.gif') . "); background-repeat: repeat-y;\">";
print Assets::img('datatree_grau.gif');
print "</td>";
} else {
print "<td class=\"printcontent\"> </td>";
}
print "<td width=100% class=\"printcontent\" style=\"font-align: center\">";
$content='';
if ($super_folder){
$content .= Icon::create('lock-locked', 'inactive')->asImg(['class' => 'texttop']) . ' '
. sprintf(_("Dieser Ordner ist nicht zugänglich, da der übergeordnete Ordner \"%s\" nicht lesbar oder nicht sichtbar ist!"), htmlReady($folder_tree->getValue($super_folder,'name')))
. '<hr>';
}
if ($folder_tree->isExerciseFolder($folder_id)){
$content .= Icon::create('edit', 'inactive')->asImg(['class' => 'texttop']) . ' '
. _("Dieser Ordner ist ein Hausaufgabenordner. Es können nur Dateien eingestellt werden.")
. (!$rechte ? _("Sie selbst haben folgende Dateien in diesen Ordner eingestellt:")
. '<br><b>' . htmlReady(join('; ', get_user_documents_in_folder($folder_id, $GLOBALS['user']->id))).'</b>' : '')
. '<hr>';
}
if ($is_issue_folder) {
$dates = array();
foreach ($dates_for_issue as $date) {
$dates[] = strftime("%x", $date['date']);
}
$content .= _("Dieser Ordner ist ein themenbezogener Dateiordner.");
if(count($dates)){
$content .= ' ' ._("Folgende Termine sind diesem Thema zugeordnet:")
. '<br><b>' . htmlReady(join('; ', $dates)).'</b>';
}
$content .= '<hr>';
}
$is_group_folder = $folder_tree->isGroupFolder($folder_id);
if ($is_group_folder){
$content .= sprintf(
_('Dieser Ordner gehört der Gruppe <b>%s</b>. Nur Mitglieder dieser Gruppe können diesen Ordner sehen.'
. ' Dieser Ordner kann nicht verschoben oder kopiert werden.'),
htmlReady(GetStatusgruppeName($result["range_id"]))
) . '<hr>';
}
//Contentbereich erstellen
if ($change == $folder_id) { //Aenderungsmodus, zweiter Teil
$content .= '<textarea name="change_description"'
. ' style="width:98%" class="add_toolbar wysiwyg"'
. ' aria-label="Beschreibung des Ordners eingeben"'
. ' rows="3">'
. formatReady($result["description"])
. '</textarea>';
if($rechte){
$content .= '<div>';
if ($folder_tree->permissions_activated){
$content.= "\n<label><input style=\"vertical-align:middle\" type=\"checkbox\" value=\"1\" ".($folder_tree->isReadable($folder_id) ? "CHECKED" : "" ) . " name=\"perm_read\"> ";
$content.= '<b>r</b> - ' . _("Lesen (Dateien können heruntergeladen werden)");
$content.= "</label>\n<br><label><input style=\"vertical-align:middle\" type=\"checkbox\" value=\"1\" ".($folder_tree->isWritable($folder_id) ? "CHECKED" : "" ) . " name=\"perm_write\"> ";
$content.= '<b>w</b> - ' . _("Schreiben (Dateien können heraufgeladen werden)");
$content.= "</label>\n<br><label><input style=\"vertical-align:middle\" type=\"checkbox\" value=\"1\" ".($folder_tree->isExecutable($folder_id) ? "CHECKED" : "" ) . " name=\"perm_exec\"> ";
$content.= '<b>x</b> - ' . _("Sichtbarkeit (Ordner wird angezeigt)") . '</label>';
}
if($level == 0 && $folder_tree->entity_type == 'sem'){
$content .= "\n<br><label><input style=\"vertical-align:middle\" type=\"checkbox\" value=\"1\" ".($folder_tree->checkCreateFolder($folder_id) ? "CHECKED" : "" ) . " name=\"perm_folder\"> ";
$content .= '<b>f</b> - ' . _("Ordner erstellen (Alle Nutzer können Ordner erstellen)") . '</label>';
}
$content .= '</div>';
}
$content .= '<div class="button-group">';
$content .= Button::createAccept(_("Übernehmen"));
$content .= Button::createCancel(_("Abbrechen"), "cancel");
$content .= '</div>';
$content.= "\n<input type=\"hidden\" name=\"open\" value=\"".$folder_id."_sc_\">";
$content.="\n<input type=\"hidden\" name=\"type\" value=\"1\">";
//.........这里部分代码省略.........
示例8: array
<?php
echo $this->render_partial('course/enrolment/_priocourses.php');
?>
<div data-dialog-button>
<?php
echo Studip\Button::createAccept(_("Speichern"), 'claim', array('data-dialog' => ''));
?>
</div>
<? else : ?>
<? if (!$already_claimed) :?>
<?php
echo \Studip\Button::createAccept(_("Zur Platzverteilung anmelden"), 'claim', array('data-dialog' => ''));
?>
<? else : ?>
<?php
echo \Studip\Button::createCancel(_("Von der Platzverteilung abmelden"), 'claim', array('data-dialog' => ''));
?>
<? endif ?>
<input type="hidden" name="courseset_claimed" value="<?php
echo $already_claimed ? '0' : '1';
?>
" >
<div>
(<?php
echo sprintf(_("max. Teilnehmeranzahl: %s / Anzahl der Anmeldungen: %s"), $priocourses->admission_turnout, $num_claiming);
?>
)
</div>
<? endif ?>
<div data-dialog-button>
<?php
示例9: foreach
echo '</div></td><td class="blank" width="60%" style="white-space: nowrap;">';
echo "\n" . Icon::create('arr_2right', 'sort', ['title' => _('In diese Einrichtung verschieben / kopieren')])->asInput(array('name'=>'move_to_inst','id'=>'move_to_inst_arrow','class'=>'middle'));
echo "\n" . '<select id="inst_move_id" name="inst_move_id[]" style="width:60%">';
foreach ($my_inst as $id => $name){
echo "\n" . '<option value="'.$id.'">' . htmlReady(my_substr($name,0,70)) . '</option>';
}
echo "\n" . '</select>';
if ($config['FILESYSTEM_MULTICOPY_ENABLE'] && $open_cmd != 'm') {
echo "\n<a href=\"\" onClick=\"STUDIP.MultiSelect.create('#inst_move_id', 'Institute'); $(this).hide(); return false\">".Icon::create('add', 'clickable', ['title' => _("Mehrere Einrichtungen auswählen"), "class" => "middle"])->asImg()."</a>";
}
echo "\n</td>";
echo "\n" . '<td class="blank">';
echo Button::create($button_name, "move_to_inst");
echo "\n</td></tr><tr>";
echo "\n" . '<td class="blank" align="center" colspan="3" width="100%" >';
echo Button::createCancel(_("Verschieben / Kopieren abbrechen"), 'cancel');
echo "\n" . '</td></tr></form>';
}
} elseif($folder_system_data['mode']){
echo "\n" . '<td class="blank" align="center" colspan="3" width="100%" >';
echo "\n" . '<span style="margin:25px;font-weight:bold;">';
echo "\n" . ($folder_system_data["mode"] == 'move' ? _("Verschiebemodus") : _("Kopiermodus")) . "</span>";
echo LinkButton::create(_("Abbrechen"), URLHelper::getURL('?cmd=tree'));
echo "\n" . '</td></tr>';
}
print "<tr><td class=\"blank\" colspan=\"3\" width=\"100%\">";
//when changing, uploading or show all (for download selector), create a form
示例10: createEvalRow
/**
* Test...
* @access public
* @param object Evaluation $eval The evaluation
* @param string $number
* @param string $state
* @param string $open
* @param boolean $returnRow
*/
function createEvalRow($eval, $number, $state, $open, $returnRow = false)
{
/* initialize variables -------- */
$evalID = $eval->getObjectID();
$numberOfVotes = EvaluationDB::getNumberOfVotes($evalID);
$no_permissons = EvaluationObjectDB::getEvalUserRangesWithNoPermission($eval);
if ($eval->getAuthor() != $user->id && $no_permissons) {
$no_buttons = 1;
}
$style = $number % 2 ? "table_row_odd" : ($number == 0 ? "content_body" : "table_row_even");
$startDate = $eval->getStartdate() == NULL ? " " : date("d.m.Y", $eval->getStartdate());
$stopDate = $eval->getRealStopdate() == NULL ? " " : date("d.m.Y", $eval->getRealStopdate());
$link = "?rangeID=" . $_SESSION["rangeID"];
if ($open == NO) {
$link .= '&openID=' . $evalID . '#open';
}
$titleLink = new HTML('a');
$titleLink->addAttr('href', URLHelper::getLink($link));
$arrowLink = new HTML('a');
$arrowLink->addAttr('href', URLHelper::getLink($link));
$titleLink->addContent($eval->getTitle() ? $eval->getTitle() : ' ');
switch ($state) {
case "public_template":
$arrowLink = " ";
$titleLink = $eval->getTitle() ? $eval->getTitle() : " ";
$content[0] = $eval->getFullname() ? $eval->getFullname() : " ";
$content[1] = $eval->getChangedate() == NULL ? " " : date("d.m.Y", $eval->getChangedate());
$button = LinkButton::create(_('Vorschau'), URLHelper::getURL('show_evaluation.php?evalID=' . $evalID . '&isPreview=' . YES), array('title' => _('Vorschau dieser öffentlichen Evaluationsvorlage.'), 'onClick' => 'openEval(\'' . $evalID . '\'); return false;'));
$div = new HTML("div");
$div->addHTMLContent($button);
$content[4] = $div;
$content[2] = $eval->isAnonymous() ? EvalCommon::createImage(EVAL_PIC_YES, _("ja")) : EvalCommon::createImage(EVAL_PIC_NO, _("nein"));
$copyButton = new HTMLempty("input");
$copyButton->addAttr("style", "vertical-align:middle;");
$copyButton->addAttr("type", "image");
$copyButton->addAttr("name", "copy_public_template_button");
$copyButton->addAttr("src", Icon::create('arr_2down', 'sort')->asImagePath());
$copyButton->addAttr("border", "0");
$copyButton->addAttr("alt", _("Kopieren"));
$copyButton->addAttr("title", _("Diese öffentliche Evaluationsvorlagen zu den eigenen Evaluationsvorlagen kopieren"));
$content[5] = $copyButton;
break;
case "user_template":
$arrowLink->addContent(EvalCommon::createImage($open ? EVAL_PIC_ARROW_TEMPLATE_OPEN : EVAL_PIC_ARROW_TEMPLATE, _("Aufklappen")));
$isShared = $eval->isShared() ? YES : NO;
$shareButton = new HTMLempty("input");
$shareButton->addAttr("style", "vertical-align:middle;");
$shareButton->addAttr("type", "image");
$shareButton->addAttr("name", "share_template_button");
$shareButton->addAttr("src", $isShared ? EVAL_PIC_SHARED : EVAL_PIC_NOTSHARED);
$shareButton->addAttr("border", "0");
$shareButton->addAttr("alt", $isShared ? _("als öffentliche Evaluationsvorlage Freigeben") : _("Freigabe entziehen"));
$shareButton->addAttr("title", $isShared ? _("Die Freigabe für diese Evaluationsvorlage entziehen") : _("Diese Evaluationsvorlage öffentlich freigeben"));
$content[0] = $shareButton;
$content[3] = Button::create(_('Kopie erstellen'), 'copy_own_template_button', array('title' => _('Evaluationsvorlage kopieren')));
$content[4] = LinkButton::create(_('Bearbeiten'), URLHelper::getURL("admin_evaluation.php?page=edit&evalID=" . $evalID), array('title' => _('Evaluation bearbeiten')));
$content[5] = Button::create(_('Löschen'), 'delete_request_button', array('title' => _('Evaluation löschen')));
break;
case EVAL_STATE_NEW:
$arrowLink->addContent(EvalCommon::createImage($open ? EVAL_PIC_ARROW_NEW_OPEN : EVAL_PIC_ARROW_NEW, _("Aufklappen")));
$content[0] = $eval->getFullname() ? $eval->getFullname() : " ";
$content[1] = $startDate;
if (!$no_buttons) {
$content[2] = Button::create(_('Start'), 'start_button', array('title' => _('Evaluation starten')));
$content[4] = LinkButton::create(_('Bearbeiten'), URLHelper::getURL("admin_evaluation.php?page=edit&evalID=" . $evalID), array('title' => _('Evaluation bearbeiten')));
$content[5] = Button::create(_('Löschen'), 'delete_request_button', array('title' => _('Evaluation löschen')));
}
break;
case EVAL_STATE_ACTIVE:
$arrowLink->addContent(EvalCommon::createImage($open ? EVAL_PIC_ARROW_RUNNING_OPEN : EVAL_PIC_ARROW_RUNNING, _("Aufklappen")));
$content[0] = $eval->getFullname() ? $eval->getFullname() : " ";
$content[1] = $stopDate;
if (!$no_buttons) {
$content[2] = Button::createCancel(_('Stop'), 'stop_button', array('title' => _('Evaluation stoppen')));
// Kann hier noch optimiert werden, da hasVoted () immer einen DB-Aufruf startet
$content[3] = $eval->hasVoted() ? Button::create(_('Zurücksetzen'), 'restart_request_button', array('title' => _('Evaluation zurücksetzen'))) : Button::create(_('Zurücksetzen'), 'restart_confirmed_button', array('title' => _('Evaluation zurücksetzen')));
$content[4] = Button::create(_('Export'), 'export_request_button', array('title' => _('Evaluation exportieren')));
$content[5] = Button::create(_('Löschen'), 'delete_request_button', array('title' => _('Evaluation löschen')));
//$content[6] = EvalCommon::createSubmitButton ("auswertung", _("Auswertung"), "export_gfx_request_button");
$content[6] = LinkButton::create(_('Auswertung'), URLHelper::getURL("eval_summary.php?eval_id=" . $evalID), array('title' => _('Auswertung')));
}
break;
case EVAL_STATE_STOPPED:
$arrowLink->addContent(EvalCommon::createImage($open ? EVAL_PIC_ARROW_STOPPED_OPEN : EVAL_PIC_ARROW_STOPPED, _("Aufklappen")));
$content[0] = $eval->getFullname() ? $eval->getFullname() : " ";
//$content[1] = $eval->isVisible() ? "yes" : "no";
if (!$no_buttons) {
$content[2] = Button::create(_('Fortsetzen'), 'continue_button', array('title' => _('Evaluation fortsetzen')));
$content[3] = $eval->hasVoted() ? Button::create(_('Zurücksetzen'), 'restart_request_button', array('title' => _('Evaluation zurücksetzen'))) : Button::create(_('Zurücksetzen'), 'restart_confirmed_button', array('title' => _('Evaluation zurücksetzen')));
$content[4] = Button::create(_('Export'), 'export_request_button', array('title' => _('Evaluation exportieren')));
$content[5] = Button::create(_('Löschen'), 'delete_request_button', array('title' => _('Evaluation löschen')));
//.........这里部分代码省略.........
示例11: _
echo Icon::create('trash', 'clickable')->asImg();
?>
</a>
</td>
</tr>
<? endforeach; ?>
</tbody>
<tfoot>
<tr>
<td>
<input class="middle" type="checkbox" data-proxyfor=":checkbox[name^=smiley_id]"
data-activates="button[name=bulk-delete]"
name="check_all" title="<?php
echo _('Alle Benutzer auswählen');
?>
">
</td>
<td colspan="<?php
echo $favorites_enabled ? 7 : 6;
?>
">
<?php
echo Studip\Button::createCancel(_('Markierte löschen'), 'bulk-delete');
?>
</td>
</tr>
</tfoot>
<? endif; ?>
</table>
</form>
示例12: if
<form method="post" data-dialog="size=auto;reload-on-close" action="<?php
echo $controller->link_for('news/rss_config/' . $range_id);
?>
">
<div style="text-align:center">
<? if (!$rss_id) :?>
<?php
echo \Studip\Button::createAccept(_("RSS Export aktivieren"), 'rss_on');
?>
<? else : ?>
<?php
echo \Studip\Button::createCancel(_("RSS Export deaktivieren"), 'rss_off');
?>
<? endif ?>
</div>
</form>
示例13: _
</ul>
</div>
<? endif ?>
<div style="margin-top: 0.5em; text-align: left;">
<input id="documents" name="documents" value="1" checked type="checkbox">
<label style="padding-left:0.5em" for="documents"><?php
echo _("Dokumente löschen?");
?>
</label>
</div>
<div style="margin-top: 0.5em; text-align: left;">
<input id="mail" name="mail" value="1" checked type="checkbox">
<label style="padding-left:0.5em" for="mail"><?php
echo _("Emailbenachrichtigung verschicken?");
?>
</label>
</div>
<div class="buttons">
<?php
echo Button::createAccept(_('JA!'), 'delete', array('title' => _('Benutzer löschen')));
?>
<span style="margin-left: 1em;">
<?php
echo Button::createCancel(_('NEIN!'), 'back');
?>
</span>
</div>
</form>
</div>
</div>
</div>
示例14: array
<?php
echo CSRFProtection::tokenTag();
?>
<?php
echo $this->render_partial('shared/question2-parameters.php', array('parameters' => $approvParams));
?>
<?php
echo Button::createAccept(_('JA!'), 'yes', array('style' => 'float: left'));
?>
</form>
<form action="<?php
echo $approvalLink;
?>
" method="post">
<?php
echo CSRFProtection::tokenTag();
?>
<?php
echo $this->render_partial('shared/question2-parameters.php', array('parameters' => $disapproveParams));
?>
<?php
echo Button::createCancel(_('NEIN!'), 'no', array('style' => 'float: left'));
?>
</form>
</div>
</div>
</div>
</div>
示例15: showDeleteAllDialog
/**
* Display yes/no dialog to confirm complete WikiPage deletion.
*
* @param string WikiPage name
*
**/
function showDeleteAllDialog($keyword) {
global $perm, $SessSemName;
if (!$perm->have_studip_perm("tutor", $SessSemName[1])) {
throw new AccessDeniedException(_('Sie haben keine Berechtigung, Seiten zu löschen.'));
}
$msg= sprintf(_("Wollen Sie die Seite %s wirklich vollständig - mit allen Versionen - löschen?"), "<b>".htmlReady($keyword)."</b>") . "<br>\n";
if ($keyword=="WikiWikiWeb") {
$msg .= "<p>" . _("Sie sind im Begriff die Startseite zu löschen, die dann durch einen leeren Text ersetzt wird. Damit wären auch alle anderen Seiten nicht mehr direkt erreichbar.") . "</p>";
} else {
$numbacklinks=count(getBacklinks($keyword));
if ($numbacklinks == 0) {
$msg .= _("Auf diese Seite verweist keine andere Seite.").'<br>';
} else if ($numbacklinks == 1) {
$msg .= _("Auf diese Seite verweist 1 andere Seite.").'<br>';
} else {
$msg .= sprintf(_("Auf diese Seite verweisen %s andere Seiten."), count(getBacklinks($keyword)));
}
}
//TODO: modaler dialog benutzen
$msg.="<a href=\"".URLHelper::getLink("?cmd=really_delete_all&keyword=".urlencode($keyword))."\">" .Button::createAccept(_('Ja!')) . "</a> \n";
$lnk = "?keyword=".urlencode($keyword); // what to do when delete is aborted
if (!$islatest) $lnk .= "&version=$version";
$msg.="<a href=\"".URLHelper::getLink($lnk)."\">" . Button::createCancel(_('NEIN!')) . "</a>\n";
PageLayout::postMessage(MessageBox::info($msg));
}