?>
<!-- membersify-subscription template -->
<div class="membersify-subscription membersify-subscription-<?php 
print $subscription->status;
?>
">

  <div class="plan-box">
    <img src="<?php 
echo $image_path;
?>
" alt="" class="plan-img" />
    <div class="plan-desc">
      <div class="plan-box-container">
        <a href="<?php 
echo url_for_tid($drupal_plan->tid);
?>
" class="pure-button button rounded white">View the plan</a>

        <div class='msembersify-subscription-actions'>
          <?php 
if ($cancel_url) {
    ?>
            <a class='membersify-subscription-cancel-link membersify_button pure-button button rounded transparent bottom info' href='<?php 
    print $cancel_url;
    ?>
'><?php 
    print t("Cancel plan");
    ?>
</a>
          <?php 
Exemplo n.º 2
0
function plan_url_for_recipe($recipe_tid)
{
    $query = db_select('field_data_field_recipes', 'c');
    $query->fields('c', array('entity_id'));
    $query->condition('c.field_recipes_tid', $recipe_tid);
    $days = $query->execute()->fetchAll();
    $day_tids = array_map(function ($day) {
        return $day->entity_id;
    }, $days);
    $plans = load_day_parent($day_tids)->fetchAll();
    $plan_tids = array_map(function ($plan) {
        return $plan->entity_id;
    }, $plans);
    $plan_tids = array_unique($plan_tids);
    if (count($plan_tids) == 1) {
        return url_for_tid($plan_tids[0]);
    }
    return NULL;
}
Exemplo n.º 3
0
<?php

$backUrl = url_for_tid($plan->tid);
$backText = strtoupper("Back to your calendar");
?>

<div class="subnav green sticky-sub">
  <div class="container">
    <?php 
sticker_plan($plan, $lang);
?>

    <ul class="pure-g">
        <?php 
if (!$is_monthly_plan) {
    ?>
            <li class="pure-u-1 pure-u-md-1-4">
                <a class="pure-button button rounded white-alt" href="<?php 
    echo $backUrl;
    ?>
#calendar">
                    &#9664; <?php 
    echo $backText;
    ?>
                </a>
            </li>
        <?php 
}
?>

        <li class="pure-u-1 <?php 
<?php

include 'includes/header.tpl.php';
?>

<?php 
$term = $variables['page']['content']['system_main']['term_heading']['term']['field_recipe_banner']['#object'];
$back_to_plan_url = plan_url_for_recipe($term->tid);
if (empty($back_to_plan_url)) {
    $last_visited_plan_tid = $_SESSION['last_visited_plan'];
    if (isset($last_visited_plan_tid)) {
        $back_to_plan_url = url_for_tid($last_visited_plan_tid);
    }
}
?>

<h2 class="print-title print-only"><?php 
echo $term->name;
?>
</h2>

<ul class="bxslider">
    <li class="recipe-slider section-arrow">
    <img src="<?php 
echo file_create_url($term->field_recipe_banner['und'][0]['uri']);
?>
" alt="" />
        <div class="">
          <h2 class=""><?php 
echo $term->name;
?>
Exemplo n.º 5
0
        }
        ?>

                <?php 
        if (!empty($img_url)) {
            ?>
<img src="<?php 
            echo $img_url;
            ?>
" alt="" /> <?php 
        }
        ?>
              </p>
              <p>
                <?php 
        $url = url_for_tid($value['taxonomy_term']->tid);
        ?>
                <a href="<?php 
        echo $url;
        ?>
" class="pure-button button rounded green">VIEW RECIPE</a>
              </p>
            </div>
          <?php 
    }
    ?>
        </div>
      </div>
    </div>
  </div>
<?php 
Exemplo n.º 6
0
<div id="calendar" class="section with-tail with-padding">
  <div class="container">
    <h2 class="section-title">Your calendar</h2>
    <div class="pure-g calendar-list">

      <?php 
for ($i = 0; $i < $size; $i++) {
    $id = $day_ids[$i];
    $day = $main[$i]['entity']['field_collection_item'][$id]['field_day']['#object']->field_day[$lang][0]['taxonomy_term'];
    $is_complete = $completed_days[$day->tid];
    $title = $day->field_day_title[$lang][0]['safe_value'];
    $url = url_for_tid($day->tid);
    ?>
        <div class="pure-u-1 pure-u-md-1-4">
          <div class="calendar-item <?php 
    if ($is_complete) {
        echo 'complete';
    }
    ?>
" data-day="<?php 
    echo $day->tid;
    ?>
" data-plan="<?php 
    echo $plan->tid;
    ?>
">
            <div class="box green-overlay">
              <div class="box-center">
                <button class="pure-button button rounded dark-grey mark-done">MARK AS DONE</button>
                <br>
                <a href="<?php