예제 #1
0
파일: footer.class.php 프로젝트: ruucla/mwf
 public function render()
 {
     $this->set_param('id', 'footer');
     if ($this->_copyright || $this->_full_title || $this->_help_title) {
         $p = HTML_Decorator::tag('p');
         if ($this->_copyright) {
             $p->add_inner($this->_copyright);
         }
         if ($this->_copyright && ($this->_full_title || $this->_help_title)) {
             $p->add_inner_tag('br');
         }
         if ($this->_full_title) {
             $p->add_inner_tag('a', $this->_full_title, array('href' => $this->_full_url));
         }
         if ($this->_full_title && $this->_help_title) {
             $p->add_inner(' | ');
         }
         if ($this->_help_title) {
             $p->add_inner_tag('a', $this->_help_title, array('href' => $this->_help_url));
         }
         $this->add_inner($p);
     }
     if ($this->_powered_by) {
         $this->add_inner_tag('p', 'Powered by the <br><a href="http://mwf.ucla.edu" target="_blank">UCLA Mobile Web Framework</a>', array('style' => 'font-weight:bold;font-style:italic'));
     }
     return parent::render();
 }
예제 #2
0
 public function &set_option($num, $name = false, $url = false, $params = array())
 {
     if ($this->_options_count < $num) {
         $num = $this->_options_count;
     }
     $this->_options[$num++] = HTML_Decorator::tag('a', $name ? $name : '', array_merge($params, array('href' => $url ? $url : '#')));
     $this->_options_count = $num;
     return $this;
 }
예제 #3
0
 public function render()
 {
     if (!$this->_image) {
         $this->_image = array('src' => HTTPS::is_https() ? HTTPS::convert_path(Config::get('global', 'header_home_button')) : Config::get('global', 'header_home_button'), 'alt' => Config::get('global', 'header_home_button_alt'));
     }
     $image = HTML_Decorator::tag('img', false, $this->_image)->render();
     $home_button = HTML_Decorator::tag('a', $image, array('href' => HTTPS::is_https() ? HTTPS::convert_path(Config::get('global', 'site_url')) : Config::get('global', 'site_url')))->render();
     if ($this->_title_path) {
         $title = $this->_title ? HTML_Decorator::tag('a', $this->_title, array('href' => $this->_title_path)) : false;
     } else {
         $title = $this->_title ? $this->_title : '';
     }
     $title_span = $title ? HTML_Decorator::tag('span', $title)->render() : '';
     $this->set_param('id', 'header');
     $this->add_inner_front($home_button . $title_span);
     return parent::render();
 }
예제 #4
0
 public function render()
 {
     $count = count($this->_list);
     if ($this->_title) {
         $this->_title->add_class('menu-first');
     } elseif ($count > 0) {
         $this->_list[0]->add_class('menu-first');
     }
     if ($count > 0) {
         $this->_list[$count - 1]->add_class('menu-last');
     } else {
         if ($this->_title) {
             $this->_title->add_class('menu-last');
         }
     }
     if ($this->_detailed) {
         $this->add_class('menu-detailed');
     } elseif ($this->_detailed === false) {
         $this->remove_class('menu-detailed');
     }
     if ($this->_padded) {
         $this->add_class('menu-padded');
     } elseif ($this->_padded === false) {
         $this->remove_class('menu-padded');
     }
     $list = '';
     if ($count > 0) {
         $inner = '';
         foreach ($this->_list as $list_item) {
             $inner .= $list_item->render();
         }
         $list = HTML_Decorator::tag('ol', $inner)->render();
     }
     $title = is_a($this->_title, 'Decorator') ? $this->_title->render() : ($this->_title ? $this->_title : '');
     $this->add_inner_front($title . $list);
     return parent::render();
 }
예제 #5
0
파일: license.php 프로젝트: ruucla/mwf
You may use this Software WITHOUT CHARGE for any purpose, subject to the
restrictions in this license. Some of those allowable uses or purposes which can
 be non-commercial are teaching, academic research, use in your own environment
