/**
 * Set the theme
 * @param Mixed $css String or array
 */
function use_plop_theme($class = '', $theme = null)
{
    if (!$theme) {
        $theme = sfPlop::get('sf_plop_theme');
    }
    if (preg_match('/\\s/', $theme) !== false) {
        $subthemes = explode(' ', $theme);
        $theme = array_shift($subthemes);
        $class .= ' ' . implode(' ', $subthemes);
    }
    $themes = sfPlop::get('sf_plop_loaded_themes');
    if ($theme != false && is_string($theme) && isset($themes[$theme])) {
        if (isset($themes[$theme]['css'])) {
            use_plop_stylesheet($themes[$theme]['css']);
        }
        if (isset($themes[$theme]['js'])) {
            use_plop_javascript($themes[$theme]['js']);
        }
    } else {
        $theme = '';
    }
    if (has_slot('sf_plop_theme') && $theme == sfPlop::get('sf_plop_theme')) {
        slot('sf_plop_theme', get_slot('sf_plop_theme') . $theme . ' ' . $class);
    } else {
        slot('sf_plop_theme', $theme . ' ' . $class);
    }
}
Beispiel #2
0
/**
 * Set a slot and returns the HTML for a uiSelectPager.
 * 
 * The slot allows to re-print the pager at the top and bottom of a table by
 * running the pager template only once.
 * 
 * Examples:
 * 
 *  echo ui_select_pager($pager)
 *    => Set and print the pager slot with the default slot name
 *  echo ui_select_pager()
 *    => Print the HTML for previously set slot
 *  echo ui_select_pager($pager, 'pager2')
 *    => Print and set a pager with a custom slot name
 *       (allows different pagers on one template)
 *  echo ui_select_pager(false, 'pager2')
 *    => Print previously set pager with custom slot name
 * 
 * @param  mixed   $pager   uiSelectPager object or false
 * @param  string  $slot    Slot name, leave out to use the default
 * 
 * @return string  HTML representation
 */
function ui_select_pager($pager = false, $slot = 'widgets.ui.pager')
{
    if ($pager !== false) {
        slot($slot);
        $view = new coreView(coreContext::getInstance());
        $view->getParameterHolder()->add(array('pager' => $pager));
        $view->setTemplate(dirname(__FILE__) . '/templates/ui_select_pager.php');
        echo $view->render();
        end_slot();
    }
    return get_slot($slot);
}
Beispiel #3
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php 
include_http_metas();
?>
    <?php 
include_metas();
?>
    <?php 
if (has_slot('title')) {
    ?>
      <title><?php 
    echo get_slot('title');
    ?>
 | DonateNashville.org</title>
    <?php 
} else {
    ?>
      <?php 
    include_title();
    ?>
    <?php 
}
?>
    <link rel="shortcut icon" href="/favicon.ico" />
  
		<script type="text/javascript" src="http://www.google.com/jsapi"></script>
		<script type="text/javascript" charset="utf-8">
			google.load('jquery','1.4');
			google.load('jqueryui', '1.8');
