| @@ -1,51 +1,79 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Attachments'), array('plugin' => 'file_manager', 'controller' => 'attachments', 'action' => 'index')) | ||
| ->addCrumb($this->data['Node']['title'], $this->here); | ||
|
|
||
| echo $this->Form->create('Node', array('url' => array('controller' => 'attachments', 'action' => 'edit'))); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#attachment-main" data-toggle="tab"><?php echo __('Attachment'); ?></a></li> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
|
|
||
| <div id="attachment-main" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('id'); | ||
|
|
||
| $fileType = explode('/', $this->data['Node']['mime_type']); | ||
| $fileType = $fileType['0']; | ||
| if ($fileType == 'image') { | ||
| $imgUrl = $this->Image->resize('/uploads/'.$this->data['Node']['slug'], 200, 300, true, array('class' => 'img-polaroid')); | ||
| } else { | ||
| $imgUrl = $this->Html->image('/img/icons/' . $this->Filemanager->mimeTypeToImage($this->data['Node']['mime_type'])) . ' ' . $this->data['Node']['mime_type']; | ||
| } | ||
| echo $this->Html->link($imgUrl, $this->data['Node']['path'], array( | ||
| 'class' => 'thickbox pull-right', | ||
| )); | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span6', | ||
| 'label' => false, | ||
| )); | ||
| echo $this->Form->input('title', array( | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('excerpt', array( | ||
| 'placeholder' => __('Caption'), | ||
| )); | ||
|
|
||
| echo $this->Form->input('file_url', array( | ||
| 'placeholder' => __('File URL'), | ||
| 'value' => Router::url($this->data['Node']['path'], true), | ||
| 'readonly' => 'readonly') | ||
| ); | ||
|
|
||
| echo $this->Form->input('file_type', array( | ||
| 'placeholder' => __('Mime Type'), | ||
| 'value' => $this->data['Node']['mime_type'], | ||
| 'readonly' => 'readonly') | ||
| ); | ||
|
|
||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save')) . | ||
| $this->Html->link( | ||
| __('Cancel'), | ||
| array('action' => 'index'), | ||
| array('class' => 'cancel', 'button' => 'danger') | ||
| ). | ||
| $this->Html->endBox(); | ||
| ?> | ||
| </div> | ||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,48 +1,70 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_index'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Attachments'), $this->here); | ||
|
|
||
| ?> | ||
| <table class="table table-striped"> | ||
| <?php | ||
|
|
||
| $tableHeaders = $this->Html->tableHeaders(array( | ||
| $this->Paginator->sort('id'), | ||
| ' ', | ||
| $this->Paginator->sort('title'), | ||
| __('URL'), | ||
| __('Actions'), | ||
| )); | ||
|
|
||
| ?> | ||
| <thead> | ||
| <?php echo $tableHeaders; ?> | ||
| </thead> | ||
| <?php | ||
|
|
||
| $rows = array(); | ||
| foreach ($attachments as $attachment) { | ||
| $actions = array(); | ||
| $actions[] = $this->Croogo->adminRowActions($attachment['Node']['id']); | ||
| $actions[] = $this->Croogo->adminRowAction('', | ||
| array('controller' => 'attachments', 'action' => 'edit', $attachment['Node']['id']), | ||
| array('icon' => 'pencil', 'tooltip' => __('Edit this item')) | ||
| ); | ||
| $actions[] = $this->Croogo->adminRowAction('', | ||
| array('controller' => 'attachments', 'action' => 'delete', $attachment['Node']['id']), | ||
| array('icon' => 'trash', 'tooltip' => __('Remove this item')), | ||
| __('Are you sure?')); | ||
|
|
||
| $mimeType = explode('/', $attachment['Node']['mime_type']); | ||
| $mimeType = $mimeType['0']; | ||
| if ($mimeType == 'image') { | ||
| $imgUrl = $this->Image->resize('/uploads/' . $attachment['Node']['slug'], 100, 200, true, array('class' => 'img-polaroid')); | ||
| $thumbnail = $this->Html->link($imgUrl, $attachment['Node']['path'], | ||
| array('escape' => false, 'class' => 'thickbox', 'title' => $attachment['Node']['title'])); | ||
| } else { | ||
| $thumbnail = $this->Html->image('/img/icons/page_white.png') . ' ' . $attachment['Node']['mime_type'] . ' (' . $this->Filemanager->filename2ext($attachment['Node']['slug']) . ')'; | ||
| } | ||
|
|
||
| $actions = $this->Html->div('item-actions', implode(' ', $actions)); | ||
|
|
||
| $rows[] = array( | ||
| $attachment['Node']['id'], | ||
| $thumbnail, | ||
| $attachment['Node']['title'], | ||
| $this->Html->link( | ||
| $this->Html->url($attachment['Node']['path'], true), | ||
| $attachment['Node']['path'], | ||
| array( | ||
| 'target' => '_blank', | ||
| ) | ||
| ), | ||
| $actions, | ||
| ); | ||
| } | ||
|
|
||
| echo $this->Html->tableCells($rows); | ||
|
|
||
| ?> | ||
| </table> |
| @@ -1,69 +1,107 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_index'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('File Manager'), $this->here); | ||
|
|
||
| ?> | ||
|
|
||
| <?php $this->start('tabs'); ?> | ||
| <li> | ||
| <?php | ||
| echo $this->FileManager->link(__('Upload here'), | ||
| array('controller' => 'file_manager', 'action' => 'upload'), | ||
| $path | ||
| ); | ||
| ?> | ||
| </li> | ||
| <li> | ||
| <?php | ||
| echo $this->FileManager->link(__('Create directory'), | ||
| array('controller' => 'file_manager', 'action' => 'create_directory'), | ||
| $path | ||
| ); | ||
| ?> | ||
| </li> | ||
| <li> | ||
| <?php | ||
| echo $this->FileManager->link(__('Create file'), | ||
| array('controller' => 'file_manager', 'action' => 'create_file'), | ||
| $path | ||
| ); | ||
| ?> | ||
| </li> | ||
| <?php $this->end(); ?> | ||
|
|
||
| <div class="breadcrumb"> | ||
| <a href="#"><?php echo __('You are here') . ' '; ?> </a> <span class="divider"> > </span> | ||
| <?php $breadcrumb = $this->FileManager->breadcrumb($path); ?> | ||
| <?php foreach ($breadcrumb as $pathname => $p) : ?> | ||
| <?php echo $this->FileManager->linkDirectory($pathname, $p); ?> | ||
| <span class="divider"> <?php echo DS; ?> </span> | ||
| <?php endforeach; ?> | ||
| </div> | ||
|
|
||
| | ||
|
|
||
| <div class="directory-content"> | ||
| <table class="table table-striped"> | ||
| <?php | ||
| $tableHeaders = $this->Html->tableHeaders(array( | ||
| '', | ||
| __('Directory content'), | ||
| __('Actions'), | ||
| )); | ||
| ?> | ||
| <thead> | ||
| <?php echo $tableHeaders; ?> | ||
| </thead> | ||
| <?php | ||
| // directories | ||
| $rows = array(); | ||
| foreach ($content['0'] as $directory): | ||
| $actions = array(); | ||
| $actions[] = $this->FileManager->linkDirectory(__('Open'), $path.$directory.DS); | ||
| if ($this->FileManager->inPath($deletablePaths, $path.$directory)) { | ||
| $actions[] = $this->FileManager->link(__('Delete'), array( | ||
| 'controller' => 'file_manager', | ||
| 'action' => 'delete_directory', | ||
| ), $path . $directory); | ||
| } | ||
| $actions = $this->Html->div('item-actions', implode(' ', $actions)); | ||
| $rows[] = array( | ||
| $this->Html->image('/img/icons/folder.png'), | ||
| $this->FileManager->linkDirectory($directory, $path . $directory . DS), | ||
| $actions, | ||
| ); | ||
| endforeach; | ||
| echo $this->Html->tableCells($rows, array('class' => 'directory'), array('class' => 'directory')); | ||
|
|
||
| // files | ||
| $rows = array(); | ||
| foreach ($content['1'] as $file): | ||
| $actions = array(); | ||
| $actions[] = $this->FileManager->link(__('Edit'), array('controller' => 'file_manager', 'action' => 'editfile'), $path.$file); | ||
| if ($this->FileManager->inPath($deletablePaths, $path.$file)) { | ||
| $actions[] = $this->FileManager->link(__('Delete'), array( | ||
| 'controller' => 'file_manager', | ||
| 'action' => 'delete_file', | ||
| ), $path . $file); | ||
| } | ||
| $actions = implode(' ', $actions); | ||
| $rows[] = array( | ||
| $this->Html->image('/img/icons/' . $this->FileManager->filename2icon($file)), | ||
| $this->FileManager->linkFile($file, $path . $file), | ||
| $actions, | ||
| ); | ||
| endforeach; | ||
| echo $this->Html->tableCells($rows, array('class' => 'file'), array('class' => 'file')); | ||
|
|
||
| ?> | ||
| <thead> | ||
| <?php echo $tableHeaders; ?> | ||
| </thead> | ||
| </table> | ||
| </div> |
| @@ -1,36 +1,60 @@ | ||
| <?php | ||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('File Manager'), array('plugin' => 'file_manager', 'controller' => 'file_manager', 'action' => 'browse')) | ||
| ->addCrumb(__('Create Directory'), $this->here); | ||
|
|
||
| echo $this->Form->create('FileManager', array( | ||
| 'url' => $this->Html->url(array( | ||
| 'controller' => 'file_manager', | ||
| 'action' => 'create_directory', | ||
| ), true) . '?path=' . urlencode($path), | ||
| )); | ||
| ?> | ||
| <h2 class="hidden-desktop"><?php echo __('Create Directory'); ?></h2> | ||
| <div class="breadcrumb"> | ||
| <a href="#"><?php echo __('You are here') . ' '; ?> </a> <span class="divider"> > </span> | ||
| <?php $breadcrumb = $this->FileManager->breadcrumb($path); ?> | ||
| <?php foreach ($breadcrumb as $pathname => $p) : ?> | ||
| <?php echo $this->FileManager->linkDirectory($pathname, $p); ?> | ||
| <span class="divider"> <?php echo DS; ?> </span> | ||
| <?php endforeach; ?> | ||
| </div> | ||
|
|
||
| | ||
|
|
||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#filemanager-createdir" data-toggle="tab"><?php echo __('Directory'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="filemanager-createdir" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('FileManager.name', array( | ||
| 'type' => 'text', | ||
| 'placeholder' => __('Directory name'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Create'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
|
|
||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,37 +1,59 @@ | ||
| <?php | ||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('File Manager'), array('plugin' => 'file_manager', 'controller' => 'file_manager', 'action' => 'browse')) | ||
| ->addCrumb(__('Create File'), $this->here); | ||
|
|
||
| echo $this->Form->create('FileManager', array( | ||
| 'url' => $this->Html->url(array( | ||
| 'controller' => 'file_manager', | ||
| 'action' => 'create_file', | ||
| ), true) . '?path=' . urlencode($path), | ||
| )); | ||
|
|
||
| ?> | ||
| <h2 class="hidden-desktop"><?php echo __('Create file'); ?> </h2> | ||
| <div class="breadcrumb"> | ||
| <a href="#"><?php echo __('You are here') . ' '; ?> </a> <span class="divider"> > </span> | ||
| <?php $breadcrumb = $this->FileManager->breadcrumb($path); ?> | ||
| <?php foreach ($breadcrumb as $pathname => $p) : ?> | ||
| <?php echo $this->FileManager->linkDirectory($pathname, $p); ?> | ||
| <span class="divider"> <?php echo DS; ?> </span> | ||
| <?php endforeach; ?> | ||
| </div> | ||
|
|
||
| | ||
|
|
||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#filemanager-createfile" data-toggle="tab"><?php echo __('File'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="filemanager-createfile" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('FileManager.name', array( | ||
| 'type' => 'text', | ||
| 'placeholder' => __('Filename'), | ||
| 'class' => 'span10', | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,37 +1,46 @@ | ||
| <?php | ||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('File Manager'), array('plugin' => 'file_manager', 'controller' => 'file_manager', 'action' => 'browse')) | ||
| ->addCrumb(basename($absolutefilepath), $this->here); | ||
|
|
||
| echo $this->Form->create('FileManager', array( | ||
| 'url' => $this->Html->url(array( | ||
| 'controller' => 'file_manager', | ||
| 'action' => 'editfile', | ||
| ), true) . '?path=' . urlencode($absolutefilepath), | ||
| )); | ||
| ?> | ||
| <h2 class="hidden-desktop"><?php echo __('Edit file'); ?> </h2> | ||
| <div class="breadcrumb"> | ||
| <a href="#"><?php echo __('You are here') . ' '; ?> </a> <span class="divider"> > </span> | ||
| <?php $breadcrumb = $this->FileManager->breadcrumb($path); ?> | ||
| <?php foreach ($breadcrumb as $pathname => $p) : ?> | ||
| <?php echo $this->FileManager->linkDirectory($pathname, $p); ?> | ||
| <span class="divider"> <?php echo DS; ?> </span> | ||
| <?php endforeach; ?> | ||
| </ul> | ||
| </div> | ||
|
|
||
| | ||
|
|
||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
| <?php echo $this->Html->beginBox(__('Edit')) . | ||
| $this->Form->input( | ||
| 'FileManager.content', | ||
| array('type' => 'textarea', 'value' => $content, 'class' => 'span12', 'label' => '') | ||
| ) . | ||
| $this->Html->endBox(); ?> | ||
| </div> | ||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,38 +1,56 @@ | ||
| <?php | ||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('File Manager'), array('plugin' => 'file_manager', 'controller' => 'file_manager', 'action' => 'browse')) | ||
| ->addCrumb(__('Upload'), $this->here); | ||
|
|
||
| echo $this->Form->create('FileManager', array( | ||
| 'type' => 'file', | ||
| 'url' => $this->Html->url(array( | ||
| 'controller' => 'file_manager', | ||
| 'action' => 'upload', | ||
| ), true) . '?path=' . urlencode($path), | ||
| )); | ||
| ?> | ||
| <h2 class="hidden-desktop"><?php echo __('Upload file'); ?> </h2> | ||
| <div class="breadcrumb"> | ||
| <a href="#"><?php echo __('You are here') . ' '; ?> </a> <span class="divider"> > </span> | ||
| <?php $breadcrumb = $this->FileManager->breadcrumb($path); ?> | ||
| <?php foreach ($breadcrumb as $pathname => $p) : ?> | ||
| <?php echo $this->FileManager->linkDirectory($pathname, $p); ?> | ||
| <span class="divider"> <?php echo DS; ?> </span> | ||
| <?php endforeach; ?> | ||
| </div> | ||
|
|
||
| | ||
|
|
||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#filemanager-upload" data-toggle="tab"><?php echo __('Upload'); ?></a></li> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="filemanager-upload" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('FileManager.file', array('type' => 'file', 'label' => '')); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
|
|
||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -5,6 +5,7 @@ | ||
| Croogo::hookHelper('*', 'Menus.Menus'); | ||
|
|
||
| CroogoNav::add('menus', array( | ||
| 'icon' => array('sitemap', 'large'), | ||
| 'title' => __('Menus'), | ||
| 'url' => array( | ||
| 'plugin' => 'menus', | ||
| @@ -1,67 +1,114 @@ | ||
| <?php | ||
|
|
||
| $this->Html->script(array('Menus.links'), false); | ||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Menus'), array('plugin' => 'menus', 'controller' => 'menus', 'action' => 'index')) | ||
| ->addCrumb($menus[$menuId], array('plugin' => 'menus', 'controller' => 'links', 'action' => 'index', '?' => array('menu_id' => $menuId))) | ||
| ->addCrumb(__('Add'), $this->here); | ||
|
|
||
| echo $this->Form->create('Link', array('url' => array('controller' => 'links', 'action' => 'add', 'menu' => $menuId))); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#link-basic" data-toggle="tab"><?php echo __('Link'); ?></a></li> | ||
| <li><a href="#link-access" data-toggle="tab"><?php echo __('Access'); ?></a></li> | ||
| <li><a href="#link-misc" data-toggle="tab"><?php echo __('Misc.'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="link-basic" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('menu_id', array( | ||
| 'selected' => $menuId, | ||
| )); | ||
| echo $this->Form->input('parent_id', array( | ||
| 'title' => __('Parent'), | ||
| 'options' => $parentLinks, | ||
| 'empty' => true, | ||
| )); | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('title', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('link', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Link'), | ||
| )); | ||
| echo $this->Html->link(__('Link to a Node'), Router::url(array( | ||
| 'plugin' => 'nodes', | ||
| 'controller' => 'nodes', | ||
| 'action' => 'index', | ||
| 'links' => 1, | ||
| ), true) . '?KeepThis=true&TB_iframe=true&height=400&width=600', | ||
| array( | ||
| 'class' => 'thickbox', | ||
| ) | ||
| ); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="link-access" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('Role.Role', array( | ||
| 'class' => false, | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="link-misc" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('class', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Class'), | ||
| )); | ||
| echo $this->Form->input('description', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Description'), | ||
| )); | ||
| echo $this->Form->input('rel', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Rel'), | ||
| )); | ||
| echo $this->Form->input('target', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Target'), | ||
| )); | ||
| echo $this->Form->input('params', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Params'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Apply'), array('name' => 'apply', 'button' => 'default')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Form->input('status', array( | ||
| 'label' => __('Status'), | ||
| 'class' => false, | ||
| )) . | ||
| $this->Html->endBox(); | ||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,67 +1,114 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
| $this->Html->script(array('Menus.links'), false); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Menus'), array('plugin' => 'menus', 'controller' => 'menus', 'action' => 'index')) | ||
| ->addCrumb($this->data['Menu']['title'], array('plugin' => 'menus', 'controller' => 'links', 'action' => 'index', '?' => array('menu_id' => $this->data['Menu']['id']))) | ||
| ->addCrumb($this->request->data['Link']['title'], $this->here); | ||
|
|
||
| echo $this->Form->create('Link', array('url' => array('controller' => 'links', 'action' => 'edit', 'menu' => $menuId))); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#link-basic" data-toggle="tab"><?php echo __('Link'); ?></a></li> | ||
| <li><a href="#link-access" data-toggle="tab"><?php echo __('Access'); ?></a></li> | ||
| <li><a href="#link-misc" data-toggle="tab"><?php echo __('Misc.'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="link-basic" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('id'); | ||
| echo $this->Form->input('menu_id', array( | ||
| 'selected' => $menuId, | ||
| )); | ||
| echo $this->Form->input('parent_id', array( | ||
| 'title' => __('Parent'), | ||
| 'options' => $parentLinks, | ||
| 'empty' => true, | ||
| )); | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('title', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('link', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Link'), | ||
| )); | ||
| echo $this->Html->link(__('Link to a Node'), Router::url(array( | ||
| 'plugin' => 'nodes', | ||
| 'controller' => 'nodes', | ||
| 'action' => 'index', | ||
| 'links' => 1, | ||
| ), true) . '?KeepThis=true&TB_iframe=true&height=400&width=600', | ||
| array( | ||
| 'class' => 'thickbox', | ||
| ) | ||
| ); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="link-access" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('Role.Role', array( | ||
| 'class' => false, | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="link-misc" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('class', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Class'), | ||
| )); | ||
| echo $this->Form->input('description', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Description'), | ||
| )); | ||
| echo $this->Form->input('rel', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Rel'), | ||
| )); | ||
| echo $this->Form->input('target', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Target'), | ||
| )); | ||
| echo $this->Form->input('params', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Params'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Apply'), array('name' => 'apply', 'button' => 'default')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Form->input('status', array( | ||
| 'label' => __('Status'), | ||
| 'class' => false, | ||
| )) . | ||
| $this->Html->endBox(); | ||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,40 +1,68 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Menus'), array('plugin' => 'menus', 'controller' => 'menus', 'action' => 'index')) | ||
| ->addCrumb(__('Add'), $this->here); | ||
|
|
||
| echo $this->Form->create('Menu'); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#menu-basic" data-toggle="tab"><?php echo __('Menu'); ?></a></li> | ||
| <li><a href="#menu-misc" data-toggle="tab"><?php echo __('Misc.'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
|
|
||
| <div id="menu-basic" class="tab-pane"> | ||
| <?php | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('title', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('alias', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Alias'), | ||
| )); | ||
| echo $this->Form->input('description', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Description'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="menu-misc" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('params', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Params'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox('Publishing') . | ||
| $this->Form->button(__('Apply'), array('name' => 'apply', 'button' => 'default')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
| $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,41 +1,71 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Menus'), array('plugin' => 'menus', 'controller' => 'menus', 'action' => 'index')) | ||
| ->addCrumb($this->request->data['Menu']['title']); | ||
|
|
||
| echo $this->Form->create('Menu'); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#menu-basic" data-toggle="tab"><?php echo __('Menu'); ?></a></li> | ||
| <li><a href="#menu-misc" data-toggle="tab"><?php echo __('Misc.'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
|
|
||
| <div id="menu-basic" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('id'); | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span12', | ||
| )); | ||
| echo $this->Form->input('title', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('alias', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Alias'), | ||
| )); | ||
| echo $this->Form->input('description', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Description'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="menu-misc" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('params', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Params'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox('Publishing') . | ||
| $this->Form->button(__('Apply'), array('name' => 'apply', 'button' => 'default')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
|
|
||
| $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,40 +1,61 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_index'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Menus'), $this->here); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span12"> | ||
| <table class="table table-striped"> | ||
| <?php | ||
| $tableHeaders = $this->Html->tableHeaders(array( | ||
| $this->Paginator->sort('id'), | ||
| $this->Paginator->sort('title'), | ||
| $this->Paginator->sort('alias'), | ||
| $this->Paginator->sort('link_count'), | ||
| __('Actions'), | ||
| )); | ||
| ?> | ||
| <thead> | ||
| <?php echo $tableHeaders; ?> | ||
| </thead> | ||
|
|
||
| <?php | ||
| $rows = array(); | ||
| foreach ($menus as $menu): | ||
| $actions = array(); | ||
| $actions[] = $this->Croogo->adminRowAction( | ||
| '', | ||
| array('controller' => 'links', 'action' => 'index', '?' => array('menu_id' => $menu['Menu']['id'])), | ||
| array('icon' => 'zoom-in', 'tooltip' => __('View links')) | ||
| ); | ||
| $actions[] = $this->Croogo->adminRowActions($menu['Menu']['id']); | ||
| $actions[] = $this->Croogo->adminRowAction( | ||
| '', | ||
| array('controller' => 'menus', 'action' => 'edit', $menu['Menu']['id']), | ||
| array('icon' => 'pencil', 'tooltip' => __('Edit this item')) | ||
| ); | ||
| $actions[] = $this->Croogo->adminRowAction( | ||
| '', | ||
| array('controller' => 'menus', 'action' => 'delete', $menu['Menu']['id']), | ||
| array('icon' => 'trash', 'tooltip' => __('Remove this item')), | ||
| __('Are you sure?') | ||
| ); | ||
| $actions = $this->Html->div('item-actions', implode(' ', $actions)); | ||
| $rows[] = array( | ||
| $menu['Menu']['id'], | ||
| $this->Html->link($menu['Menu']['title'], array('controller' => 'links', '?' => array('menu_id' => $menu['Menu']['id']))), | ||
| $menu['Menu']['alias'], | ||
| $menu['Menu']['link_count'], | ||
| $this->Html->div('item-actions', $actions), | ||
| ); | ||
| endforeach; | ||
|
|
||
| echo $this->Html->tableCells($rows); | ||
| ?> | ||
| </table> | ||
| </div> | ||
| </div> |
| @@ -12,7 +12,7 @@ | ||
| } | ||
| } | ||
| ?> | ||
| <div class="clear"></div> | ||
| </div> | ||
| <?php | ||
| echo $this->Html->link( | ||
| @@ -5,6 +5,7 @@ | ||
| Croogo::hookHelper('*', 'Nodes.Nodes'); | ||
|
|
||
| CroogoNav::add('content', array( | ||
| 'icon' => array('edit', 'large'), | ||
| 'title' => __('Content'), | ||
| 'url' => array( | ||
| 'plugin' => 'nodes', | ||
| @@ -1,29 +1,57 @@ | ||
| <div class="row-fluid"> | ||
| <div class="span12"> | ||
| <div class="row-fluid filter"> | ||
| <?php | ||
| echo $this->Form->create('Node', array( | ||
| 'class' => 'inline', | ||
| 'url' => array_merge( | ||
| array('action' => 'index'), $this->params['pass'] | ||
| ) | ||
| )); | ||
|
|
||
| echo $this->Form->input('filter', array( | ||
| 'label' => false, | ||
| 'title' => __('Search'), | ||
| 'placeholder' => __('Search...'), | ||
| 'div' => 'input text span3', | ||
| 'class' => 'span11', | ||
| 'tooltip' => false, | ||
| )); | ||
|
|
||
| echo $this->Form->input('type', array( | ||
| 'label' => false, | ||
| 'options' => $nodeTypes, | ||
| 'empty' => __('Type'), | ||
| 'div' => 'input select span2', | ||
| 'class' => 'span11' | ||
| )); | ||
|
|
||
| echo $this->Form->input('status', array( | ||
| 'label' => false, | ||
| 'options' => array( | ||
| '1' => __('Published'), | ||
| '0' => __('Unpublished'), | ||
| ), | ||
| 'empty' => __('Status'), | ||
| 'div' => 'input select span2', | ||
| 'class' => 'span11' | ||
| )); | ||
|
|
||
| echo $this->Form->input('promote', array( | ||
| 'label' => false, | ||
| 'options' => array( | ||
| '1' => __('Yes'), | ||
| '0' => __('No'), | ||
| ), | ||
| 'empty' => __('Promoted'), | ||
| 'div' => 'input select span2', | ||
| 'class' => 'span11' | ||
| )); | ||
| echo $this->Form->submit(__('Filter'), array('class' => 'btn', | ||
| 'div' => 'input submit span2' | ||
| )); | ||
| echo $this->Form->end(); | ||
| ?> | ||
| </div> | ||
| </div> | ||
| </div> |
| @@ -21,7 +21,7 @@ | ||
| 'name' => 'q', | ||
| 'value' => $qValue, | ||
| )); | ||
| echo $this->Form->button(__('Search')); | ||
| ?> | ||
| </form> | ||
| </div> | ||
| @@ -1,58 +1,90 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
| $this->Html->script(array('Nodes.nodes'), false); | ||
|
|
||
| $this->Html->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Content'), array('controller' => 'nodes', 'action' => 'index')) | ||
| ->addCrumb(__('Create'), array('controller' => 'nodes', 'action' => 'create')) | ||
| ->addCrumb($type['Type']['title'], $this->here); | ||
|
|
||
| echo $this->Form->create('Node', array('url' => array('action' => 'add', $typeAlias))); | ||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#node-main" data-toggle="tab"><?php echo __($type['Type']['title']); ?></a></li> | ||
| <li><a href="#node-access" data-toggle="tab"><?php echo __('Access'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
|
|
||
| <div id="node-main" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('parent_id', array('type' => 'select', 'options' => $nodes, 'empty' => true)); | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('title', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('slug', array( | ||
| 'id' => 'slug', | ||
| 'label' => false, | ||
| 'placeholder' => __('Slug'), | ||
| 'class' => 'span10 slug', | ||
| )); | ||
| echo $this->Form->input('excerpt', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Excerpt'), | ||
| )); | ||
| echo $this->Form->input('body', array( | ||
| 'label' => __('Body'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="node-access" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('Role.Role', array('class' => false)); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Apply'), array('name' => 'apply', 'class' => 'btn', 'type' => 'submit')) . | ||
| $this->Form->button(__('Save'), array('class' => 'btn btn-primary', 'type' => 'submit')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('class' => 'cancel btn btn-danger')) . | ||
| $this->Form->input('status', array( | ||
| 'label' => __('Published'), | ||
| 'checked' => 'checked', | ||
| 'class' => false, | ||
| )) . | ||
| $this->Form->input('promote', array( | ||
| 'label' => __('Promoted to front page'), | ||
| 'checked' => 'checked', | ||
| 'class' => false, | ||
| )) . | ||
| $this->Form->input('user_id', array( | ||
| 'label' => __('Publish as '), | ||
| )) . | ||
| $this->Form->input('created', array( | ||
| 'type' => 'text', | ||
| 'class' => 'span10', | ||
| )) . | ||
| $this->Html->endBox(); | ||
| ?> | ||
|
|
||
| <?php echo $this->Croogo->adminBoxes(); ?> | ||
|
|
||
| </div> | ||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,4 +1,4 @@ | ||
| <?php | ||
| Configure::write('debug', 0); | ||
| echo $this->Meta->field(); | ||
| ?> |
| @@ -1,12 +1,22 @@ | ||
| <h2 class="hidden-desktop"><?php echo $title_for_layout; ?></h2> | ||
| <?php | ||
|
|
||
| $this->Html->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Content'), array('controller' => 'nodes', 'action' => 'index')) | ||
| ->addCrumb(__('Create'), $this->here); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span12"> | ||
| <div class="box"> | ||
| <div class="box-content"> | ||
| <?php foreach ($types as $type): ?> | ||
| <div class="type"> | ||
| <h3><?php echo $this->Html->link($type['Type']['title'], array('action' => 'add', $type['Type']['alias'])); ?></h3> | ||
| <p><?php echo $type['Type']['description']; ?></p> | ||
| </div> | ||
| <?php endforeach; ?> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> |
| @@ -1,53 +1,92 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
| $this->Html->script(array('Nodes.nodes'), false); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Content'), array('controller' => 'nodes', 'action' => 'index')) | ||
| ->addCrumb($this->request->data['Node']['title'], $this->here); | ||
|
|
||
| echo $this->Form->create('Node', array('url' => array('action' => 'edit'))); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#node-main" data-toggle="tab"><?php echo __($type['Type']['title']); ?></a></li> | ||
| <li><a href="#node-access" data-toggle="tab"><?php echo __('Access'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
|
|
||
| <div id="node-main" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('parent_id', array('type' => 'select', 'options' => $nodes, 'empty' => true), true); | ||
| echo $this->Form->input('id'); | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('title', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('slug', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Slug'), | ||
| )); | ||
| echo $this->Form->input('excerpt', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Excerpt'), | ||
| )); | ||
| echo $this->Form->input('body', array( | ||
| 'label' => __('Body'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="node-access" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('Role.Role', array('class' => false)); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <div class="span4"> | ||
|
|
||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Apply'), array('name' => 'apply', 'class' => 'btn')) . | ||
| $this->Form->button(__('Save'), array('class' => 'btn btn-primary')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array('class' => 'cancel btn btn-danger')) . | ||
| $this->Form->input('status', array( | ||
| 'label' => __('Published'), | ||
| 'checked' => 'checked', | ||
| 'class' => false, | ||
| )) . | ||
| $this->Form->input('promote', array( | ||
| 'label' => __('Promoted to front page'), | ||
| 'checked' => 'checked', | ||
| 'class' => false, | ||
| )) . | ||
| $this->Form->input('user_id', array( | ||
| 'label' => __('Publish as ') | ||
| )) . | ||
| $this->Form->input('created', array( | ||
| 'type' => 'text', | ||
| 'class' => 'span10', | ||
| )); | ||
|
|
||
| echo $this->Html->endBox(); | ||
| ?> | ||
|
|
||
| <?php echo $this->Croogo->adminBoxes(); ?> | ||
|
|
||
| </div> | ||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,88 +1,137 @@ | ||
| <?php | ||
| $this->extend('/Common/admin_index'); | ||
| $this->Html->script(array('Nodes.nodes'), false); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Content'), $this->here); | ||
|
|
||
| ?> | ||
| <?php $this->start('tabs'); ?> | ||
| <li> | ||
| <?php echo $this->Html->link( | ||
| __('Create content'), | ||
| array('action'=>'create'), | ||
| array('button' => 'default') | ||
| ); ?> | ||
| </li> | ||
| <?php $this->end(); ?> | ||
| <?php | ||
|
|
||
| if (isset($this->params['named'])) { | ||
| foreach ($this->params['named'] as $nn => $nv) { | ||
| $this->Paginator->options['url'][] = $nn . ':' . $nv; | ||
| } | ||
| } | ||
| echo $this->element('admin/nodes_filter'); | ||
|
|
||
| echo $this->Form->create( | ||
| 'Node', | ||
| array( | ||
| 'url' => array('controller' => 'nodes', 'action' => 'process'), | ||
| 'class' => 'form-inline' | ||
| ) | ||
| ); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span12"> | ||
| <table class="table table-striped"> | ||
| <?php | ||
| $tableHeaders = $this->Html->tableHeaders(array( | ||
| '', | ||
| $this->Paginator->sort('id'), | ||
| $this->Paginator->sort('title'), | ||
| $this->Paginator->sort('type'), | ||
| $this->Paginator->sort('user_id'), | ||
| $this->Paginator->sort('status'), | ||
| '' | ||
| )); | ||
| ?> | ||
| <thead> | ||
| <?php echo $tableHeaders; ?> | ||
| </thead> | ||
|
|
||
| <tbody> | ||
| <?php foreach ($nodes as $node): ?> | ||
| <tr> | ||
| <td><?php echo $this->Form->checkbox('Node.'.$node['Node']['id'].'.id'); ?></td> | ||
| <td><?php echo $node['Node']['id']; ?></td> | ||
| <td> | ||
| <span> | ||
| <?php | ||
| echo $this->Html->link($node['Node']['title'], array( | ||
| 'admin' => false, | ||
| 'controller' => 'nodes', | ||
| 'action' => 'view', | ||
| 'type' => $node['Node']['type'], | ||
| 'slug' => $node['Node']['slug'] | ||
| )); | ||
| ?> | ||
| </span> | ||
| <?php if ($node['Node']['promote']): ?> | ||
| <span class="label label-info"><?php echo __('promoted'); ?></span> | ||
| <?php endif ?> | ||
| </td> | ||
| <td> | ||
| <?php echo $node['Node']['type']; ?> | ||
| </td> | ||
| <td> | ||
| <?php echo $node['User']['username']; ?> | ||
| </td> | ||
| <td> | ||
| <?php echo $this->Html->status($node['Node']['status']); ?> | ||
| </td> | ||
| <td> | ||
| <div class="item-actions"> | ||
| <?php | ||
| echo $this->Croogo->adminRowActions($node['Node']['id']); | ||
| echo ' ' . $this->Croogo->adminRowAction( | ||
| '', | ||
| array('action' => 'edit', $node['Node']['id']), | ||
| array('icon' => 'pencil', 'tooltip' => __('Edit this item')) | ||
| ); | ||
| echo ' ' . $this->Croogo->adminRowAction( | ||
| '', | ||
| '#Node' . $node['Node']['id'] . 'Id', | ||
| array('icon' => 'trash', 'tooltip' => __('Remove this item')), | ||
| __('Are you sure?') | ||
| ); | ||
| ?> | ||
| </div> | ||
| </td> | ||
| </tr> | ||
| <?php endforeach ?> | ||
| </tbody> | ||
|
|
||
| </table> | ||
|
|
||
| <div class="row-fluid"> | ||
| <div class="control-group"> | ||
| <?php echo $this->Form->input('Node.action', array( | ||
| 'label' => __('Applying to selected'), | ||
| 'div' => 'input inline', | ||
| 'options' => array( | ||
| 'publish' => __('Publish'), | ||
| 'unpublish' => __('Unpublish'), | ||
| 'promote' => __('Promote'), | ||
| 'unpromote' => __('Unpromote'), | ||
| 'delete' => __('Delete'), | ||
| ), | ||
| 'empty' => true, | ||
| )); ?> | ||
| <div class="controls"> | ||
| <?php | ||
| $jsVarName = uniqid('confirmMessage_'); | ||
| echo $this->Form->button(__('Submit'), array( | ||
| 'type' => 'button', | ||
| 'onclick' => sprintf('return Nodes.confirmProcess(app.%s)', $jsVarName), | ||
| )); | ||
| $this->Js->set($jsVarName, __('%s selected items?')); | ||
| ?> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -3,6 +3,7 @@ | ||
| Croogo::hookComponent('*', 'Settings.Settings'); | ||
|
|
||
| CroogoNav::add('settings', array( | ||
| 'icon' => array('cog', 'large'), | ||
| 'title' => __('Settings'), | ||
| 'url' => array( | ||
| 'admin' => true, | ||
| @@ -1,31 +1,53 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Settings'), array('plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Site')) | ||
| ->addCrumb(__('Language'), array('plugin' => 'settings', 'controller' => 'languages', 'action' => 'index')) | ||
| ->addCrumb(__('Add')); | ||
|
|
||
| echo $this->Form->create('Language'); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
|
|
||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#language-main" data-toggle="tab"><?php echo __('Language'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="language-main" class="tab-pane"> | ||
| <?php | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('title'); | ||
| echo $this->Form->input('native'); | ||
| echo $this->Form->input('alias'); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')). | ||
| $this->Html->link(__('Cancel'), | ||
| array('action' => 'index'), | ||
| array('class' => 'cancel', 'button' => 'danger') | ||
| ) . | ||
| $this->Form->input('status', array( | ||
| 'class' => false, | ||
| )) . | ||
| $this->Html->endBox(); | ||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,32 +1,63 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Settings'), array('plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Site')) | ||
| ->addCrumb(__('Language'), array('plugin' => 'settings', 'controller' => 'languages', 'action' => 'index')) | ||
| ->addCrumb($this->data['Language']['title'], $this->here); | ||
|
|
||
| echo $this->Form->create('Language'); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#language-main" data-toggle="tab"><?php echo __('Language'); ?></a></li> | ||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="language-main" class="tab-pane"> | ||
| <?php | ||
| $this->Form->inputDefaults(array( | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('id'); | ||
| echo $this->Form->input('title', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('native', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Native'), | ||
| )); | ||
| echo $this->Form->input('alias', array( | ||
| 'label' => false, | ||
| 'placeholder' => __('Alias'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')). | ||
| $this->Html->link( | ||
| __('Cancel'), | ||
| array('action' => 'index'), | ||
| array('class' => 'cancel', 'button' => 'danger') | ||
| ) . | ||
| $this->Form->input('status', array('class' => false)) . | ||
| $this->Html->endBox(); | ||
|
|
||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
| </div> | ||
| <?php $this->Form->end(); ?> |
| @@ -1,39 +1,67 @@ | ||
| <?php | ||
|
|
||
| $this->extend('/Common/admin_index'); | ||
|
|
||
| $this->Html->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Settings'), array('plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Site')) | ||
| ->addCrumb(__('Languages'), $this->here); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span12"> | ||
| <table class="table table-striped"> | ||
| <?php | ||
| $tableHeaders = $this->Html->tableHeaders(array( | ||
| $this->Paginator->sort('id'), | ||
| $this->Paginator->sort('title'), | ||
| $this->Paginator->sort('native'), | ||
| $this->Paginator->sort('alias'), | ||
| $this->Paginator->sort('status'), | ||
| __('Actions'), | ||
| )); | ||
| ?> | ||
| <thead> | ||
| <?php echo $tableHeaders; ?> | ||
| </thead> | ||
| <?php | ||
|
|
||
| $rows = array(); | ||
| foreach ($languages as $language) { | ||
| $actions = array(); | ||
| $actions[] = $this->Croogo->adminRowActions($language['Language']['id']); | ||
| $actions[] = $this->Croogo->adminRowAction('', | ||
| array('action' => 'moveup', $language['Language']['id']), | ||
| array('icon' => 'chevron-up', 'tooltip' => __('Move up')) | ||
| ); | ||
| $actions[] = $this->Croogo->adminRowAction('', | ||
| array('action' => 'movedown', $language['Language']['id']), | ||
| array('icon' => 'chevron-down', 'tooltip' => __('Move down')) | ||
| ); | ||
| $actions[] = $this->Croogo->adminRowAction('', | ||
| array('action' => 'edit', $language['Language']['id']), | ||
| array('icon' => 'pencil', 'tooltip' => __('Edit this item')) | ||
| ); | ||
| $actions[] = $this->Croogo->adminRowAction('', | ||
| array('action' => 'delete', $language['Language']['id']), | ||
| array('icon' => 'trash', 'tooltip' => __('Remove this item')), | ||
| __('Are you sure?') | ||
| ); | ||
|
|
||
| $actions = $this->Html->div('item-actions', implode(' ', $actions)); | ||
|
|
||
| $rows[] = array( | ||
| $language['Language']['id'], | ||
| $language['Language']['title'], | ||
| $language['Language']['native'], | ||
| $language['Language']['alias'], | ||
| $this->Html->status($language['Language']['status']), | ||
| $actions, | ||
| ); | ||
| } | ||
|
|
||
| echo $this->Html->tableCells($rows); | ||
| ?> | ||
| </table> | ||
| </div> | ||
| </div> | ||
| </div> |
| @@ -1,40 +1,80 @@ | ||
| <?php | ||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Settings'), array( | ||
| 'admin' => true, | ||
| 'plugin' => 'settings', | ||
| 'controller' => 'settings', | ||
| 'action' => 'index', | ||
| )) | ||
| ->addCrumb(__('Add')); | ||
|
|
||
| echo $this->Form->create('Setting'); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#setting-basic" data-toggle="tab"><?php echo __('Settings'); ?></a></li> | ||
| <li><a href="#setting-misc" data-toggle="tab"><?php echo __('Misc.'); ?></a></li> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="setting-basic" class="tab-pane"> | ||
| <?php | ||
| $this->Form->inputDefaults(array( | ||
| 'label' => false, | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('key', array( | ||
| 'rel' => __("e.g., 'Site.title'"), | ||
| 'placeholder' => __('Key'), | ||
| )); | ||
| echo $this->Form->input('value', array( | ||
| 'placeholder' => __('Value'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="setting-misc" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('title', array( | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('description', array( | ||
| 'placeholder' => __('Description'), | ||
| )); | ||
| echo $this->Form->input('input_type', array( | ||
| 'placeholder' => __('Input Type'), | ||
| 'rel' => __("e.g., 'text' or 'textarea'"), | ||
| )); | ||
| echo $this->Form->input('editable', array( | ||
| 'label' => __('Editable'), | ||
| 'class' => false, | ||
| )); | ||
| echo $this->Form->input('params', array( | ||
| 'placeholder' => __('Params'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array( | ||
| 'button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
|
|
||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |
| @@ -1,3 +1,6 @@ | ||
| <h2 class="hidden-desktop"><?php echo $title_for_layout; ?></h2> | ||
| <?php | ||
| $this->Html | ||
| ->addCrumb('', '/admin', array('icon' => 'home')) | ||
| ->addCrumb(__('Dashboard'), $this->here); | ||
| ?> |
| @@ -1,40 +1,81 @@ | ||
| <?php | ||
| $this->extend('/Common/admin_edit'); | ||
|
|
||
| $this->Html | ||
| ->addCrumb($this->Html->icon('home'), '/admin') | ||
| ->addCrumb(__('Settings'), array( | ||
| 'admin' => true, | ||
| 'plugin' => 'settings', | ||
| 'controller' => 'settings', | ||
| 'action' => 'index', | ||
| )) | ||
| ->addCrumb($this->data['Setting']['key']); | ||
|
|
||
| echo $this->Form->create('Setting'); | ||
|
|
||
| ?> | ||
| <div class="row-fluid"> | ||
| <div class="span8"> | ||
| <ul class="nav nav-tabs"> | ||
| <li><a href="#setting-basic" data-toggle="tab"><?php echo __('Settings'); ?></a></li> | ||
| <li><a href="#setting-misc" data-toggle="tab"><?php echo __('Misc.'); ?></a></li> | ||
| </ul> | ||
|
|
||
| <div class="tab-content"> | ||
| <div id="setting-basic" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('id'); | ||
| $this->Form->inputDefaults(array( | ||
| 'label' => false, | ||
| 'class' => 'span10', | ||
| )); | ||
| echo $this->Form->input('key', array( | ||
| 'rel' => __("e.g., 'Site.title'"), | ||
| 'placeholder' => __('Key'), | ||
| )); | ||
| echo $this->Form->input('value', array( | ||
| 'placeholder' => __('Value'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <div id="setting-misc" class="tab-pane"> | ||
| <?php | ||
| echo $this->Form->input('title', array( | ||
| 'placeholder' => __('Title'), | ||
| )); | ||
| echo $this->Form->input('description', array( | ||
| 'placeholder' => __('Description'), | ||
| )); | ||
| echo $this->Form->input('input_type', array( | ||
| 'placeholder' => __('Input Type'), | ||
| 'rel' => __("e.g., 'text' or 'textarea'"), | ||
| )); | ||
| echo $this->Form->input('editable', array( | ||
| 'label' => __('Editable'), | ||
| 'class' => false, | ||
| )); | ||
| echo $this->Form->input('params', array( | ||
| 'placeholder' => __('Params'), | ||
| )); | ||
| ?> | ||
| </div> | ||
|
|
||
| <?php echo $this->Croogo->adminTabs(); ?> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="span4"> | ||
| <?php | ||
| echo $this->Html->beginBox(__('Publishing')) . | ||
| $this->Form->button(__('Save'), array('button' => 'default')) . | ||
| $this->Html->link(__('Cancel'), array('action' => 'index'), array( | ||
| 'button' => 'danger')) . | ||
| $this->Html->endBox(); | ||
|
|
||
| echo $this->Croogo->adminBoxes(); | ||
| ?> | ||
| </div> | ||
|
|
||
| </div> | ||
| <?php echo $this->Form->end(); ?> |