/**
		  * Draws the layout-element
		  */
		function draw() {
			echo WUIObject::std_header();

			LinkButton::draw();
			echo WUIObject::std_footer();
			return $this->columns;
		}
Ejemplo n.º 2
0
 public function render()
 {
     $this->linkAttributes = "onclick=\"\$('#{$this->id}').toggle('fast')\"";
     $menu = "<ul class='toolbar-menu' id='{$this->id}'>";
     foreach ($this->items as $item) {
         $menu .= "<li><a class=' toolbar-toolitem' href='{$item['link']}' onclick=\"{$item['onclick']}\">{$item['label']}</a></li>";
     }
     $menu .= "</ul>";
     return parent::render() . $menu;
 }
Ejemplo n.º 3
0
 /**
  * Draw HTML output
  */
 function draw()
 {
     global $c, $sid, $lang;
     echo '<form name="form1">';
     echo '<td colspan="' . $this->cells . '"><table width="100%" border="0" cellpadding="3" cellspacing="0"><tr>';
     $widget = new Cell("clc", "", 2, $this->width, 20);
     $widget->draw();
     echo "</tr><tr>\n";
     $widget = new Label("lbl", $this->headline, "stats_headline", 2);
     $widget->draw();
     echo "</tr>\n";
     echo "<tr><td colspan=\"" . $this->cells . "\" class=\"bcopy\">" . $lang->get("pta", "Select page to analyze:") . "</td></tr>";
     echo "<tr>";
     $this->sps->draw();
     echo "<td> ";
     $lbi = new LinkButton("action", $lang->get("go", "Go"), "navelement", "submit");
     $lbi->draw();
     retain("action", "");
     retain("sid", $sid);
     echo "</td></tr></table></td>";
     echo "</form>";
     return $this->cells;
 }
Ejemplo n.º 4
0
        <? foreach (array(1,2,3,4,5,6,0) as $day) : ?>
            <label>
                <input type="checkbox" name="days[]" value="<?php 
echo $day;
?>
"
                    <?php 
echo in_array($day, $settings['glb_days']) !== false ? 'checked="checked"' : '';
?>
>
                <?php 
echo getWeekDay($day, false);
?>
            </label><br>
        <? endforeach ?>
        <span class="invalid_message"><?php 
echo _("Bitte mindestens einen Wochentag auswählen.");
?>
</span><br>
    </div>

    <div style="text-align: center; clear: both" data-dialog-button>
        <?php 
echo Button::createSuccess(_('Speichern'), array('onclick' => "return STUDIP.Calendar.validateNumberOfDays();"));
?>
        <?php 
echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('calendar/schedule/#'));
?>
    </div>
</form>
Ejemplo n.º 5
0
echo $audience ? htmlReady($audience->range_id) : '';
?>
"
            placeholder="<?php 
echo _('interne ID des Objekts');
?>
"/-->
        <div class="submit_wrapper">
            <?php 
echo CSRFProtection::tokenTag();
?>
            <?php 
echo Button::createAccept(_('Speichern'), 'save_tour_details');
?>
            <?php 
echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('tour/admin_overview'));
?>
        </div>
    </fieldset>
    <? if (!$tour->isNew()) :?>
    <table class="default">
        <caption>
            <div class="step_list_title"><?php 
echo _('Schritte');
?>
</div>
        </caption>
        <colgroup>
            <col width="2%">
            <col width="25%">
            <col>
Ejemplo n.º 6
0
            <? endforeach; ?>
                <td>
                    <input type="checkbox" name="all[rows][]" value="<?php 
echo $member['seminar_id'];
?>
"
                           <? if (isset($checked[$member['seminar_id']]) && count(array_filter($checked[$member['seminar_id']])) == count($modules) + 1) echo 'checked'; ?>>
                </td>
            </tr>
        <? endforeach; ?>
    <? endif; ?>
        </tbody>
<? endforeach; ?>
        <tfoot>
            <tr>
                <td colspan="<?php 
echo count($modules) + 3;
?>
">
                    <?php 
echo Button::create(_('Übernehmen'), 'store', array('title' => _('Änderungen übernehmen')));
?>
                    <?php 
echo LinkButton::create(_('Zurücksetzen'), $controller->url_for('settings/notification'));
?>
                </td>
            </tr>
        </tfoot>
    </table>
</form>
Ejemplo n.º 7
0
    <a href="<?php 
echo URLHelper::getLink('seminar_main.php?auswahl=' . $show_entry['id']);
?>
"><?php 
echo _("Zur Veranstaltung");
?>
</a><br>
    <? endif ?>
    <br>

    <div style="text-align: center" data-dialog-button>
        <?php 
echo Button::createAccept(_('Speichern'), array('style' => 'margin-right: 20px'));
?>

        <? if (!$show_entry['visible']) : ?>
            <?php 
echo LinkButton::create(_('Einblenden'), $controller->url_for('calendar/schedule/bind/' . $show_entry['id'] . '/' . $show_entry['cycle_id'] . '/' . '?show_hidden=1'), array('style' => 'margin-right: 20px'));
?>
        <? else : ?>
            <?php 
echo LinkButton::create($show_entry['type'] == 'virtual' ? _('Löschen') : _('Ausblenden'), $controller->url_for('calendar/schedule/unbind/' . $show_entry['id'] . '/' . $show_entry['cycle_id']), array('style' => 'margin-right: 20px'));
?>
        <? endif ?>

        <?php 
echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('calendar/schedule'), array('onclick' => "jQuery('#edit_sem_entry').fadeOut('fast'); STUDIP.Calendar.click_in_progress = false; return false"));
?>
    </div>
</form>
Ejemplo n.º 8
0
echo _("Beschreibung");
?>
:</b>
    <textarea name="entry_content" style="width: 98%" rows="7"><?php 
echo htmlReady($show_entry['content']);
?>
</textarea>
    <br>
    <div style="text-align: center" data-dialog-button>
        <?php 
echo Button::createAccept(_('Speichern'), array('style' => 'margin-right: 20px'));
?>

        <? if ($show_entry['id']) : ?>
            <?php 
echo LinkButton::create(_('Löschen'), $controller->url_for('calendar/schedule/delete/' . $show_entry['id']), array('style' => 'margin-right: 20px'));
?>
        <? endif ?>

        <? if ($show_entry) : ?>
            <?php 
echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('calendar/schedule'), array('onclick' => 'STUDIP.Schedule.cancelNewEntry(); STUDIP.Calendar.click_in_progress = false;return false;'));
?>
        <? else: ?>
            <?php 
echo LinkButton::createCancel(_('Abbrechen'), 'javascript:STUDIP.Schedule.cancelNewEntry()');
?>
        <? endif ?>
    </div>
</form>
Ejemplo n.º 9
0
echo _('Hilfe-Text:');
?>
        </label>
        <textarea cols="60" rows="5" name="help_content_content"
            placeholder="<?php 
echo _('Bitte geben Sie den Text ein');
?>
"><?php 
echo $help_content->content ? htmlReady($help_content->content) : '';
?>
</textarea>
        <div "data-dialog-button" = "1">
            <?php 
echo CSRFProtection::tokenTag();
?>
            <? if ($via_ajax): ?>
                <?php 
echo Button::create(_('Speichern'), 'save_help_content', array('data-dialog' => '1', 'data-dialog-button' => '1'));
?>
            <? else: ?>
                <?php 
echo Button::createAccept(_('Speichern'), 'save_help_content');
?>
                <?php 
echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('help_content/admin_overview'), array());
?>
            <? endif; ?>
        </div>
    </fieldset>