Beispiel #4
0
}
if (count($items) > 0) {
    ?>
<ul <?php 
    echo isset($class) ? "class='{$class}'" : '';
    ?>
 <?php 
    echo isset($id) ? "id='{$id}'" : '';
    ?>
>
<?php 
    foreach ($items as $item) {
        if ($item->isAuthenticated()) {
            ?>
   <?php 
            if ($item->isActive(get_slot('active-navigation'))) {
                ?>
     <li class="active"><a href="#"><?php 
                echo $item->getName();
                ?>
</a>
   <?php 
            } elseif ($item->isActiveBranch()) {
                ?>
     <li class="active-parent"><?php 
                echo link_to($item->getName(), $item->getRoute());
                ?>
</a>
   <?php 
            } elseif ($item->getRoute()) {
                ?>
Beispiel #5
0
<tr>
<th><?php 
echo __('Description');
?>
</th><td><?php 
echo $albumImage->getDescription();
?>
</td>
</tr>
</table>
<?php 
end_slot();
?>

<?php 
echo op_include_box('albumImageDetailBox', get_slot('_album_detail_table'), array('title' => __('View this photo')));
?>

<div class="dparts albumImageLikeList"><div class="parts">
<div class="block likeUnlikeLine">
<?php 
if ($albumImageLike = $albumImage->isLiked($sf_user->getMemberId())) {
    echo link_to(__('Unlike'), 'album_image_like_delete', $albumImageLike);
} else {
    echo link_to(__('Like'), 'album_image_like_create', $albumImage);
}
?>
</div>
<div class="block likeListDetail">
<?php 
include_component('albumImageLike', 'list', array('albumImage' => $albumImage));
Beispiel #6
0
  	<div id="content">
      <div id="left">
        <?php 
echo $sf_content;
?>
      </div>

  	  <?php 
$menu = get_sympal_menu('primary');
?>
    	<div id="sidebar">
        <?php 
if (has_slot('sympal_right_sidebar')) {
    ?>
          <?php 
    echo get_slot('sympal_right_sidebar');
    ?>
        <?php 
}
?>

        <h2><?php 
echo __('Navigation');
?>
</h2>

        <?php 
if ($menu) {
    ?>
          <?php 
    echo $menu;
Beispiel #7
0
", "<?php 
    echo url_for('member/updateActivity');
    ?>
");
</script>
<?php 
}
?>
<div class="box_list">
<ol id="<?php 
echo $id;
?>
_timeline" class="activities">
<?php 
foreach ($activities as $activity) {
    include_partial('default/activityRecord', array('activity' => $activity));
}
?>
</ol>
</div>
<?php 
end_slot();
?>

<?php 
$params = array('title' => isset($title) ? $title : __('%activity% of %my_friend%', array('%activity%' => $op_term['activity']->titleize(), '%my_friend%' => $op_term['my_friend']->titleize()->pluralize())), 'class' => 'activityBox homeRecentList');
if (isset($gadget)) {
    $params['moreInfo'] = array(link_to(__('More'), isset($moreUrl) ? $moreUrl : 'friend/showActivity'));
}
op_include_box($id, get_slot('activities'), $params);
Beispiel #8
0
<?php

slot('header_text', 'Tags');
slot('header_link', 'tag/list');
?>

<?php 
slot('pointer');
?>
Users can use tags to organically attach keywords to entities, relationships, or images. 
If you're unfamiliar with tags, read more about them on <?php 
echo link_to('Wikipedia', 'http://en.wikipedia.org/wiki/Tag_(metadata)');
?>
.
<?php 
end_slot();
?>

<?php 
include_partial('global/pointer', array('text' => get_slot('pointer')));
?>

<?php 
include_partial('global/section', array('title' => 'Tags', 'pager' => $tag_pager));
?>

<?php 
include_partial('global/table', array('columns' => array('Name', 'Count', 'Latest Addition'), 'pager' => $tag_pager, 'row_partial' => 'tag/listrow'));
Beispiel #9
0
        }
        echo $form->renderFormTag(url_for('@confirmation_decision?id=' . $item['id'] . '&category=' . $category));
        echo $form->renderHiddenFields();
        ?>
<input type="submit" name="accept" value="<?php 
        echo __('Accept');
        ?>
" class="input_submit" />
<input type="submit" value="<?php 
        echo __('Reject');
        ?>
" class="input_submit" />
</form>
<?php 
        end_slot();
        $list_html[] = get_slot('_list_html');
    }
    op_include_list('confirmList', $list_html, array('border' => true));
    ?>

<?php 
} else {
    echo __('You don\'t have any pending requests', array('title' => __($config[$category])));
}
?>

<hr color="<?php 
echo $op_color['core_color_11'];
?>
">
Beispiel #10
0
<?php 
    echo !isset($keyword) ? __('There are no diaries.') : __('Your search "%1%" did not match any diaries.', array('%1%' => $keyword));
    ?>

<?php 
}
?>

<?php 
slot('diarySearchForm');
?>
<form action="<?php 
echo url_for('@diary_search');
?>
">
<input type="text" name="keyword" value="<?php 
if (isset($keyword)) {
    echo $keyword;
}
?>
">
<input type="submit" value="<?php 
echo __('Search');
?>
">
</form>
<?php 
end_slot();
$options = array('title' => __('Diary Search'));
op_include_box('diarySearchForm', get_slot('diarySearchForm'), $options);
<div id="module_wrapper">
    <div id="module">
        <div class="isprite module_header">
              <fb:profile-pic uid="<?php 
echo $friendID;
?>
"></fb:profile-pic>
              <h3><?php 
echo get_slot("fbUsername");
?>
</h3>
                <ul id="module_breadcrumb">
                    <li><a class="isprite prog1 one active" href="#"></a></li>
                    <li><a class="isprite prog2 two" href="#"></a></li>
                    <li><a class="isprite prog3 three" href="#"></a></li>
                    <li><a class="isprite prog4 four" href="#"></a></li>
                    <li><a class="isprite prog5 five" href="#"></a></li>
                </ul>
            </div><!-- END #module_header -->
    
      <form id="frmQuestions" name="frmQuestions" method="post" action="<?php 
