예제 #1
0
파일: RmediaUrl.php 프로젝트: burbuja/pluf
 function start($var, $file = '')
 {
     $this->context->set($var, Pluf_Template_Tag_MediaUrl::url($file));
 }
예제 #2
0
파일: Issue.php 프로젝트: Br3nda/indefero
/**
 * Display the summary of an issue, then on a new line, display the
 * list of labels with a link to a view "by label only".
 *
 * The summary of the issue is linking to the issue.
 */
function IDF_Views_Issue_SummaryAndLabels($field, $issue, $extra = '')
{
    $edit = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view', array($issue->shortname, $issue->id));
    $tags = array();
    foreach ($issue->get_tags_list() as $tag) {
        $url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::listLabel', array($issue->shortname, $tag->id, 'open'));
        $tags[] = sprintf('<a class="label" href="%s">%s</a>', $url, Pluf_esc((string) $tag));
    }
    $s = '';
    if (!$issue->current_user->isAnonymous() and Pluf_Model_InArray($issue->current_user, $issue->get_interested_list())) {
        $s = '<img style="vertical-align: text-bottom;" src="' . Pluf_Template_Tag_MediaUrl::url('/idf/img/star.png') . '" alt="' . __('On your watch list.') . '" /> ';
    }
    $out = '';
    if (count($tags)) {
        $out = '<br /><span class="note">' . implode(', ', $tags) . '</span>';
    }
    return $s . sprintf('<a href="%s">%s</a>', $edit, Pluf_esc($issue->summary)) . $out;
}
예제 #3
0
파일: MediaUrl.php 프로젝트: burbuja/pluf
 function start($file = '')
 {
     echo Pluf_Template_Tag_MediaUrl::url($file);
 }