Permalink
Browse files

add back link to proxy edition

  • Loading branch information...
tompiard committed Dec 5, 2012
1 parent 8f24b54 commit 61f7df0d53c9914b07d5bdb9e96c74e487e0d10e
Showing with 136 additions and 136 deletions.
  1. +136 −136 views/scripts/admin-highlight/get.phtml
@@ -1,136 +1,136 @@
-<?php
-if($this->proxy) {
- $title = $this->translate('Manage highlights of: %s (%s)',
- $this->smartTextCrop($this->container->title, 60),
- $this->smartTextCrop($this->proxy->__toString(), 30)
- );
-}
-else {
- $title = $this->translate('Manage highlights of: %s', $this->smartTextCrop($this->container->title, 60));
-}
-$this->placeholder('headling_1')->set('<h1>'.$title.'</h1>');
-?>
-<style type="text/css">
- .hl-item {width: 275px; height: 100px;}
-</style>
-<?php $this->headScript()->captureStart(); ?>
-
-$(function() {
- $("a.help-add, a.help-edit").click(function() {
- $(".hl-template").find(".hl-item").removeClass("hl-item-select");
- $$ = $(this).parent().parent().parent(); // box highlight selected
- $$.addClass("hl-item-select");
- $("fieldset")
- .show()
- .find('input[name=position]').val($$.attr("id").substr(8,2));
-
- selectedPosition = $$.attr("id").substr(8,2);
- return false;
- });
-
- $("#sortable").CUI('sortable',
- {
- update : function () {
- $("#order", $("#orderForm")).val($('#sortable').sortable('serialize'));
- $("#save-order").removeAttr('disabled');
- },
- cursor: 'crosshair',
- handle: $('li:not(.not-sortable)')
- }
- );
-});
-
-$(function(){
- $('#autocomplete').CUI('autocomplete', {
- source: "<?php echo $this->url(array('action' => 'autocomplete', 'id' => $this->container->id));?>",
- select: function(event, rws) {
- var form = this.form;
- for(var key in rws.item) {
- $('#'+key, form).val(rws.item[key]);
- }
- }
- });
-});
-
-
-
-$(function(){
- $("#highlightCreate").live('click', function(){
- $(this).attr('href', url[$('#highlight-model').val()].replace('___position___', selectedPosition));
-
- return true;
- });
-});
-
-;
-
-<?php $this->headScript()->captureEnd(); ?>
- <?php if(!empty($this->backUrl)) : ?>
- <p><a href="<?php echo $this->backUrl ?>"><?php echo $this->translate('Back') ?></a></p>
- <?php endif ?>
- <div>
- <?php if(isset($this->errors)) : ?>
- <div class="ui-state-message">
- <p class="ui-state-error"><?php echo $this->errors ?></p>
- </div>
- <?php endif ?>
- <?php echo $this->autoCompleteForm ?>
- </div>
- <div class="clear"></div>
- <div>
- <form action="<?php echo $this->url(array('action' => 'save-order', 'id' => $this->container->id, 'returnto' => $this->url()));?>" method="post" id="orderForm">
- <ul class="hl-template" id="sortable">
- <?php
- $row_set = array();
- $maxPosition = 0;
- foreach ($this->container->row_set as $row) :
- $maxPosition = max($maxPosition, $row->position);
- ?>
- <li class="hl-item" id="hl-item-<?php echo ($row->position);?>" style="position:relative">
- <?php if ($row === null): ?>
- <em>Empty</em>
- <?php else: ?>
- <input type="hidden" name="rowId[]" value="<?php echo $row->id?>" />
- <?php
- $mapped = $row->map($this->highlightMapper);
- ?>
- <h3>
- <?php if(!empty($mapped['cover'])) : ?>
- <img src="<?php echo $mapped['cover']->getStaticUrl(array('cropcenterresize'=>array('width'=>75, 'height'=>100))) ?>" height="100" widht="75" style="float: left; width: 75; height: 100; margin-right: 5px;" width="75" height="100" />
- <?php endif ?>
- <?php echo $mapped['title'] ?>
- </h3>
- <span><?php echo $mapped['type'] ?></span>
- <?php endif; ?>
- <ul class="actions">
- <li><a href="<?php echo $this->url(array('module'=>'highlight', 'controller'=>'admin-row', 'action'=>'get', 'id' => $row->id, '_next'=>$this->url())) ?>"
- class="help help-customize" title="Customize"><span class="ui-icon ui-icon-star"><?php echo $this->translate('Customize') ?></span></a></li>
- <li><a href="#" class="help help-edit" title="Edit"><span class="ui-icon ui-icon-pencil">Edit</span></a></li>
- <?php if ($row !== null): ?>
- <li><a href="<?php echo $this->url(array('row_id' => $row->id, 'action' => 'delete', 'returnto' => $this->url()));?>" class="help help-remove" title="Remove" onclick="return confirm('<?php echo $this->translate('Are you sure you want to delete this?');?>');"><span class="ui-icon ui-icon-close">Remove</span></a></li>
- <?php endif;?>
- </ul>
- </li>
- <?php endforeach; ?>
-
- <li class="hl-item not-sortable" id="hl-item-<?php echo ($maxPosition + 1);?>" style="position:relative">
- <em><?php echo $this->translate('Empty@backoffice,vinsoc')?></em>
- <ul class="actions">
- <li><a href="<?php echo $this->url(array('module'=>'highlight', 'controller'=>'admin-row', 'action'=>'new', 'id' => null, 'container'=>$this->container->id, '_next'=>$this->url())) ?>"
- class="help help-customize" title="Custom"><span class="ui-icon ui-icon-star"><?php echo $this->translate('Custom@backoffice,vinsoc')?></span></a></li>
- <li><a href="#" class="help help-edit" title="Edit"><span class="ui-icon ui-icon-pencil"><?php echo $this->translate('Edit@backoffice,vinsoc')?></span></a></li>
- </ul>
- </li>
- </ul>
- <div class="save-order">
- <div class="pager">
- <div class="pager-links">
- <div class="pager-info">
- <input type="submit" value="Save new order" disabled id="save-order" />
- </div>
- </div>
- </div>
- </div>
- <div class="clear">&nbsp;</div>
- </form>
- </div>
+<?php
+if($this->proxy) {
+ $title = $this->translate('Manage highlights of: %s (%s)',
+ $this->smartTextCrop($this->container->title, 60),
+ $this->smartTextCrop($this->proxy->__toString(), 30)
+ );
+}
+else {
+ $title = $this->translate('Manage highlights of: %s', $this->smartTextCrop($this->container->title, 60));
+}
+$this->placeholder('headling_1')->set('<h1>'.$title.'</h1>'. '<a href="' . $this->url(array('module' => 'highlight', 'controller' => 'admin-highlight', 'action' => 'index')) . '">' . $this->translate('Back') . '</a>');
+?>
+<style type="text/css">
+ .hl-item {width: 275px; height: 100px;}
+</style>
+<?php $this->headScript()->captureStart(); ?>
+
+$(function() {
+ $("a.help-add, a.help-edit").click(function() {
+ $(".hl-template").find(".hl-item").removeClass("hl-item-select");
+ $$ = $(this).parent().parent().parent(); // box highlight selected
+ $$.addClass("hl-item-select");
+ $("fieldset")
+ .show()
+ .find('input[name=position]').val($$.attr("id").substr(8,2));
+
+ selectedPosition = $$.attr("id").substr(8,2);
+ return false;
+ });
+
+ $("#sortable").CUI('sortable',
+ {
+ update : function () {
+ $("#order", $("#orderForm")).val($('#sortable').sortable('serialize'));
+ $("#save-order").removeAttr('disabled');
+ },
+ cursor: 'crosshair',
+ handle: $('li:not(.not-sortable)')
+ }
+ );
+});
+
+$(function(){
+ $('#autocomplete').CUI('autocomplete', {
+ source: "<?php echo $this->url(array('action' => 'autocomplete', 'id' => $this->container->id));?>",
+ select: function(event, rws) {
+ var form = this.form;
+ for(var key in rws.item) {
+ $('#'+key, form).val(rws.item[key]);
+ }
+ }
+ });
+});
+
+
+
+$(function(){
+ $("#highlightCreate").live('click', function(){
+ $(this).attr('href', url[$('#highlight-model').val()].replace('___position___', selectedPosition));
+
+ return true;
+ });
+});
+
+;
+
+<?php $this->headScript()->captureEnd(); ?>
+ <?php if(!empty($this->backUrl)) : ?>
+ <p><a href="<?php echo $this->backUrl ?>"><?php echo $this->translate('Back') ?></a></p>
+ <?php endif ?>
+ <div>
+ <?php if(isset($this->errors)) : ?>
+ <div class="ui-state-message">
+ <p class="ui-state-error"><?php echo $this->errors ?></p>
+ </div>
+ <?php endif ?>
+ <?php echo $this->autoCompleteForm ?>
+ </div>
+ <div class="clear"></div>
+ <div>
+ <form action="<?php echo $this->url(array('action' => 'save-order', 'id' => $this->container->id, 'returnto' => $this->url()));?>" method="post" id="orderForm">
+ <ul class="hl-template" id="sortable">
+ <?php
+ $row_set = array();
+ $maxPosition = 0;
+ foreach ($this->container->row_set as $row) :
+ $maxPosition = max($maxPosition, $row->position);
+ ?>
+ <li class="hl-item" id="hl-item-<?php echo ($row->position);?>" style="position:relative">
+ <?php if ($row === null): ?>
+ <em>Empty</em>
+ <?php else: ?>
+ <input type="hidden" name="rowId[]" value="<?php echo $row->id?>" />
+ <?php
+ $mapped = $row->map($this->highlightMapper);
+ ?>
+ <h3>
+ <?php if(!empty($mapped['cover'])) : ?>
+ <img src="<?php echo $mapped['cover']->getStaticUrl(array('cropcenterresize'=>array('width'=>75, 'height'=>100))) ?>" height="100" widht="75" style="float: left; width: 75; height: 100; margin-right: 5px;" width="75" height="100" />
+ <?php endif ?>
+ <?php echo $mapped['title'] ?>
+ </h3>
+ <span><?php echo $mapped['type'] ?></span>
+ <?php endif; ?>
+ <ul class="actions">
+ <li><a href="<?php echo $this->url(array('module'=>'highlight', 'controller'=>'admin-row', 'action'=>'get', 'id' => $row->id, '_next'=>$this->url())) ?>"
+ class="help help-customize" title="Customize"><span class="ui-icon ui-icon-star"><?php echo $this->translate('Customize') ?></span></a></li>
+ <li><a href="#" class="help help-edit" title="Edit"><span class="ui-icon ui-icon-pencil">Edit</span></a></li>
+ <?php if ($row !== null): ?>
+ <li><a href="<?php echo $this->url(array('row_id' => $row->id, 'action' => 'delete', 'returnto' => $this->url()));?>" class="help help-remove" title="Remove" onclick="return confirm('<?php echo $this->translate('Are you sure you want to delete this?');?>');"><span class="ui-icon ui-icon-close">Remove</span></a></li>
+ <?php endif;?>
+ </ul>
+ </li>
+ <?php endforeach; ?>
+
+ <li class="hl-item not-sortable" id="hl-item-<?php echo ($maxPosition + 1);?>" style="position:relative">
+ <em><?php echo $this->translate('Empty@backoffice,vinsoc')?></em>
+ <ul class="actions">
+ <li><a href="<?php echo $this->url(array('module'=>'highlight', 'controller'=>'admin-row', 'action'=>'new', 'id' => null, 'container'=>$this->container->id, '_next'=>$this->url())) ?>"
+ class="help help-customize" title="Custom"><span class="ui-icon ui-icon-star"><?php echo $this->translate('Custom@backoffice,vinsoc')?></span></a></li>
+ <li><a href="#" class="help help-edit" title="Edit"><span class="ui-icon ui-icon-pencil"><?php echo $this->translate('Edit@backoffice,vinsoc')?></span></a></li>
+ </ul>
+ </li>
+ </ul>
+ <div class="save-order">
+ <div class="pager">
+ <div class="pager-links">
+ <div class="pager-info">
+ <input type="submit" value="Save new order" disabled id="save-order" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="clear">&nbsp;</div>
+ </form>
+ </div>

0 comments on commit 61f7df0

Please sign in to comment.