echo url_for("@canvas_dorate");
?>
">
      
      <?php 
echo $form->renderHiddenFields();
?>
            
      <div id="slider-pane">
        <div id="slider">
Beispiel #12
0
use_helper('LsNumber');
?>

<span class="text_big">
<?php 
slot('share_text');
echo entity_link($relationship['Entity1']);
?>
 <?php 
echo $current === NULL ? "is/was" : ($current == '1' ? "is" : "was");
?>
 a member of <?php 
echo entity_link($relationship['Entity2']);
end_slot();
echo get_slot('share_text');
slot('share_text', RelationshipTable::formatSentenceForShare(get_slot('share_text')));
?>
</span>

<br />
<br />

<?php 
$data = array('Title' => $relationship['description1'], 'Start date' => Dateable::convertForDisplay($relationship['start_date']), 'End date' => Dateable::convertForDisplay($relationship['end_date']), 'Is current' => LsLogic::nullOrBoolean($relationship['is_current']), 'Dues' => readable_number($relationship['dues'], '$'), 'Notes' => $relationship['notes'] ? nl2br($relationship['notes']) : null);
?>

<?php 
include_partial('global/section', array('title' => 'Details'));
?>

<div class="padded">
Beispiel #13
0
    <meta name="description" content="<?php 
if (!include_slot('description', peanutConfig::get('meta_description'))) {
    get_slot('description');
}
?>
">
    <meta name="keywords" content="<?php 
if (!include_slot('keywords', peanutConfig::get('meta_keywords'))) {
    get_slot('keywords');
}
?>
">
    <meta name="robots" content="<?php 
if (!include_slot('robots', peanutConfig::get('meta_robots'))) {
    get_slot('robots');
}
?>
">
    
    <link rel="shortcut icon" href="/favicon.ico" />
    <link rel="apple-touch-icon" href="/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png" />
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png" />
    
    
    <!--[if lt IE 9]>  
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
   
    <?php 
">
<span id="count">
<span id="count_num">140</span>
<span id="count_plus" title="もう少し入力できます"></span>
</span>
<?php 
echo $form->renderHiddenFields();
echo $form['body'];
?>
<input type="submit" id="submit" value="送信" />
<?php 
echo $form['twitter'] . $form['twitter']->renderLabel();
?>
</form>

<ol id="timeline" class="activities">
<?php 
foreach ($activities as $activity) {
    include_partial('default/activityRecord', array('activity' => $activity));
}
?>
</ol>

</div>
<?php 
end_slot();
?>

<?php 
op_include_box('twitter_' . $gadget->id, get_slot('body'), array('title' => 'Twtter風ガジェット'));
Beispiel #15
0
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <link rel="shortcut icon" href="<?php 
echo image_path('/images/favicon.ico');
?>
"/>
    <?php 
include_http_metas();
?>
    <?php 
include_metas();
?>

    <title><?php 
echo get_slot('title', 'Uberлов — Узнай, где ловить рыбу!');
?>
</title>
    <!--    --><?php 
//include_stylesheets()
?>
    <?php 
include_combined_stylesheets();
?>
    <script type="text/javascript">
        baseUrl = "<?php 
echo substr(url_for('@homepage'), 0, strlen(url_for('@homepage')) - 1);
?>
";
        baseUrlFull = "<?php 
echo substr(url_for('@homepage', true), 0, strlen(url_for('@homepage', true)) - 1);
Beispiel #16
0
    ?>
</div>
<?php 
}
?>

<?php 
slot('form_global_error');
foreach ($forms as $form) {
    if ($form->hasGlobalErrors()) {
        echo $form->renderGlobalErrors();
    }
}
end_slot();
if (get_slot('form_global_error')) {
    op_include_parts('alertBox', 'FormGlobalError', array('body' => get_slot('form_global_error')));
}
?>

<?php 
$hasRequiredField = false;
?>

<?php 
slot('form_table');
?>
<table>
<?php 
include_customizes($id, 'firstRow');
echo $options->getRaw('firstRow');
?>
Beispiel #17
0
/**
 * Evaluates and echoes a slot.
 *
 * <b>Example:</b>
 * <code>
 *  include_slot('navigation');
 * </code>
 *
 * @param  string $name  slot name
 *
 * @see    has_slot, get_slot
 */
function include_slot($name)
{
    return ($v = get_slot($name)) ? print $v : false;
}
echo count($queue);
?>
</strong> 件</p>
</div>
<ol>
<?php 
foreach ($queue as $job) {
    ?>
<li>
<?php 
    echo $job->File->original_filename;
    ?>
 
(アップロード: <?php 
    echo op_format_date($job->File->created_at, 'f');
    ?>
)
</li>
<?php 
}
?>
</ol>
<?php 
end_slot();
?>