</form>
</div>
Ejemplo n.º 10
0
 private function deleteContent($plugmodlist)
 {
     $name = Request::Get('name');
     foreach ($plugmodlist as $key => $val) {
         if (array_key_exists($name, $val)) {
             if ($val[$name]['type'] == 'plugin') {
                 $class = PluginEngine::getPlugin(get_class($val[$name]['object']));
                 $displayname = $class->getPluginName();
             } elseif ($val[$name]['type'] == 'modul') {
                 if ($this->sem_class) {
                     $class = $this->sem_class->getModule($this->sem_class->getSlotModule($val[$name]['modulkey']));
                     $displayname = $val[$name]['object']['name'];
                 }
             }
         }
     }
     if (Request::submitted('check')) {
         if (method_exists($class, 'deleteContent')) {
             $class->deleteContent();
         } else {
             PageLayout::postMessage(MessageBox::info(_("Das Plugin/Modul enthält keine Funktion zum Löschen der Inhalte.")));
         }
     } else {
         PageLayout::postMessage(MessageBox::info(sprintf(_("Sie beabsichtigen die Inhalte von %s zu löschen."), $displayname) . "<br>" . _("Wollen Sie die Inhalte wirklich löschen?") . "<br>" . LinkButton::createAccept(_('Ja'), URLHelper::getURL("?deleteContent=true&check=true&name=" . $name)) . LinkButton::createCancel(_('Nein'))));
     }
 }
Ejemplo n.º 11
0
    <div>
        <div class="button-group" style="vertical-align: middle;">
            <?php 
echo Button::create(_('Zurück'), 'back', $previous === false ? array('disabled' => '') : array('value' => $previous));
?>
            <?php 
echo Button::create(_('Weiter'), 'forward', $next === false ? array('disabled' => '') : array('value' => $next));
?>
        </div>
        
        <div style="float: right;vertical-align: middle;">
            <div class="button-group" style="vertical-align: middle;">
                <?php 
echo Button::create(_('Anzeigen'), 'action', array('value' => 'display'));
?>
                <?php 
echo Button::create(_('Herunterladen'), 'action', array('value' => 'download'));
?>
                <?php 
echo Button::create(_('Installieren'), 'action', array('value' => 'install'));
?>
            </div>

            <?php 
echo LinkButton::createCancel(_('Zurücksetzen'), $controller->url_for('generator/reset'));
?>
        </div>
    </div>
</form>
Ejemplo n.º 12
0
		/**
		 * internal. Draw filter input.
		 */
		function draw_form() {
			global $lang;

			echo '<table width="170"><tr>';
			echo "<td>" . $lang->get("filter_rule", "Search for..."). "</td>";
			echo "<td>" . $lang->get("filter_column", "...in"). "</td></tr><tr>";
			$txtb = new Input("filter_rule", $this->filter_rule, "embedded", "16", "", $width = "90", "TEXT", "", 1);
			$txtb->draw();

			$select = new Dropdown("filter_column", $this->columns, "embedded", $this->filter_column, 80);
			$select->draw();
			echo "</tr><tr>";
			echo '<td colspan="2">';
			echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
			echo '<tr><td>';
			echo '<input type="hidden" name="filter" value="">';
			echo '<input type="hidden" name="clearsearch" value="">';

			$submitbutton = new Button("filter", $lang->get("search", "Search"), "navelement", "submit", "", "filter");
			$submitbutton->draw();
			echo "&nbsp;&nbsp;";
			$clearbutton = new LinkButton("clearsearch", $lang->get("search_clear", "Reset Filter"), "navelement", "submit", "document.filter.filter_rule.value='';", "filter");
			$clearbutton->draw();
			br();
			br();
			echo "</td><tr></table></td></tr></table>";			
		}
Ejemplo n.º 13
0
?>
                    </a>
                <? else: ?>
                    <?php 
echo htmlReady($consumer->title);
?>
                <? endif; ?>
                <? if ($type = $types[$consumer->type]): ?>
                    <small>(<?php 
echo htmlReady($type);
?>
)</small>
                <? endif; ?>
                </h3>
            <? if ($consumer->description): ?>
                <p><?php 
echo htmlReady($consumer->description);
?>
</p>
            <? endif; ?>
            </td>
            <td class="actions">
                <?php 
echo LinkButton::createCancel(_('App entfernen'), $controller->url_for('api/authorizations/revoke', $consumer->id), array('data-behaviour' => 'confirm'));
?>
            </td>
        </tr>
<? endforeach; ?>
    </tbody>
</table>
<? endif; ?>
Ejemplo n.º 14
0
        <thead>
            <tr>
                <th colspan="2"><?php 
