function a_sub_crud_edit($label, $type, $subtype, $object) { $editButton = $type . '-form-edit-' . $subtype; $displayData = $type . '-' . $subtype; $url = sfContext::getInstance()->getRouting()->generate($type . '_edit', $object, true); return jq_link_to_remote('edit', array('url' => $url, 'method' => 'get', 'update' => $displayData, 'with' => '"form=' . $subtype . '"', 'before' => sprintf("\$('#%s').data('a-form-swap', \$('#%s').html()); aBusy(this)", $displayData, $displayData), 'complete' => sprintf("aReady('#%s'); \$('#%s').hide()", $editButton, $editButton)), array('class' => 'a-form-edit-button', 'id' => $editButton)); }
function a_remote_dialog_toggle($options) { if (!isset($options['id'])) { throw new sfException("Required id option not passed to a_dialog_toggle"); } if (!isset($options['label'])) { throw new sfException("Required label option not passed to a_dialog_toggle"); } if (!isset($options['action'])) { throw new sfException("Required action option not passed to a_dialog_toggle"); } $id = $options['id']; $action = $options['action']; $label = $options['label']; if (isset($options['chadFrom'])) { $chadFrom = $options['chadFrom']; } if (isset($options['loading'])) { $loading = $options['loading']; } if (isset($options['hideToggle']) && $options['hideToggle'] == true) { $before = " \$('.{$id}-loading').show();"; } else { $before = "\$('.{$id}-button.open').hide(); \$('.{$id}-loading').show();"; } $s = ''; $s .= jq_link_to_remote(__($label, null, 'apostrophe'), array("url" => $action, "update" => $id, "script" => true, "before" => $before, "complete" => "\$('#{$id}').fadeIn();\n \t\t\t\t\t\t\t\t\t \$('.{$id}-loading').hide();\n\t\t\t\t\t\t\t\t\t\t \t\$('.{$id}-button.open').hide();\n \t\t\t\t\t\t\t\t\t \$('#{$id}-button-close').show();" . (isset($chadFrom) ? "var arrowPosition = parseInt(\$('{$chadFrom}').offset().left);\n \t\t\t\t\t\t\t\t \$('#{$id} .a-chad').css('left',arrowPosition+'px'); " : "") . "\n \t\t\t\t\t\t\t\t\t aUI('#{$id}');\n \t\t\t\t\t\t\t\t\t\$('.a-page-overlay').show();"), array('class' => "{$id}-button open", 'id' => "{$id}-button-open")); $s .= jq_link_to_function(__($label, null, 'apostrophe'), "\$('#{$id}-button-close').hide(); \n\t\t \$('#{$id}-button-open').show(); \n\t\t \$('#{$id}').hide();\n\t\t \$('.a-page-overlay').hide();", array('class' => "{$id}-button close", 'id' => "{$id}-button-close", 'style' => 'display:none;')); if (isset($loading)) { $s .= image_tag($loading, array('class' => "{$id}-loading", 'style' => 'display:none;')); } return $s; }
/** * Ссылка на удаление комментария * * @param Comment $comment */ function link_to_comment_delete($comment, $title = null) { $user = sfContext::getInstance()->getUser(); if ($user->isAuthenticated() && $user->getGuardUser()->getId() == $comment->getUserId() && $comment->hasDeletable()) { return jq_link_to_remote($title ? $title : 'Удалить', array('method' => 'post', 'url' => url_for('comment_delete', $comment), 'success' => 'jQuery("#comment-' . $comment->id . '").remove();', 'confirm' => 'Вы точно хотите удалить свой комментарий?')); } }
function link_to_add_new_comment($name, $record, $comment = null) { use_helper('jQuery'); $params = array(); $params['update'] = $comment && $comment->getId() ? 'add_new_comment_form_holder_' . $comment->getId() : 'add_new_comment_form_holder'; $params['url'] = '@cscomments_comments_add'; $comment_id = $comment ? $comment->getId() : null; $params['with'] = "'comment_id=" . $comment_id . "&model=" . get_class($record) . "&record_id=" . $record->getId() . "&return_uri=" . urlencode(sfContext::getInstance()->getRequest()->getUri()) . "'"; // $params['complete'] = "setRatingListeners();"; return jq_link_to_remote($name, $params); }
echo $form->renderFormTag(url_for('@list_create')); ?> <?php echo $form; ?> <div id='list-items'> <?php foreach ($item_forms as $item_form) { ?> <?php echo $item_form; ?> <?php } ?> </div> <input type="submit" class="button" value="Add"></input> <?php echo markdown_preview_link('community_list[description]'); ?> <?php echo jq_link_to_remote('Add List Item', array('update' => 'list-items', 'url' => 'list_item_add_ajax', 'position' => 'bottom')); ?> </form> <?php echo markdown_preview();
<?php use_helper('jQuery', 'I18N'); ?> <ul> <?php foreach ($pages as $p) { ?> <li class="unhighlighted" id="menu_page_item_<?php echo $p->getId(); ?> "> <?php echo jq_link_to_remote($p->getUrl(), array('update' => 'theContent', 'method' => 'GET', 'url' => '@cms_page_view?idPage=' . $p->getId(), '404error' => "alert('Nao pude carregar!')", 'after' => "\$('#loading').fadeOut()", 'before' => "highlightme('#menu_page_item_" . $p->getId() . "');\$('#loading').fadeIn()")); ?> </li> <?php } ?> </ul>
<?php echo jq_link_to_remote(image_tag($ssStaus . ".gif?id=" . rand()), array('update' => 'idActive' . $snId, 'url' => $oAppCommon->ssModuleName . '/' . (isset($ssAction) ? $ssAction : 'active'), 'with' => "'cValue=" . ($ssStaus == 'Yes' ? 'No' : 'Yes') . "&" . $oAppCommon->ssBaseId . "=" . $snId . "'", 'confirm' => __("Are you sure, you want to %sstitle%?", array('%sstitle%' => $ssTitle))), array('title' => isset($ssTitle) ? __('Click here to') . " " . $ssTitle : '')); ?>
?> </ul> </div> </li> <?php } ?> <li class="signup_button"> <div class="response"> </div> <div class="form"> </div> <h5> <img src="/images/icons/add.png" alt="toevoegen" /> <?php if_javascript(); echo jq_link_to_remote('Meld je ook aan »', array('update' => '.signup_button .form', 'url' => 'expertbank/new', 'complete' => 'Cufon.refresh(); $(".signup_button .form").effect("highlight", {}, 2000);')); end_if_javascript(); ?> <noscript> <?php echo link_to('Meld je ook aan »', 'expertbank/new'); ?> </noscript> </h5> </li> </ul>
?> "> <span class="a-btn alt a-disabled icon a-checked nobg"><?php echo $settings['label']; ?> </span> </li> <li id="<?php echo $id; ?> -inactive" class="inactive" style="<?php echo !$active ? '' : 'display: none'; ?> "> <?php echo jq_link_to_remote(__($settings['label'], null, 'apostrophe'), array('url' => url_for('a/setVariant?' . http_build_query(array('id' => $pageid, 'name' => $name, 'permid' => $permid, 'variant' => $variant))), 'update' => "a-slot-content-{$pageid}-{$name}-{$permid}"), array('class' => 'a-btn alt icon a-unchecked nobg')); ?> </li> <script type="text/javascript" charset="utf-8"> $(document).ready(function() { <?php // When the link to activate an inactive variant is clicked... ?> $('<?php echo "#a-{$pageid}-{$name}-{$permid}-variant-{$variant}-inactive a"; ?> ').click(function() { <?php // Add the loading class... ?> $('<?php
} $calendar = $c->getEventCalendar(); ?> <table class="calendar_table"> <tr> <th class="th"><?php echo jq_link_to_remote('◄', array('update' => 'inner_content_' . $slot->getId(), 'url' => '@plop-cms-module-calendar', 'with' => "'slug=" . $page_slug . "&slot_id=" . $slot->getId() . "&sf_culture=" . $culture . "&date=" . $prev_month . "'"), array('class' => 'link', 'title' => __('Previous month'))); ?> </th> <th class="th" colspan="5"><?php echo format_date($page_date, 'MMMM yyyy', $culture); ?> </th> <th class="th"><?php echo jq_link_to_remote('►', array('update' => 'inner_content_' . $slot->getId(), 'url' => '@plop-cms-module-calendar', 'with' => "'slug=" . $page_slug . "&slot_id=" . $slot->getId() . "&sf_culture=" . $culture . "&date=" . $next_month . "'"), array('class' => 'link', 'title' => __('Next month'))); ?> </th> </tr> <?php $i = 0; foreach ($calendar as $week) { ?> <tr> <?php foreach ($week as $day => $events) { $month = explode('-', $day); ?> <td class="td <?php echo in_array(date('N', strtotime($day)), array('6', '7')) ? 'weekend' : 'week';
?> </td> <td><?php echo $personal_flight->getReturnDate('m/d/Y'); ?> </td> <td><?php echo strlen($personal_flight->getName()) > 10 ? substr($personal_flight->getName(), 0, 10) . '...' : $personal_flight->getName(); ?> </td> <td> <?php echo link_to('edit', 'account/editPersonalFlight?id=' . $personal_flight->getId()); ?> <?php echo jq_link_to_remote('remove', array('url' => 'account/ajaxDeletePersonalFlight?id=' . $personal_flight->getId(), 'success' => "\$('#personal_flight_{$personal_flight->getId()}').remove();"), array('confirm' => 'Are you sure?')); ?> </td> </tr> <?php } ?> </table> </div> </div> </div> </div> <?php // js and css for datePicker $sf_response->addStylesheet('jquery-ui.custom.css'); $sf_response->addJavascript('jquery-ui.custom.min.js');
<div> <?php if ($oPager->haveToPaginate()) { if ($sf_params->get('page') && $sf_params->get('page') != $oPager->getFirstPage()) { echo jq_link_to_remote(image_tag('/images/admin/pag-first-icon.gif', array('title' => __('First'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getFirstPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('First'), 'class' => 'pager')); echo jq_link_to_remote(image_tag('/images/admin/pag-pre-icon.gif', array('title' => __('Previous'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getPreviousPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('Previous'), 'class' => 'pager')); } else { echo '<span class="pager" >' . image_tag('/images/admin/pag-first-icon-gray.gif', array('title' => __('First'))) . '</span>'; echo '<span class="pager" >' . image_tag('/images/admin/pag-pre-icon-gray.gif', array('title' => __('Previous'))) . '</span>'; } $snLinks = $oPager->getLinks($oPager->getLastPage()); $aPager = array(); foreach ($snLinks as $snPage) { $aPager[$snPage] = $snPage; } echo select_tag('pageBox', options_for_select($aPager, $oPager->getPage()), array('onChange' => "jQuery.ajax({type:'POST',dataType:'html',data:'page='+this.value+'&" . $ssParams . "',success:function(data, textStatus){jQuery('#" . $ssDivId . "').html(data);},url:'" . $ssLink . "'" . (isset($onCompelte) ? ",complete:function (){" . $onCompelte . "}" : "") . "})")); if ($sf_params->get('page') != $oPager->getLastPage()) { echo jq_link_to_remote(image_tag('/images/admin/pag-next-icon.gif', array('title' => __('Next'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getNextPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('Next'), 'class' => 'pager')); echo jq_link_to_remote(image_tag('/images/admin/pag-last-icon.gif', array('title' => __('Last'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getLastPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('Last'), 'class' => 'pager')); } else { echo '<span class="pager" >' . image_tag('/images/admin/pag-next-icon-gray.gif', array('title' => __('Next'))) . '</span>'; echo '<span class="pager" >' . image_tag('/images/admin/pag-last-icon-gray.gif', array('title' => __('Last'))) . '</span>'; } } ?> </div>
<?php use_helper('jQuery'); ?> <ul id="images-list"> <?php foreach ($photos as $image) { ?> <li id="listItem_<?php echo $image->getId(); ?> "> <?php echo image_tag('/uploads/gallery/thumb_' . $image->getPath()); ?> <?php echo jq_link_to_remote(image_tag('/images/delete.png', array()), array('url' => 'gallery/deletePhoto?photo_id=' . $image->getId(), 'complete' => '$("#listItem_' . $image->getId() . '").remove();')); ?> </li> <?php } ?> </ul>
<?php use_helper('jQuery'); ?> <div id="sf_admin_container"> <div> <?php if ($sf_request->isXmlHttpRequest()) { ?> <?php echo jq_link_to_remote(__('Back to list', array(), 'sf_admin'), array('url' => url_for('@sympal_assets_select'), 'update' => 'sympal_assets_container', 'title' => __('Back to list', array(), 'sf_admin'), 'method' => 'get')); ?> <?php } else { ?> <?php echo link_to(__('Back to list', array(), 'sf_admin'), '@sympal_assets'); ?> <?php } ?> </div> <h1><?php echo __('Editing Asset "%asset%"', array('%asset%' => $asset->getName())); ?> </h1> <div id="sympal_edit_asset"> <div class="sf_admin_form"> <?php if ($isAjax) {
use_helper('I18N'); use_helper('jQuery'); use_helper('SfReview'); ?> <?php if ($reviewType) { ?> <div class="review-current"> <h5> <strong><?php echo __('Tu voto'); ?> :</strong> <?php echo $reviewValue == 1 ? __('A favor') : __('En contra'); ?> <br /> <span class="sf-review-action"> <?php echo jq_link_to_remote(__('Hacer cambios en tu voto'), array('update' => $reviewBox ? $reviewBox : 'sf_review', 'url' => "@sf_review_form?t={$reviewType}&e={$reviewEntityId}&v={$reviewValue}&b=" . ($reviewBox ? $reviewBox : 'sf_review'), 'before' => "re_loading('" . ($reviewBox ? $reviewBox : 'sf_review') . "')")); ?> </span> </h5> <p><?php echo review_text($review); ?> </p> </div> <?php }
</td> </tr> <?php } ?> </tbody> </table> Items per page: <?php foreach ($max_array as $i => $v) { if ($i) { echo ' | '; } if ($max != $v) { echo jq_link_to_remote($v, array('url' => 'role/list?max=' . $v, 'before' => "\$('#indicator').show();", 'success' => "\$('#indicator').hide(); \$('#roles').html(data);")); } else { echo $v; } } ?> <div class="pager"> <form onsubmit="navigate($('#role_page').val());return false;" action="#"> <?php echo jq_link_to_function('Previous', "navigate(" . $pager->getPreviousPage() . ")", array('class' => 'btn-pager-prev')); ?> <input type="text" id="role_page" class="active-page" value="<?php echo $pager->getPage(); ?> "/>
<?php foreach ($contentTypes as $type) { ?> <li> <?php if ($type === $contentType) { ?> <strong><?php echo $type->getLabel(); ?> </strong> <?php } else { ?> <?php echo jq_link_to_remote($type->getLabel(), array('url' => url_for('@sympal_editor_links?content_type_id=' . $type->getId()), 'update' => 'sympal_links_container')); ?> <?php } ?> </li> <?php } ?> </ul> </div> <div id="links"> <h2><?php echo $contentType->getLabel(); ?>
$ids = array(); ?> <?php foreach ($items as $item) { ?> <li id="a-media-selection-list-item-<?php echo $item->getId(); ?> " class="a-media-selection-list-item"> <?php $id = $item->getId(); ?> <ul class="a-controls a-media-multiple-list-controls"> <li><?php echo jq_link_to_remote(__("remove this item", null, 'apostrophe'), array('url' => 'aMedia/multipleRemove?id=' . $id, 'update' => 'a-media-selection-list', 'complete' => 'aUI("a-media-selection-list"); aMediaDeselectItem(' . $id . ')'), array('class' => 'a-btn icon a-delete no-label', 'title' => __('Remove', null, 'apostrophe'))); ?> </li> </ul> <div class="a-media-selected-item-drag-overlay" title="<?php echo __('Drag & Drop to Order', null, 'apostrophe'); ?> "></div> <div class="a-media-selected-item-overlay"></div> <img src="<?php echo url_for($item->getScaledUrl(aMediaTools::getOption('selected_constraints'))); ?> " /> <?php
<?php foreach ($assets as $asset) { ?> <li id="<?php echo $asset->getSlug(); ?> " title="<?php echo $asset->getName(); ?> " class="asset"> <?php echo jq_link_to_remote(image_tag('/sfSympalPlugin/images/edit.png'), array('url' => url_for('sympal_assets_edit_asset', $asset), 'update' => 'sympal_assets_container', 'title' => __('Edit file "%file%"', array('%file%' => $asset->getName())), 'method' => 'get')); ?> <?php echo jq_link_to_remote(image_tag('/sfSympalPlugin/images/delete.png'), array('url' => url_for('sympal_assets_delete_asset', $asset), 'update' => 'sympal_assets_container', 'title' => __('Delete file "%file%"', array('%file%' => $asset->getName())), 'method' => 'get')); ?> <?php echo link_to($asset->getName(), $asset->getUrl(), 'class=insert title=' . $asset->getEmbedCode()); ?> <?php if ($asset->isImage()) { ?> <?php echo image_tag($asset->getUrl(), 'class="preview" style="display: none;"'); ?> <?php } ?>
<?php use_helper('I18N'); ?> <?php $slotTypesInfo = aTools::getSlotTypesInfo($options); ?> <?php foreach ($slotTypesInfo as $type => $info) { ?> <?php $label = $info['label']; $class = $info['class']; $link = jq_link_to_remote(__($label, null, 'apostrophe'), array("url" => url_for("a/addSlot") . '?' . http_build_query(array('name' => $name, 'id' => $id, 'type' => $type, 'actual_url' => $sf_request->getUri())), "update" => "a-slots-{$id}-{$name}", 'script' => true, 'complete' => 'aUI("#a-area-' . $id . '-' . $name . '"); $("#a-area-' . $id . '-' . $name . '").removeClass("add-slot-now");'), array('class' => 'a-btn alt icon nobg ' . $class . ' slot')); ?> <li class="a-options-item"><?php echo $link; ?> </li> <?php } ?>
?> <?php } ?> </tbody> <tfoot id="global_calculations"> <tr> <td colspan="<?php echo $sf_user->has_module('products') ? '5' : '4'; ?> " rowspan="5" class="noborder top"> <div id="addItem"> <?php $addItemOptions = array('url' => 'common/ajaxAddInvoiceItem', 'position' => 'bottom', 'method' => 'post', 'with' => "{invoice_id: \$('#invoice_id').val()}", 'success' => "\$('#tbody_invoice_items').append(data);\n \$('textarea.resizable:not(.processed)').TextAreaResizer();"); echo jq_link_to_remote(__("Add Item"), $addItemOptions); // if invoice has no items, we add one by an ajax call if (!count($invoiceForm['Items'])) { $first = jq_remote_function($addItemOptions); echo javascript_tag("{$first}"); } ?> </div> <?php if (count($invoiceItemsGlobalErrors)) { ?> <div id="invoiceItemsGlobalErrors" class="errorBox"> <p><?php echo __('Please check these errors and correct them before saving:'); ?> </p>
<input class="add-text tag-input" name="tags" type="text" /> <input type="submit" class="a-btn icon a-submit a-add" value="Add" /> <div class="add-tags-help"> You can add multiple tags at once separated with commas. </div> </form> </div> <?php if (count($popular_tags)) { ?> <div class="popular-tags"> <h5>Popular Tags</h5> <ul class="a-ui"> <?php $n = 1; foreach ($popular_tags as $tag => $count) { ?> <li> <?php echo jq_link_to_remote($tag, array('url' => url_for('taggable_add_tag', array('object_id' => $object->id, 'object_class' => get_class($object), 'tags' => $tag)), 'complete' => '$(".assigned-tags").parent().html(XMLHttpRequest.responseText);'), array('class' => '')); ?> </li> <?php $n++; } ?> </ul> </div> <?php }
public function configure() { $this->validatorSchema->setOption('allow_extra_fields', true); $this->widgetSchema['artefacto_id'] = new sfWidgetFormInputHidden(); $this->widgetSchema['validada'] = new sfWidgetFormInputHidden(); $this->widgetSchema['estado_id'] = new sfWidgetFormInputHidden(); $configuration = sfProjectConfiguration::getActive(); $configuration->loadHelpers(array('jQuery','Asset','Tag','Url')); $index = 0; foreach ($this->getObject()->getFicheros() as $fichero){ $this->embedForm('item_pos'.++$index, new FicherosForm($fichero)); $label = "Fichero $index: ".jq_link_to_remote(image_tag('/sf/sf_admin/images/delete'), array( 'url' => 'version/deleteItem?id='.$fichero->getId(), 'update' => 'ficheros', 'confirm' => 'Estas seguro?', )); $this->widgetSchema->setLabel('item_pos'.$index,$label); } if (!sfContext::getInstance()->getUser()->getAttribute('inclusion')) { $fichero = new Ficheros(); $fichero->setVersion($this->getObject()); $this->embedForm('item_pos'.++$index, new FicherosForm($fichero)); if ($this->getObject()->getId()) { $label = "Fichero $index: ".jq_link_to_remote(image_tag('/sf/sf_admin/images/add'), array( 'url' => 'version/addItems?versionId='.$this->getObject()->getId(), 'update' => 'ficheros', 'position'=> 'after', )); } else { $label = "Fichero "; } $this->widgetSchema->setLabel('item_pos'.$index,$label); } sfContext::getInstance()->getUser()->setAttribute('N1added'.$this->getObject()->getId(), $index); sfContext::getInstance()->getUser()->setAttribute('Proyecto', $this->getObject()->getArtefacto()->getProyectoId()); $this->widgetSchema['users_list'] = new sfWidgetFormDoctrineChoice(array( 'table_method' => 'getUsuariosProyecto', 'model' => 'sfGuardUser', 'multiple' => true, 'expanded' => true, )); $this->widgetSchema['users_list']->setLabel('Usuarios asignados (disponibles del proyecto)'); unset( $this['created_at'], $this['updated_at'],$this['version'],$this['lineas_base_list'] ); if (!$this->getObject()->getId()) { unset( $this['users_list'] ); } if (!$this->getObject()->getEstado()->getEdicion()) { $this->widgetSchema['nombre']->setAttribute('readonly', 'readonly'); $this->widgetSchema['descripcion']->setAttribute('readonly', 'readonly'); $this->widgetSchema['identificador']->setAttribute('readonly', 'readonly'); $this->widgetSchema['tipo_id']->setAttribute('readonly', 'readonly'); } }
?> </p> </div> </li> <?php } ?> </ul> <div class="form"></div> <?php if ($sf_user->hasCredential('showcase_add')) { ?> <h5 class="signup_button"> <img src="/images/icons/add.png" alt="toevoegen" /> <?php if_javascript(); echo jq_link_to_remote('Voeg jou kunstwerk toe »', array('update' => '#walloffame .form', 'url' => 'showcase/new', 'complete' => 'Cufon.refresh(); $("#walloffame .form").effect("highlight", {}, 2000);')); end_if_javascript(); ?> <noscript> <?php echo link_to('Voeg jou kunstwerk toe »', 'showcase/new'); ?> </noscript> </h5> <?php } ?> </div>
foreach ($categoriesInfo as $info) { ?> <li class="category"> <ul> <li class="name"> <?php echo htmlspecialchars($info['name']); ?> (<?php echo $info['count']; ?> ) </li> <li class="actions"> <?php echo jq_link_to_remote(__('Delete', null, 'apostrophe'), array('url' => "aMedia/deleteCategory?" . http_build_query(array('slug' => $info['slug'])), 'update' => 'a-media-edit-categories'), array("class" => "a-btn icon no-label a-delete")); ?> </li> </ul> </li> <?php } ?> </ul> <?php echo jq_form_remote_tag(array('url' => 'aMedia/addCategory', 'update' => 'a-media-edit-categories', 'complete' => '$("#a_media_category_name").val("")')); ?> <?php echo $form;
public function executeAddItems(sfWebRequest $request){ $versionId = $request->getParameter('versionId'); if($versionId) { $index = sfContext::getInstance()->getUser()->getAttribute('N1added'.$versionId); $configuration = sfProjectConfiguration::getActive(); $configuration->loadHelpers(array('jQuery','Asset','Tag','Url')); $fichero = new Ficheros(); $fichero->setversionId($versionId); sfContext::getInstance()->getUser()->setAttribute('inclusion', true); $form = new VersionForm(); $form -> embedForm('item_pos'.++$index, new FicherosForm($fichero)); $widgetSchema = $form->getWidgetSchema(); $label = "Fichero $index: ".jq_link_to_remote(image_tag('/sf/sf_admin/images/add'), array( 'url' => 'version/addItems?versionId='.$versionId, 'update' => 'ficheros', 'position'=> 'bottom', )); $widgetSchema->setLabel('item_pos'.$index,$label); sfContext::getInstance()->getUser()->setAttribute('N1added'.$versionId, $index); return $this->renderPartial('version/fichero',array ('index' => $index,'form'=>$form)); } }
<?php include_slot('a-cancel'); ?> <?php } ?> <?php if ($infinite) { ?> <li class="delete"> <?php $delete_button_style = sfConfig::get('app_a_delete_button_style', "no-label"); ?> <?php echo jq_link_to_remote(__('Delete', null, 'apostrophe'), array("url" => "a/deleteSlot?" . http_build_query(array("id" => $page->id, "name" => $name, "permid" => $permid)), "update" => "a-slots-{$pageid}-{$name}", 'before' => '$(this).parents(".a-slot").fadeOut();', 'complete' => 'aUI()'), array('class' => 'a-btn icon a-delete ' . $delete_button_style, 'title' => __('Delete Slot', null, 'apostrophe'), 'confirm' => __('Are you sure you want to delete this slot?', null, 'apostrophe'))); ?> </li> <?php } ?> </ul> <?php } ?> <?php // End controls for this individual slot ?>
} else { echo $invoiceItemForm['quantity']->render(array(), ESC_RAW); } ?> </td> <td class="right taxes_td"> <span id="<?php echo $rowId; ?> _taxes" class="taglist taxes"> <?php $err = $invoiceItemForm['taxes_list']->hasError() ? 'error' : ''; $item_taxes = $invoiceItemForm['taxes_list']->getValue() ? $invoiceItemForm['taxes_list']->getValue() : array(); $totalTaxesValue = Doctrine::getTable('Tax')->getTotalTaxesValue($item_taxes); echo jq_javascript_tag("\n window.new_item_tax_index = \$('" . $rowId . "_taxes').find('span[id^=tax_" . $rowId . "]').size()+1;\n "); echo jq_link_to_remote(__("Add"), array('update' => $rowId . '_taxes', 'url' => 'common/ajaxAddInvoiceItemTax', 'position' => 'bottom', 'method' => 'post', 'with' => "{item_tax_index: new_item_tax_index++, invoice_item_key: '{$rowId}'}")); foreach ($item_taxes as $taxId) { include_partial('common/taxSpan', array('taxKey' => $taxId, 'rowId' => $rowId, 'err' => $err)); } ?> <?php // if item has no taxes, and there are "default" taxes defined, we add them if (isset($isNew) && !count($item_taxes)) { $default_taxes = Doctrine::getTable('Tax')->createQuery()->where('active', true)->where('is_default', true)->execute(); foreach ($default_taxes as $taxx) { echo javascript_tag(jq_remote_function(array('update' => $rowId . '_taxes', 'url' => 'common/ajaxAddInvoiceItemTax', 'position' => 'bottom', 'method' => 'post', 'with' => "{\n item_tax_index: new_item_tax_index++, \n invoice_item_key: '{$rowId}',\n selected_tax: '" . $taxx->id . "'\n }"))); } } ?> </span>
? </h2>--> <div id="meeting_infos"> <span id="meeting_title"><?php echo $meeting->getTitle(); ?> </span> <span id="meeting_author">(<?php $createur = Doctrine::getTable('user')->find($meeting->getUid()); echo $createur->getSurname() . ' ' . $createur->getName(); ?> )</span> <?php if ($sf_user->hasCredential('member')) { ?> <?php echo jq_link_to_remote($meeting->isFollowedBy($sf_user->getProfileVar(sfConfig::get('app_user_id'))) ? image_tag('/images/rss_32.png', array('title' => __('Stopper le suivi'), 'class' => 'icon_32 followed')) : image_tag('/images/rss_32_bw.png', array('title' => __('Suivre ce rendez-vous'), 'class' => 'icon_32 not_followed')), array('url' => url_for('meeting/follow?h=' . $meeting->getHash())), array('id' => 'follow_link')); } ?> <div id="meeting_desc"> <?php echo nl2br($meeting->getDescription()); ?> </div> </div> <?php echo __('Indiquez votre sélection en cliquant sur les cases à cocher') . '. ' . __('Utilisez ensuite le bouton "Voter" pour valider votre vote'); ?> . <br /> <div class="contextMenu" id="poll_menu"> <ul>
</span> <?php } else { ?> <span class="sf-review-remove"> <?php echo __('¿Seguro?'); ?> <span> <?php echo jq_link_to_remote(__('Sí'), array('update' => $reviewBox ? $reviewBox : 'sf_review', 'url' => "@sf_review_delete?i={$reviewId}&e={$reviewEntityId}&t={$reviewType}&cf=1" . ($reviewBox == '' ? '' : "&b={$reviewBox}"), 'before' => "re_loading('" . ($reviewBox ? $reviewBox : 'sf_review') . "')")); ?> </span> <span> <?php echo jq_link_to_remote(__('No'), array('update' => $reviewBox ? $reviewBox : 'sf_review', 'url' => "@sf_review_form?i={$reviewId}&e={$reviewEntityId}&t={$reviewType}" . ($reviewBox == '' ? '' : "&b={$reviewBox}"))); ?> </span> </span> <?php } ?> <?php } ?> </div> <div class="sf-review-opciones"> <div id="opciones"> <?php if ($sf_user->getProfile()->getFacebookUid()) {