<?php 
op_include_box('import_queue', get_slot('queue'), array('title' => 'インポート待ちのファイル'));
?>

Beispiel #19
0
</div>
<div id="whoami">
<p><strong><?php 
echo __('You are login to %1% as:', array('%1%' => $op_config['sns_name']));
?>
</strong></p>
<p class="photo">
<?php 
$imgParam = array('size' => '76x76', 'alt' => $sf_user->getMember()->getName());
if ($sf_user->getMember()) {
    echo op_image_tag_sf_image($sf_user->getMember()->getImageFileName(), $imgParam);
} else {
    echo op_image_tag('no_image.gif', $imgParam);
}
?>
</p>
<p class="text"><?php 
echo $sf_user->getMember()->getNameAndCount();
?>
</p>
</div>
<?php 
end_slot();
?>

<?php 
$sf_data->getRaw('options')->body = get_slot('_head') . $options->getRaw('body');
?>

<?php 
include_partial('global/partsYesNo', array('options' => $options));
<li><input id="close_button" type="button" value="<?php 
    echo __('Close');
    ?>
" onclick="submit(false); false;" /></li>
</ul>
</div>
</div>
<?php 
} else {
    echo __('You don\'t have any %friend%.', array('%friend%' => $op_term['friend']->pluralize()));
}
end_slot();
?>

<?php 
op_include_box('inviteListBox', get_slot('invite_list_body'), array('title' => __('The invitation to this app is sent')));
javascript_tag();
?>
var member_ids = [];
var changePage = function (page) {
  new Ajax.Request("<?php 
echo url_for('@application_invite_list?id=' . $memberApplication->getId());
?>
?page=" + page, {
    method: 'get',
    onCreate: function() {
      $('member_list').innerHTML = '<tr><td colspan="2"><?php 
echo __('Loading');
?>
</td></tr>';
    },
Beispiel #21
0
<?php

#
# Layout wrapper for lists
#
if (get_slot('browsefirstitem') != true) {
    slot('browsefirstitem', true);
    $html = 'browsefirstitem';
} else {
    $html = '';
}
?>
<div class="browse <?php 
echo $html;
?>
" id="ctbrowse<?php 
echo strtolower($title);
?>
">
   <div class="label">
   <?php 
switch (strtolower($title)) {
    case 'artists':
        echo __('Browse Artists');
        break;
    case 'albums':
        echo __('Browse Albums');
        break;
}
?>
   </div>
Beispiel #22
0
        echo url_for($route);
        ?>
"><p><?php 
        echo $page['title'];
        ?>
</p></a>
      <?php 
    }
    ?>
    </div>
    <?php 
}
?>
    
    <?php 
$slot = get_slot('currentPage');
?>
    <?php 
if ($sf_user->getGuardUser()->isEnableStatics()) {
    $route_stats = 'profile_p_stats';
    ?>
      <div id=to>
        <?php 
    $stats_submenu = array('profile_p_stats_size', 'profile_p_stats_quality', 'profile_p_stats_visit', 'profile_p_stats_interpreter');
    ?>
        <?php 
    if ($slot === $route_stats || in_array($slot, $stats_submenu)) {
        ?>
          <p class="stat_act">Статистика</p>
        <?php 
    } else {
<?php

slot('firstRow');
?>
<tr><th><?php 
echo __('Photo');
?>
</th><td><?php 
echo op_link_to_member($member->getId(), '@obj_member_profile', array('link_target' => image_tag_sf_image($member->getImageFileName(), array('size' => '76x76'))));
?>
 </td></tr>
<tr><th><?php 
echo __('%nickname%', array('%nickname%' => $op_term['nickname']->titleize()));
?>
</th><td><?php 
echo op_link_to_member($member->getId());
?>
</td></tr>
<?php 
end_slot();
op_include_form('communityAdminRequest', $form, array('title' => __('Take over the administrator of "%1%"', array('%1%' => $community->getName())), 'firstRow' => get_slot('firstRow')));
<?php

slot('_register_success_box');
?>
<p><?php 
echo __('Sent you an invitation for %1%.', array('%1%' => $op_config['sns_name']));
?>
</p>
<p><?php 
echo __('Begin your registration from a URL in the mail.');
?>
</p>
<?php 
end_slot();
op_include_box('requestSuccess', get_slot('_register_success_box'), array('title' => __('Register')));
Beispiel #25
0
<div id=right>
  <a class=reg href="<?php 
echo url_for($registerRoute);
?>
">Регистрация &gt;&gt;</a>
  <div id="in">
  <?php 
include_component('auth', 'loginForm');
?>
  <?php 
if (get_slot('currentPage') != 'contact') {
    ?>
    <a href="<?php 
    echo url_for('contact');
    ?>
" class=contacts>&lt;&lt; Контакты</a>
  <?php 
}
?>
  </div>
</div>
Beispiel #26
0
/**
 * Evaluates and echoes a slot.
 *
 * <b>Example:</b>
 * <code>
 *  include_slot('navigation');
 * </code>
 *
 * @param  string $name     slot name
 * @param  string $default  default content to return if slot is unexistent
 *
 * @see    has_slot, get_slot
 */
function include_slot($name, $default = '')
{
  return ($v = get_slot($name, $default)) ? print $v : false;
}
Beispiel #27
0
echo javascript_tag('
function changeAdvancedFormByFormType()
{
  if (document.getElementById("advanced"))
  {
    Element.remove("advanced");
  }

  var form_type = $F("profile_form_type");
  if (form_type == "input" || form_type == "textarea")
  {
    Insertion.After("common", "' . str_replace(array('"', "\n"), array('\\"', ''), get_slot('advanced_settings_text')) . '");
  }
  else if (form_type == "date")
  {
    Insertion.After("common", "' . str_replace(array('"', "\n"), array('\\"', ''), get_slot('advanced_settings_date')) . '");
  }
}

function changeOriginalAndPreset()
{
  var originalPreset = document.getElementById("original_preset");
  var selectedOption = originalPreset.options[originalPreset.selectedIndex];

  var selectedName = selectedOption.getAttribute("name");

  if (selectedName == "presetting")
  {
    Element.show(document.getElementById("preset"));
    Element.hide(document.getElementById("original"));
  }
Beispiel #28
0
<?php

slot('block', '<p>' . __('No geocode found.') . '</p><div id="map"></div>');
include_partial('global/partsSimpleBox', array('id' => 'membersMap', 'title' => __('%member%\'s map', array('%member%' => $member->getName())), 'block' => get_slot('block'), 'options' => array('border' => false)));
    foreach ($memberApplications as $memberApplication) {
        op_include_application_information_box('item_' . $memberApplication->getId(), $memberApplication->getApplication(), $memberApplication->getId(), $isOwner);
    }
    ?>
</div>
<?php 
} else {
    slot('no_app_alert');
    echo __("You haven't the app.");
    if ($isOwner) {
        ?>
 <?php 
        echo __("The Apps can be added from %0%.", array('%0%' => link_to(__('App Gallery'), '@application_gallery')));
    }
    end_slot();
    op_include_box('NoApp', get_slot('no_app_alert'));
}
?>

<?php 
if ($isOwner) {
    echo sortable_element('order', array('url' => '@application_sort', 'tag' => 'div', 'only' => 'sortable', 'with' => 'Sortable.serialize("order")+"&' . urlencode($form->getCSRFFieldName()) . '=' . urlencode($form->getCSRFToken()) . '"'));
    ?>
<div class="moreInfo">
<ul class="moreInfo">
<li>
<?php 
    echo link_to(__('App Gallery'), '@application_gallery');
    if ($isOwner) {
        if ($isInstallApp) {
            ?>
  }
}

$t->diag('get_partial()');
sfConfig::set('mod_module_partial_view_class', 'MyTest');

$t->is(get_partial('module/dummy'), '==RENDERED==', 'get_partial() uses the class specified in partial_view_class for the given module');
$t->is(get_partial('MODULE/dummy'), '==RENDERED==', 'get_partial() accepts a case-insensitive module name');

// slots tests
sfContext::getInstance()->inject('response', 'sfWebResponse');

$t->diag('get_slot()');
$t->is(get_slot('foo', 'baz'), 'baz', 'get_slot() retrieves default slot content');
slot('foo', 'bar');
$t->is(get_slot('foo', 'baz'), 'bar', 'get_slot() retrieves slot content');

$t->diag('has_slot()');
$t->ok(has_slot('foo'), 'has_slot() checks if a slot exists');
$t->ok(!has_slot('doo'), 'has_slot() checks if a slot does not exist');

$t->diag('include_slot()');
ob_start();
include_slot('foo');
$t->is(ob_get_clean(), 'bar', 'include_slot() prints out the content of an existing slot');

ob_start();
include_slot('doo');
$t->is(ob_get_clean(), '', 'include_slot() does not print out the content of an unexisting slot');

ob_start();