added some useful models and controllers
This commit is contained in:
parent
9bb724147e
commit
1d4b2a3314
44 changed files with 6424 additions and 0 deletions
56
application/view/AdminNavigation/edit.phtml
Normal file
56
application/view/AdminNavigation/edit.phtml
Normal file
|
@ -0,0 +1,56 @@
|
|||
<div id="admin">
|
||||
<h3>Navigation/Menüpunkt bearbeiten</h3>
|
||||
|
||||
<form action="<?php echo $this->base ?>/adminNavigation/save"method="post">
|
||||
<input type="hidden" name="id" value="<?php if($this->item['id']) echo $this->item['id'] ?>" />
|
||||
<dl>
|
||||
<dt>Aktiv</dt>
|
||||
<dd>
|
||||
<input type="checkbox" name="active" <?php if($this->item['active']) echo 'checked="checked"' ?> />
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Menüpunkttyp</dt>
|
||||
<dd>
|
||||
<select name="parentId">
|
||||
<option value="0">Hauptpunkt</option>
|
||||
<?php foreach($this->mainItems as $item): ?>
|
||||
<option <?php if($item['id'] == $this->item['parent_id'] || $item['id'] == $this->_getParam('parentId')) echo 'selected="selected"' ?> value="<?php echo $item['id'] ?>">Unterpunkt von <?php echo $item['name'] ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Titel</dt>
|
||||
<dd>
|
||||
<input type="text" name="name" value="<?php echo $this->item['name'] ?>"/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Url</dt>
|
||||
<dd>
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<?php foreach($this->sites['defaults'] as $key => $site): ?>
|
||||
<input type="radio" checked="checked" name="url" id="sitedefault_<?php echo $key ?>" value="<?php echo $site ?>"/><label for="sitedefault_<?php echo $key ?>"><?php echo $site ?></label><br/>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($this->sites['pages'] as $key => $site): ?>
|
||||
<input type="radio" name="url" id="sitepage_<?php echo $key ?>" value="<?php echo $site ?>"/><label for="sitepage_<?php echo $key ?>"><?php echo $site ?></label><br/>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" name="url" id="sitenew" value="-external-"/><label for="sitenew">Externe Adresse:</label><br/>
|
||||
<input type="text" name="external" value="http://"/>
|
||||
</tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<input type="submit" name="save" value="speichern" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
111
application/view/AdminNavigation/index.phtml
Normal file
111
application/view/AdminNavigation/index.phtml
Normal file
|
@ -0,0 +1,111 @@
|
|||
<div id="admin">
|
||||
<h3>Navigation Bearbeiten</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Aktiv
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th colspan="7">
|
||||
Link
|
||||
</th>
|
||||
</tr>
|
||||
<?php $o=0; foreach($this->list as $parent): $i=0; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if($parent['active']) echo 'Ja'; else echo 'Nein'; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $parent['name'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo Navigation::buildLink($this->base, $parent, true); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($o!=0): ?>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/up/id/<?php echo $parent['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/arrow_up.png" alt="Nach oben verschieben" title="Nach oben verschieben"/>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($o<count($this->list)-1): ?>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/down/id/<?php echo $parent['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/arrow_down.png" alt="Nach unten verschieben" title="Nach unten verschieben" />
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/delete/id/<?php echo $parent['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/delete.png" alt="Löschen" title="Löschen" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/edit/parentId/<?php echo $parent['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/addSub.png" alt="Unterpunkt hinzufügen" title="Unterpunkt hinzufügen" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/edit/id/<?php echo $parent['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/change.png" alt="Ändern" title="Ändern" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo Navigation::buildLink($this->base, $parent, false); ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/preview.png" alt="Vorschau" title="Vorschau" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach($parent['children'] as $child): ?>
|
||||
<tr class="sub">
|
||||
<td>
|
||||
<?php if($child['active']) echo 'Ja'; else echo 'Nein'; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $child['name'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo Navigation::buildLink($this->base, $child, true); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($i!=0): ?>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/up/id/<?php echo $child['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/arrow_up.png" alt="Nach oben verschieben" title="Nach oben verschieben"/>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($i<count($parent['children'])-1): ?>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/down/id/<?php echo $child['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/arrow_down.png" alt="Nach unten verschieben" title="Nach unten verschieben" />
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/delete/id/<?php echo $child['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/delete.png" alt="Löschen" title="Löschen" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/edit/id/<?php echo $child['id'] ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/change.png" alt="Ändern" title="Ändern" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo Navigation::buildLink($this->base, $child, false); ?>">
|
||||
<img src="<?php echo $this->base ?>/img/leafs/preview.png" alt="Vorschau" title="Vorschau" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach ?>
|
||||
<?php $o++; endforeach ?>
|
||||
</table>
|
||||
<p>
|
||||
<a href="<?php echo $this->base ?>/adminNavigation/edit">Neuen Hauptpunkt anlegen</a>
|
||||
</p>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue