2014-06-04 13:33:57 +02:00
|
|
|
<?php
|
2014-06-06 12:02:56 +02:00
|
|
|
class MsHtml extends TbHtml {
|
2014-06-04 18:06:38 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param DateTime $date
|
|
|
|
* @param string $caption
|
|
|
|
* @param string $link
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function collapsedHeader($date, $caption, $link = '')
|
2014-06-04 13:33:57 +02:00
|
|
|
{
|
2014-06-04 18:06:38 +02:00
|
|
|
if (empty($link)) {
|
|
|
|
return
|
|
|
|
'<div class="row collHeader">
|
|
|
|
<div class="collHeaderSpan-front">' . $date->format('d.m.Y') . '</div>
|
|
|
|
<div class="collHeaderSpan">' . $caption . '</div>
|
2014-06-05 10:11:44 +02:00
|
|
|
<div class="collHeaderSpan-drop"><i class="icon-tag" ></i></div>
|
2014-06-04 18:06:38 +02:00
|
|
|
</div>
|
|
|
|
';
|
|
|
|
} else {
|
|
|
|
return
|
|
|
|
'<div class="row collHeader collHeaderLinkParent">
|
|
|
|
<div class="collHeaderSpan-front">' . $date->format('d.m.Y') . '</div>
|
|
|
|
<div class="collHeaderSpan">' . $caption . '</div>
|
2014-06-05 10:11:44 +02:00
|
|
|
<div class="collHeaderSpan-drop"><i class="icon-tag" ></i></div>
|
2014-06-04 18:06:38 +02:00
|
|
|
<a class="collHeaderLink" href="' . $link . '"> </a>
|
|
|
|
</div>
|
|
|
|
';
|
|
|
|
}
|
2014-06-06 12:02:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param DateTime $date
|
|
|
|
* @param string $caption
|
|
|
|
* @param $parent
|
|
|
|
* @param $target
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function interactiveCollapsedHeader($date, $caption, $parent, $target)
|
|
|
|
{
|
|
|
|
return
|
|
|
|
'<div class="row collHeader collHeaderLinkParent">
|
|
|
|
<div class="collHeaderSpan-front">' . $date->format('d.m.Y') . '</div>
|
|
|
|
<div class="collHeaderSpan">' . $caption . '</div>
|
|
|
|
<div class="collHeaderSpan-drop"><i class="icon-tag" ></i></div>
|
|
|
|
<a class="collHeaderLink" data-toggle="collapse" ' . (empty($parent) ? ('') : ('data-parent="' . $parent . '"')) . ' href="' . $target . '"> </a>
|
|
|
|
</div>
|
|
|
|
';
|
|
|
|
}
|
2014-06-04 18:06:38 +02:00
|
|
|
|
2014-06-06 12:02:56 +02:00
|
|
|
/**
|
|
|
|
* Generates a pager header.
|
|
|
|
* @param string $heading the heading text.
|
|
|
|
* @param string $subtext the subtext.
|
|
|
|
* @param array $htmlOptions additional HTML attributes.
|
|
|
|
* @return string the generated pager header.
|
|
|
|
*/
|
|
|
|
public static function pageHeader($heading, $subtext, $htmlOptions = array())
|
|
|
|
{
|
|
|
|
self::addCssClass('page-header', $htmlOptions);
|
|
|
|
$headerOptions = TbArray::popValue('headerOptions', $htmlOptions, array());
|
|
|
|
$subtextOptions = TbArray::popValue('subtextOptions', $htmlOptions, array());
|
|
|
|
$output = self::openTag('div', $htmlOptions);
|
|
|
|
$output .= self::openTag('h1', $headerOptions);
|
|
|
|
$output .= parent::encode($heading) . ' ' . self::tag('small', $subtextOptions, $subtext);
|
|
|
|
$output .= '</h1>';
|
|
|
|
$output .= '<hr>';
|
|
|
|
$output .= '</div>';
|
|
|
|
return $output;
|
2014-06-04 13:33:57 +02:00
|
|
|
}
|
|
|
|
}
|