echo url_for(aUrl::addParams($filtersWithoutDate, array('year' => $calendar['year'], 'month' => date('m', strtotime($calendar['month']))))); ?> "><?php echo $calendar['month']; ?> </a> <a href="<?php echo url_for(aUrl::addParams($filtersWithoutDate, array('year' => $calendar['year'], 'month' => ''))); ?> "><?php echo $calendar['year']; ?> </a> </h4> <?php echo a_button(a_('Next'), url_for(aUrl::addParams($filtersWithoutDate, $calendar['params']['next'])), array('a-arrow-btn', 'icon', 'a-arrow-right', 'next-month', 'alt')); ?> </th> </tr> <tr class="days"> <th class="day sunday">Su</th> <th class="day monday">M</th> <th class="day tuesday">T</th> <th class="day wedsnesday">W</th> <th class="day thursday">Th</th> <th class="day friday">F</th> <th class="day saturday">S</th> </tr> </thead> <tbody> <?php
?> <?php $catClass = ""; foreach ($a_event->getCategories() as $category) { $catClass .= " category-" . aTools::slugify($category); } ?> <div class="a-blog-item event <?php echo $a_event->getTemplate(); echo $catClass != '' ? $catClass : ''; ?> "> <?php if ($a_event->userHasPrivilege('edit')) { ?> <ul class="a-ui a-controls a-blog-post-controls"> <li> <?php echo a_button(a_('Edit'), url_for('a_event_admin_edit', $a_event), array('a-btn', 'icon', 'a-edit', 'lite', 'alt', 'no-label')); ?> </li> </ul> <?php } ?> <?php include_partial('aEvent/' . $a_event->getTemplate(), array('a_event' => $a_event, 'edit' => false)); ?> </div>
echo a_button(a_('Cancel'), url_for('aMedia/resume'), array('icon', 'a-cancel', 'big')); ?> </li> <li><?php echo a_anchor_submit_button(a_('Save Media'), array('big'), substr($submitSelector, 1)); ?> </li> <?php } else { ?> <li><?php echo a_anchor_submit_button(a_('Save'), array(), substr($submitSelector, 1)); ?> </li> <li><?php echo a_button(a_('Cancel'), url_for('aMedia/resume'), array('icon', 'a-cancel')); ?> </li> <?php } ?> <?php if ($item) { ?> <li> <?php echo link_to("<span class='icon'></span>" . __("Delete", null, 'apostrophe'), "aMedia/delete?" . http_build_query(array("slug" => $item->slug)), array("confirm" => __("Are you sure you want to delete this item?", null, 'apostrophe'), "class" => "a-btn icon a-delete no-label", 'title' => __('Delete', null, 'apostrophe')), array("target" => "_top")); ?> </li> <?php }
?> <?php $nextLabel = $params['next']['year'] . '-' . $params['next']['month']; ?> <?php } else { ?> <?php $prevLabel = $params['prev']['year']; ?> <?php $nextLabel = $params['next']['year']; ?> <?php } ?> <?php } ?> <ul class="a-ui a-controls a-blog-browser-controls"> <li><?php echo a_button($prevLabel, url_for($url . '?' . http_build_query($params['prev'])), array('icon', 'a-arrow-left', 'alt', 'no-bg')); ?> </li> <li><?php echo a_button($nextLabel, url_for($url . '?' . http_build_query($params['next'])), array('icon', 'a-arrow-right', 'alt', 'no-bg', 'icon-right')); ?> </li> </ul> <?php }
<?php use_helper('a'); ?> <?php foreach ($reports as $key => $report) { ?> <li class="a-options-item"><?php echo a_button(__($report['label'], array(), 'apostrophe'), url_for($report['action'] . '?id=' . $poll->getId()), array('class' => 'alt no-bg a-poll-export-' . $key)); ?> </li> <?php } ?> <?php a_js_call('apostrophe.menuToggle(?)', array('button' => '#a-poll-export-answers-' . $poll->getId(), 'classname' => 'a-options-open', 'overlay' => false)); ?>
</li> <?php } else { ?> <?php include_partial('a/language'); ?> <?php // You can easily turn off the 'Log In' link via app.yml ?> <?php if (sfConfig::get('app_a_login_link', true)) { ?> <li class="a-login-login last"> <?php echo a_button(a_('Login'), url_for('@sf_guard_signin'), array('a-login-button'), 'a-login-button'); ?> <div id="a-login-form-container" class="a-ui a-options a-login-form-container dropshadow"> <?php include_component('a', 'signinForm'); ?> </div> </li> <?php a_js_call('apostrophe.menuToggle(?)', array('button' => '#a-login-button', 'classname' => 'a-options-open', 'overlay' => true, 'focus' => '#signin_username')); ?> <?php } } ?>
<li class="a-service a-<?php echo $account->service; ?> "><?php echo $account->service; ?> </li> <li class="a-account"><?php echo a_entities($account->username); ?> </li> <?php if (isset($form)) { ?> <li class="a-actions"><?php echo a_button(a_('Remove'), url_for('aMedia/linkRemoveAccount?id=' . $account->id), array('icon', 'a-close-small', 'no-label', 'no-bg'), null, null, 'Remove'); ?> </li> <?php } ?> </ul> </li> <?php } ?> <li class="a-help"> <?php echo a_('All new items in these accounts are automatically added to the media repository on a scheduled basis.'); ?> </li>
function a_anchor_submit_button($label, $classes = array(), $name = null, $id = null) { $classes[] = 'a-btn'; $classes[] = 'a-act-as-submit'; return a_button($label, '#', $classes, $id, $name); }
<?php $domId = "a-media-selection-list-item-{$id}"; ?> <li id="<?php echo $domId; ?> " class="a-media-selection-list-item"> <ul class="a-ui a-controls a-over a-media-selection-controls"> <li> <?php echo a_js_button(a_('Drag'), array('icon', 'a-drag', 'lite', 'no-label', 'alt')); ?> </li> <li> <?php echo a_button(a_('Edit'), aUrl::addParams(url_for("aMedia/edit"), array("slug" => $item->getSlug())), array('icon', 'a-edit', 'lite', 'no-label', 'alt')); ?> </li> <li> <?php echo a_js_button(a_('Crop'), array('icon', 'a-crop', 'lite', 'no-label', 'alt')); ?> </li> <li> <?php echo a_js_button(a_('Delete'), array('icon', 'a-delete', 'lite', 'no-label', 'alt')); ?> </li> </ul> <div class="a-thumbnail-container" style="background-image: url('<?php
<h4 class="a-tag-sidebar-title all-tags"><?php echo __('All Tags', null, 'apostrophe'); ?> </h4> <ul class="a-ui a-tag-sidebar-list all-tags"> <?php $n = 1; foreach ($allTags as $tag => $count) { ?> <li <?php echo $n == count($allTags) ? 'class="last"' : ''; ?> > <?php echo a_button('<span class="a-tag-count icon">' . $count . '</span>' . $tag, url_for(aUrl::addParams($current, array("tag" => $tag))), array('a-link', 'a-tag', 'icon', 'no-icon', 'icon-right')); ?> </li> <?php $n++; } ?> </ul> </div> <?php } ?> </div> </div>
<?php echo a_button(a_('Add to Outlook, iCal, etc.'), url_for('a_event_post_ical', $aEvent), array('icon', 'no-bg', 'a-events', 'alt'));
$filtered = aUrl::addParams($filterUrl, array('feed' => 'rss', 'year' => '', 'month' => '', 'day' => '')); ?> <?php if ($full === $filtered) { ?> <li><?php echo a_button(a_('RSS Feed'), url_for($full), array('icon', 'a-rss-feed', 'no-bg', 'alt')); ?> </li> <?php } else { ?> <li><?php echo a_button(a_('Full Feed'), url_for($full), array('icon', 'a-rss-feed', 'no-bg', 'alt')); ?> </li> <li><?php echo a_button(a_('Filtered Feed'), url_for($filtered), array('icon', 'a-rss-feed', 'no-bg', 'alt')); ?> </li> <?php } ?> </ul> <?php } ?> <?php a_js_call('aBlog.sidebarEnhancements(?)', array()); a_js_call('apostrophe.selfLabel(?)', array('selector' => '#a-search-blog-field', 'title' => $searchLabel, 'focus' => false));
$catClass .= " category-" . aTools::slugify($category); } ?> <div class="a-blog-item post <?php echo $a_blog_post->getTemplate(); echo $catClass != '' ? $catClass : ''; ?> clearfix"> <?php if ($a_blog_post->userHasPrivilege('edit')) { ?> <ul class="a-ui a-controls a-blog-post-controls"> <li> <?php echo a_button(a_('Edit'), url_for('a_blog_admin_edit', $a_blog_post), array('icon', 'a-edit', 'lite', 'alt', 'no-label')); ?> </li> </ul> <?php } ?> <?php include_partial('aBlog/' . $a_blog_post->getTemplate(), array('a_blog_post' => $a_blog_post, 'edit' => false)); ?> </div>
<?php // I adjusted the wording here to avoid saying "click on" as sometimes there is an explicit select button etc. ?> <h4> <?php echo __('Use the browsing and searching features to locate the %type% you want, then click to select it.', array('%type%' => __($type, null, 'apostrophe')), 'apostrophe'); ?> <?php if ($limitSizes) { ?> <?php // separately I18N the plural ?> <?php echo __('Only appropriately sized %typeplural% are shown.', array('%typeplural%' => __($type . 's', null, 'apostrophe')), 'apostrophe'); ?> <?php } ?> </h4> </div> </div> <ul class="a-ui a-controls"> <li><?php echo a_button(a_('Cancel'), url_for("aMedia/selectCancel"), array('icon', 'a-cancel', 'big', 'a-select-cancel')); ?> </li> </ul> </div>
<?php // Google says they accept HTML in descriptions but they seem not to use it for anything. // You never see descriptions anyway except when editing them. So send the plaintext. // The byte limit was chosen to avoid creating a URL that the browser won't accept, // even when Google double-encodes it in some situations $aEvent = $sf_data->getRaw('aEvent'); echo a_button(a_('Add to Google Calendar'), url_for('http://www.google.com/calendar/event?' . http_build_query(array('action' => 'TEMPLATE', 'text' => $aEvent->getTitle(), 'dates' => $aEvent->getUTCDateRange(), 'location' => preg_replace('/\\s+/', ' ', $aEvent['location']), 'sprop' => 'website:' . $sf_request->getHost(), 'details' => aHtml::toPlaintext($aEvent->getTextForArea('blog-body', 500, array('characters' => true, 'append_ellipsis' => a_('...'))))))), array('icon', 'no-bg', 'alt', 'a-events'));
echo url_for('aFeedback/feedback'); ?> " method="post" enctype="multipart/form-data" id="a-feedback-form" class="a-ui a-feedback-form clearfix"> <?php echo $form; ?> <div class="a-form-row submit"> <ul class="a-ui a-controls"> <li> <?php echo a_submit_button('Submit Feedback'); ?> </li> <li> <?php echo a_button('<span class="icon"></span>' . a_('Cancel'), $form['section']->getValue() ? $form['section']->getValue() : '#cancel', array('icon a-cancel'), 'a-feedback-form-cancel-button'); ?> </li> </ul> </div> </form> <?php if ($sf_request->isXmlHttpRequest()) { ?> <?php include_partial('a/globalJavascripts'); }
<ul class="a-ui a-admin-td-actions"> <?php echo $helper->linkToEdit($a_poll_poll, array('params' => array(), 'class_suffix' => 'edit', 'label' => 'Edit')); ?> <?php echo $helper->linkToDelete($a_poll_poll, array('params' => array(), 'confirm' => 'Are you sure?', 'class_suffix' => 'delete', 'label' => 'Delete')); ?> <?php echo $helper->linkToListAnswers($a_poll_poll, array('params' => array())); ?> <?php if (aPollToolkit::hasReports($a_poll_poll->getType())) { ?> <li class="a-options-container a-admin-action-export-answers"> <?php echo a_button('<span class="icon"></span>' . __('Reports', array(), 'apostrophe'), '#', array('class' => 'icon no-label a-options-button a-poll-export-answers'), 'a-poll-export-answers-' . $a_poll_poll->getId()); ?> <ul class="a-ui a-options a-poll-admin-export-answers-ajax dropshadow clearfix"> <?php include_component('aPollPollAdmin', 'exportAnswers', array('poll' => $a_poll_poll)); ?> </ul> </li> <?php } ?> </ul> </td>
?> <?php // it is less useful if all of your locations are 'room 150', etc. with no further ?> <?php // information. Naturally full addresses work best ?> <li class="post-location a-ui"> <?php echo aString::firstLine($aEvent['location']); ?> <?php if (sfConfig::get('app_events_google_maps', true)) { ?> <?php echo a_button(a_('Google Maps'), url_for('http://maps.google.com/maps?' . http_build_query(array('q' => preg_replace('/\\s+/', ' ', $aEvent['location'])))), array('no-bg', 'alt', 'icon', 'a-google-maps')); ?> <?php } ?> </li> <?php } ?> <?php /* Events generally don't display the author, but you can if necessary. ?> <li class="post-author"> <span class="a-blog-item-meta-label"><?php echo __('Posted By:', array(), 'apostrophe') ?></span> <?php echo ($aEvent->getAuthor()->getName()) ? $aEvent->getAuthor()->getName() : $aEvent->getAuthor() ?> </li>
public function linkToPreviewPoll($object, $params) { return '<li class="a-admin-action-preview-poll">' . a_button(a_('<span class="icon"></span>' . 'Preview poll'), '#a-poll-preview-area', array('a-save a-btn icon a-poll-preview alt'), 'preview-poll-button', '_preview_poll') . '</li>'; }