(whether that is a commercial, academic or non-profit company or organization)
and personal experimentation. You may use the software if you are a commercial
entity.')->add_paragraph('
There are two things you cannot do with this Software: The first is you cannot
incorporate it into a commercial product ("Commercial Use"), the second is you
cannot distribute this software or any modifications ("Derivative Work") of this
software and beyond that, you must share your changes to the Mobile Framework
with UCLA. We want everyone to benefit from the use of this product, we want it
to stay free, and we want to avoid it forking (or splintering) into disconnected
versions. Therefore; you may not use or distribute this Software or any
Derivative Works in any form for any purpose. Examples of prohibited purposes
would be licensing, leasing, or selling the Software, or distributing the
Software for use with other commercial products, or incorporating the Software
into a commercial product.')->add_paragraph('
You may create Derivative Works of the software for your own use only. You may
modify this Software and contribute it back to UCLA, but you may not distribute
the modified Software; all distribution must happen via UCLA\'s Office of
Information Technology Academic Application Architecture Group.  You may not
grant rights to the Software or Derivative Works to this software under this
License. For example, you may not distribute modifications of the Software under
any terms, or sublicense this software to others.')->add_section(HTML_Decorator::tag('p', 'You agree:')->render() . $ol->render())->render();
echo Site_Decorator::content_full()->set_padded()->add_header('Disclaimer')->add_paragraph('UCLA reserves the right to modify this license at any
time. Therefore, although this represents a working copy of the UCLA Mobile
Web Framework license, the latest version exists on the MWF site.')->add_paragraph(HTML_Decorator::tag('a', 'http://mwf.ucla.edu/license', array('href' => 'http://mwf.ucla.edu/license')), array('style' => 'text-align:center;'))->render();
echo Site_Decorator::button_full()->set_padded()->add_option(Config::get('global', 'back_to_home_text'), Config::get('global', 'site_url'))->render();
echo Site_Decorator::default_footer()->render();
echo HTML_Decorator::body_end()->render();
echo HTML_Decorator::html_end()->render();
예제 #6
0
파일: credits.php 프로젝트: ruucla/mwf
 * @uses Button_Full_Site_Decorator
 * @uses Default_Footer_Site_Decorator
 * @uses Body_End_HTML_Decorator
 * @uses HTML_End_HTML_Decorator
 */
require_once dirname(dirname(__FILE__)) . '/assets/lib/decorator.class.php';
require_once dirname(dirname(__FILE__)) . '/assets/config.php';
$contributors = array('UC Los Angeles' => array('Eric Bollens', 'Ed Sakabu', 'Mike Takahashi', 'Joseph Madella', 'Nate Emerson', 'Zorayr Khalapyan'), 'UC Berkeley' => array('Sara Leavitt'), 'UC San Diego' => array('Mojgan Amini', 'Ike Lin'), 'UC San Francisco' => array('Richard Trott'));
echo HTML_Decorator::html_start()->render();
echo Site_Decorator::head()->set_title('MWF Credits')->render();
echo HTML_Decorator::body_start()->render();
echo Site_Decorator::header()->set_title('MWF Credits')->render();
echo Site_Decorator::content_full()->set_padded()->add_header('Project')->add_paragraph('<strong>Project Lead</strong><br>
                                Rose Rocchio (UCLA)<br>' . HTML_Decorator::tag('a', '*****@*****.**', array('href' => 'mailto:rrocchio@oit.ucla.edu')), array('style' => 'text-align:center;'))->add_paragraph('<strong>Technical Lead</strong><br>
                                Eric Bollens (UCLA)<br>' . HTML_Decorator::tag('a', '*****@*****.**', array('href' => 'mailto:ebollens@oit.ucla.edu')), array('style' => 'text-align:center;'))->add_paragraph('<strong>Systems Lead</strong><br>
                                Ed Sakabu (UCLA)<br>' . HTML_Decorator::tag('a', '*****@*****.**', array('href' => 'mailto:sakabu@ats.ucla.edu')), array('style' => 'text-align:center;'))->render();
$contributions = Site_Decorator::content_full()->set_padded()->add_header('Contributors')->add_paragraph('In addition to their own mobile applications, a number of participants have contributed code directly to the UCLA Mobile Web Framework.', array('style' => 'font-style:italic;'));
foreach ($contributors as $campus => $people) {
    $campus_contributors = '<strong>' . $campus . '</strong><br>';
    foreach ($people as $person) {
        $campus_contributors .= $person . '<br>';
    }
    $campus_contributors = substr($campus_contributors, 0, strlen($campus_contributors) - 4);
    $contributions->add_paragraph($campus_contributors, array('style' => 'text-align:center;'));
}
$contributions->add_paragraph('Beyond direct contributions, the input and suggestions of numerous others have made the UCLA Mobile Web Framework possible.', array('style' => 'font-style:italic;'));
echo $contributions->render();
echo Site_Decorator::button_full()->set_padded()->add_option(Config::get('global', 'back_to_home_text'), Config::get('global', 'site_url'))->render();
echo Site_Decorator::default_footer()->render();
echo HTML_Decorator::body_end()->render();
echo HTML_Decorator::html_end()->render();