home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (date-views-filter-form.tpl.php)

This example Drupal source code file (date-views-filter-form.tpl.php) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

class, date-clear, date-views-filter-wrapper, description, div, empty, endif, form-item, maxadjustment, maxdate, minadjustment, mindate, php

The date-views-filter-form.tpl.php Drupal example source code

<?php
// $Id: date-views-filter-form.tpl.php,v 1.1.2.4 2008/12/08 12:15:57 karens Exp $
/**
 * @file
 * Template to display the Views date filter form.
 *
 * Values available vary depending on the operator. The availability
 * of date vs adjustment depending on the filter settings. It can
 * be date-only, date and adjustment, or adjustment only.
 * 
 * If the operator is anything but 'Is between' or 'Is not between',
 * a single date and adjustment field is available.
 * 
 * $date
 * $adjustment
 * 
 * If the operator is 'Is between' or 'Is not between',
 * two date and adjustment fields are available.
 * 
 * $mindate
 * $minadjustment
 * $maxdate
 * $maxadjustment
 * 
 * A description field is also available.
 * 
 * $description
 */
?>
<div class="date-views-filter-wrapper">
<div class="container-inline-date date-clear">
<?php if (!empty($date) || !empty($adjustment)) : ?> 
  <div class="date-clear"> 
    <div class="date-views-filter"><?php print $date; ?></div>
    <div class="date-views-filter"><?php print $adjustment ?></div>
  </div>
<?php endif; ?>
<?php if (!empty($mindate) || !empty($minadjustment)) : ?>  
  <div class="date-clear">
    <div class="date-views-filter"><?php print $mindate; ?></div>
    <div class="date-views-filter"><?php print $minadjustment; ?></div>
  </div>
<?php endif; ?>
<?php if (!empty($maxdate) || !empty($maxadjustment)) : ?>  
  <div class="date-clear">
    <div class="date-views-filter"><?php print $maxdate; ?></div>
    <div class="date-views-filter"><?php print $maxadjustment; ?></div>
  </div>
<?php endif; ?>
</div>
<div class="date-clear form-item"><div class="description">
  <?php print $description; ?>
</div>
</div>
</div>  

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal date-views-filter-form.tpl.php source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.