echo sprintf(_('%s suchen'), htmlReady($decoratedStatusGroups['dozent']));
?>
</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    <?php 
echo QuickSearch::get('new_dozent', $search)->withButton(array('reset_button_name' => 'reset_dozent', 'search_button_name' => 'search_dozent'))->render();
?>
  
                    <input type="hidden" name="seminar_id" value="<?php 
echo $course_id;
?>
">
                </td>

                <td>
<?php 
echo Button::createAccept(_('Eintragen'), 'add_dozent', array('title' => sprintf(_("als %s eintragen"), htmlReady($decoratedStatusGroups['dozent']))));
echo LinkButton::createCancel(_('Abbrechen'), $controller->url_for('course/members/index'));
?>
                </td>
            </tr>
        </tbody>
    </table>
</form>
Ejemplo n.º 15
0
 /**
  * Displays page to add new or edit existing literature element
  */
 public function edit_element_action()
 {
     if (Request::option('reload')) {
         $this->reload = true;
     }
     if (Request::option('cmd') == "new_entry") {
         $_catalog_id = "new_entry";
     } else {
         $_catalog_id = Request::option('_catalog_id', "new_entry");
     }
     if (Request::option('return_range')) {
         $this->return_range = Request::option('return_range');
         URLHelper::addLinkParam('return_range', $this->return_range);
     }
     if ($_catalog_id == "new_entry") {
         $title = _("Literatureintrag anlegen");
     } else {
         $title = _("Literatureintrag bearbeiten");
     }
     PageLayout::setTitle($title);
     Navigation::activateItem('/tools/literature');
     //dump data into db if $_catalog_id points to a search result
     if ($_catalog_id[0] == "_") {
         $parts = explode("__", $_catalog_id);
         if ($fields = $_SESSION[$parts[0]][$parts[1]]) {
             $cat_element = new StudipLitCatElement();
             $cat_element->setValues($fields);
             $cat_element->setValue("catalog_id", "new_entry");
             $cat_element->setValue("user_id", "studip");
             if ($existing_element = $cat_element->checkElement()) {
                 $cat_element->setValue('catalog_id', $existing_element);
             }
             $cat_element->insertData();
             $_catalog_id = $cat_element->getValue("catalog_id");
             $_SESSION[$parts[0]][$parts[1]]['catalog_id'] = $_catalog_id;
             unset($cat_element);
         }
     }
     if (Request::option('cmd') == 'clone_entry') {
         $_the_element = StudipLitCatElement::GetClonedElement($_catalog_id);
         if ($_the_element->isNewEntry()) {
             $_msg = "msg§" . _("Der Eintrag wurde kopiert, Sie können die Daten jetzt ändern.") . "§";
             $_msg .= "info§" . _("Der kopierte Eintrag wurde noch nicht gespeichert.") . "§";
             //$old_cat_id = $_catalog_id;
             $_catalog_id = $_the_element->getValue('catalog_id');
         } else {
             $_msg = "error§" . _("Der Eintrag konnte nicht kopiert werden!.") . "§";
         }
     }
     if (!is_object($_the_element)) {
         $_the_element = new StudipLitCatElement($_catalog_id, true);
     }
     $_the_form = $_the_element->getFormObject();
     $_the_clipboard = StudipLitClipBoard::GetInstance();
     $_the_clip_form = $_the_clipboard->getFormObject();
     if (isset($old_cat_id) && $_the_clipboard->isInClipboard($old_cat_id)) {
         $_the_clipboard->deleteElement($old_cat_id);
         $_the_clipboard->insertElement($_catalog_id);
     }
     $_the_clip_form->form_fields['clip_cmd']['options'][] = array('name' => _("In Merkliste eintragen"), 'value' => 'ins');
     $_the_clip_form->form_fields['clip_cmd']['options'][] = array('name' => _("Markierten Eintrag bearbeiten"), 'value' => 'edit');
     if ($_the_form->IsClicked("reset") || Request::option('cmd') == "new_entry") {
         $_the_form->doFormReset();
     }
     if ($_the_form->IsClicked("delete") && $_catalog_id != "new_entry" && $_the_element->isChangeable()) {
         if ($_the_element->reference_count) {
             $_msg = "info§" . sprintf(_("Sie können diesen Eintrag nicht löschen, da er noch in %s Literaturlisten referenziert wird."), $_the_element->reference_count) . "§";
         } else {
             $_msg = "info§" . _("Wollen Sie diesen Eintrag wirklich löschen?") . "<br>" . LinkButton::createAccept(_('Ja'), URLHelper::getURL('?cmd=delete_element&_catalog_id=' . $_catalog_id), array('title' => _('löschen'))) . "&nbsp;" . LinkButton::createCancel(_('Abbrechen'), URLHelper::getURL('?_catalog_id=' . $_catalog_id), array('title' => _('abbrechen'))) . "§";
         }
     }
     if (Request::option('cmd') == "delete_element" && $_the_element->isChangeable() && !$_the_element->reference_count) {
         $_the_element->deleteElement();
         $this->reload = true;
     }
     if (Request::option('cmd') == "in_clipboard" && $_catalog_id != "new_entry") {
         $_the_clipboard->insertElement($_catalog_id);
         $this->reload = true;
     }
     if (Request::option('cmd') == "check_entry") {
         $lit_plugin_value = $_the_element->getValue('lit_plugin');
         $check_result = StudipLitSearch::CheckZ3950($_the_element->getValue('accession_number'));
         $content = "<div style=\"font-size:70%\"<b>" . _("Verfügbarkeit in externen Katalogen:") . "</b><br>";
         if (is_array($check_result)) {
             foreach ($check_result as $plugin_name => $ret) {
                 $content .= "<b>&nbsp;" . htmlReady(StudipLitSearch::GetPluginDisplayName($plugin_name)) . "&nbsp;</b>";
                 if ($ret['found']) {
                     $content .= _("gefunden") . "&nbsp;";
                     $_the_element->setValue('lit_plugin', $plugin_name);
                     if ($link = $_the_element->getValue("external_link")) {
                         $content .= formatReady(" [" . $_the_element->getValue("lit_plugin_display_name") . "]" . $link);
                     } else {
                         $content .= _("(Kein Link zum Katalog vorhanden.)");
                     }
                 } elseif (count($ret['error'])) {
                     $content .= '<span style="color:red;">' . htmlReady($ret['error'][0]['msg']) . '</span>';
                 } else {
                     $content .= _("<u>nicht</u> gefunden") . "&nbsp;";
                 }
                 $content .= "<br>";
             }
         }
         $content .= "</div>";
         $_the_element->setValue('lit_plugin', $lit_plugin_value);
         $_msg = "info§" . $content . "§";
     }
     if ($_the_form->IsClicked("send")) {
         $_the_element->setValuesFromForm();
         if ($_the_element->checkValues()) {
             $_the_element->insertData();
             $this->reload = true;
         }
     }
     if ($_the_clip_form->isClicked("clip_ok")) {
         if ($_the_clip_form->getFormFieldValue("clip_cmd") == "ins" && $_catalog_id != "new_entry") {
             $_the_clipboard->insertElement($_catalog_id);
         }
         if ($_the_clip_form->getFormFieldValue("clip_cmd") == "edit") {
             $marked = $_the_clip_form->getFormFieldValue("clip_content");
             if (count($marked) && $marked[0]) {
                 $_the_element->getElementData($marked[0]);
             }
         }
         $_the_clipboard->doClipCmd();
     }
     $_catalog_id = $_the_element->getValue("catalog_id");
     if (!$_the_element->isChangeable()) {
         PageLayout::postMessage(MessageBox::info(_('Sie haben diesen Eintrag nicht selbst vorgenommen, und dürfen ihn daher nicht verändern! Wenn Sie mit diesem Eintrag arbeiten wollen, können Sie sich eine persönliche Kopie erstellen.')));
     }
     $_msg .= $_the_element->msg;
     $_msg .= $_the_clipboard->msg;
     $this->msg = $_msg;
     $this->catalog_id = $_catalog_id;
     $this->element = $_the_element;
     $this->treeview = $_the_treeview;
     $this->tree = $_the_tree;
     $this->clipboard = $_the_clipboard;
     $this->clip_form = $_the_clip_form;
     $this->form = $_the_form;
 }