예제 #1
0
파일: literature.php 프로젝트: ratbird/hope
 /**
  * Displays print view of literature list
  */
 public function print_view_action()
 {
     PageLayout::removeStylesheet('style.css');
     PageLayout::addStylesheet('print.css');
     // use special stylesheet for printing
     $_range_id = Request::option('_range_id');
     if ($_range_id != $GLOBALS['user']->id && !$GLOBALS['perm']->have_studip_perm('user', $_range_id)) {
         throw new AccessDeniedException();
     }
     $_the_tree = TreeAbstract::GetInstance("StudipLitList", $_range_id);
     $this->title = sprintf(_("Literatur %s"), $_the_tree->root_name);
     $this->list = StudipLitList::GetFormattedListsByRange($_range_id, false, false);
 }
예제 #2
0
?>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<?
if ($quick_view_mode === 'no_nav' || Request::get('print_view')) {
    PageLayout::disableHeader();
}
if (Request::get('print_view')){
    PageLayout::removeStylesheet('style.css');
    PageLayout::addStylesheet('print.css'); // use special stylesheet for printing
}

Sidebar::get()->setImage('sidebar/resources-sidebar.png');

// Add clipboard if neccessary (another hack meets the core)
if (is_object($clipObj))  {
    $form   = $clipObj->getFormObject();
    $action = $quick_view
            ? URLHelper::getLink('', compact('quick_view', 'quick_view_mode'))
            : URLHelper::getLink('', compact('view', 'quick_view_mode'));

    ob_start();
    echo $form->getFormStart($action);
    $clipObj->showClip(false, '100%');
예제 #3
0
파일: wiki.inc.php 프로젝트: ratbird/hope
/**
* Display wiki page for print.
*
* @param    string  keyword WikiPage name
* @param    string  version WikiPage version
*
**/
function printWikiPage($keyword, $version) {
    global $SessSemName;
    $wikiData=getWikiPage($keyword, $version);
    PageLayout::removeStylesheet('style.css');
    PageLayout::addStylesheet('print.css'); // use special stylesheet for printing
    include ('lib/include/html_head.inc.php'); // Output of html head
    echo "<p><em>" . htmlReady($SessSemName['header_line']) ."</em></p>";
    echo "<h1>" . htmlReady($keyword) ."</h1>";
    echo "<p><em>";
    echo sprintf(_("Version %s, letzte Änderung %s von %s."), $wikiData['version'],
    date("d.m.Y, H:i", $wikiData['chdate']), get_fullname($wikiData['user_id'], 'full', 1));
    echo "</em></p>";
    echo "<hr>";
    echo wikiReady($wikiData['body'], TRUE, FALSE, "none");
    echo "<hr><p><font size=-1>created by Stud.IP Wiki-Module ";
    echo date("d.m.Y, H:i", time());
    echo " </font></p>";
    include ('lib/include/html_end.inc.php');
}