* Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2010 - Alain Peyrat
* Copyright 2010-2011, Franck Villaume - Capgemini
- * Copyright 2010-2011, Alain Peyrat - Alcatel-Lucent
+ * Copyright 2010-2012, Alain Peyrat - Alcatel-Lucent
* Copyright © 2011 Thorsten Glaser – tarent GmbH
* Copyright 2011 - Marc-Etienne Vargenau, Alcatel-Lucent
+ * Copyright 2012 - Franck Villaume - TrivialDev
+ * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
// determine theme{dir,url}
$this->themedir = forge_get_config('themes_root') . '/' . forge_get_config('default_theme') . '/';
if (!file_exists ($this->themedir)) {
- html_error_top(_("Can't find theme directory!"));
+ html_error_top(_("Cannot find theme directory!"));
return;
}
$this->themeurl = util_make_url('themes/' . forge_get_config('default_theme') . '/');
if (file_exists($filename)) {
$js .= '?'.date ("U", filemtime($filename));
} else {
- $filename = str_replace('/scripts/', $GLOBALS['fusionforge_basedir'].'/lib/vendor/', $js);
+ $filename = str_replace('/scripts/', $GLOBALS['fusionforge_basedir'].'/vendor/', $js);
if (file_exists($filename)) {
$js .= '?'.date ("U", filemtime($filename));
}
if (file_exists($filename)) {
$css .= '?'.date ("U", filemtime($filename));
} else {
- $filename = str_replace('/scripts/', $GLOBALS['fusionforge_basedir'].'/lib/vendor/', $css);
+ $filename = str_replace('/scripts/', $GLOBALS['fusionforge_basedir'].'/vendor/', $css);
if (file_exists($filename)) {
$css .= '?'.date ("U", filemtime($filename));
}
}
}
+ /**
+ * getJavascripts - include javascript in html page. check to load only once the file
+ */
function getJavascripts() {
$code = '';
foreach ($this->javascripts as $js) {
$code .= "\t\t\t";
$code .= '<script type="text/javascript" src="'.$js.'"></script>'."\n";
}
+ $this->javascripts = array();
return $code;
}
+ /**
+ * getStylesheets - include stylesheet in html page. check to load only once the file
+ */
function getStylesheets() {
$code = '';
foreach ($this->stylesheets as $c) {
$code .= '<link rel="stylesheet" type="text/css" href="'.$c['css'].'"/>'."\n";
}
}
+ $this->stylesheets = array();
return $code;
}
function headerStart($params) {
$this->headerHTMLDeclaration();
?>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<?php if (isset($params['meta-description'])) { ?>
+ <meta name="description" content="<?php echo $params['meta-description'] ?>" />
+<?php } ?>
+<?php if (isset($params['meta-keywords'])) { ?>
+ <meta name="keywords" content="<?php echo $params['meta-keywords'] ?>" />
+<?php } ?>
<?php
plugin_hook('htmlhead', array());
$this->headerTitle($params);
$this->headerCSS();
$this->headerJS();
$this->headerForgepluckerMeta();
+ $this->headerLinkedDataAutodiscovery();
?>
- </head>
+ </head>
<?php
}
<script type="text/javascript" src="/scripts/codendi/codendi-1236793993.js"></script>
<script type="text/javascript" src="/scripts/codendi/validate.js"></script>
<script type="text/javascript" src="'. util_make_uri('/js/common.js') .'"></script>
- <script language="JavaScript" type="text/javascript">/* <![CDATA[ */';
+ <script type="text/javascript">/* <![CDATA[ */';
plugin_hook ("javascript",false);
echo '
/* ]]> */</script>';
}
}
+ /**
+ * headerLinkedDataAutodiscovery() - creates the link+alternate links to alternate
+ * representations for Linked Data autodiscovery
+ */
+ function headerLinkedDataAutodiscovery() {
+ // Only activated for /projects or /users for the moment
+ $script_name = getStringFromServer('SCRIPT_NAME');
+ $script_name = substr($script_name,0,strpos($script_name,'/',1));
+
+ if ($script_name == '/projects' || $script_name == '/users' || $script_name == '/softwaremap') {
+
+ $php_self = getStringFromServer('PHP_SELF');
+
+ // invoke the 'alt_representations' hook to add potential 'alternate' links (useful for Linked Data)
+ // cf. http://www.w3.org/TR/cooluris/#linking
+ $params = array('script_name' => $script_name,
+ 'php_self' => $php_self,
+ 'return' => array());
+
+ plugin_hook_by_reference('alt_representations', $params);
+
+ foreach($params['return'] as $link) {
+ echo " $link"."\n";
+ }
+ }
+ }
+
function headerForgepluckerMeta() {
/*-
* Forge-Identification Meta Header, Version 1.0
$this->quickNav();
?></td>
- <td> </td>
- </tr>
+ <td></td>
+ </tr>
- </table>
+</table>
- <table border="0" width="100%" cellspacing="0" cellpadding="0">
+<table class="fullwidth">
- <tr>
- <td> </td>
- <td colspan="3">
+ <tr>
+ <td></td>
+ <td colspan="3">
- <?php echo $this->outerTabs($params); ?>
+<?php $this->outerTabs($params); ?>
- </td>
- <td> </td>
- </tr>
+ </td>
+ <td></td>
+ </tr>
<tr>
<td align="left" class="toptab" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/topleft.png" height="9" width="9" alt="" /></td>
<td align="right" class="toptab" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/topright.png" height="9" width="9" alt="" /></td>
</tr>
- <tr>
+ <tr>
- <!-- Outer body row -->
+ <!-- Outer body row -->
<td class="toptab"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="10" height="1" alt="" /></td>
<td valign="top" width="99%" class="toptab" colspan="3">
<!-- Inner Tabs / Shell -->
- <table border="0" width="100%" cellspacing="0" cellpadding="0">
- <?php
+ <table class="fullwidth">
+<?php
- if (isset($params['group']) && $params['group']) {
+if (isset($params['group']) && $params['group']) {
- ?>
- <tr>
- <td> </td>
- <td>
- <?php
+ ?>
+ <tr>
+ <td></td>
+ <td>
+ <?php $this->projectTabs($params['toptab'],$params['group']); ?>
+ </td>
+ <td></td>
+ </tr>
+ <?php
- echo $this->projectTabs($params['toptab'],$params['group']);
+}
- ?>
- </td>
- <td> </td>
- </tr>
- <?php
- }
- ?>
+?>
<tr>
<td align="left" class="projecttab" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/topleft-inner.png" height="9" width="9" alt="" /></td>
<td class="projecttab" ><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="1" height="1" alt="" /></td>
<td class="projecttab" ><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="10" height="1" alt="" /></td>
<td valign="top" width="99%" class="projecttab">
- <?php
+ <?php
}
function footer($params) {
- ?>
+ ?>
<!-- end main body row -->
<?php echo $this->navigation->getPoweredBy(); ?>
</div>
- <?php echo $this->navigation->getShowSource(); ?>
+ <?php echo $this->navigation->getShowSource();
+
+ plugin_hook('webanalytics_url', array());
+
+ ?>
</body>
</html>
return '
<!-- Box Top Start -->
- <table cellspacing="0" cellpadding="0" width="100%" border="0" style="background:url('.$this->imgbaseurl.'vert-grad.png)">
+ <table class="fullwidth" style="background:url('.$this->imgroot.'vert-grad.png)">
<tr class="align-center">
<td valign="top" align="right" width="10" style="background:url('.$this->imgbaseurl.'box-topleft.png)"><img src="'.$this->imgbaseurl.'clear.png" width="10" height="20" alt="" /></td>
<td width="100%" style="background:url('.$this->imgbaseurl.'box-grad.png)"><span class="titlebar">'.$title.'</span></td>
}
function getMonitorPic($title = '', $alt = '') {
- return $this->getPicto('ic/mail16w.png', $title, $alt, '15', '15');
+ return $this->getPicto('ic/mail16w.png', $title, $alt);
}
function getReleaseNotesPic($title = '', $alt = '') {
- return $this->getPicto('ic/manual16c.png', $title, $alt, '15', '15');
+ return $this->getPicto('ic/manual16c.png', $title, $alt);
}
/* no picto for download */
function getDownloadPic($title = '', $alt = '') {
- return $this->getPicto('ic/save.png', $title, $alt, '15', '15');
+ return $this->getPicto('ic/save.png', $title, $alt);
}
function getHomePic($title = '', $alt = '') {
}
echo "</div>\n";
if ($widget->isAjax()) {
- echo '<script language="JavaScript" type="text/javascript">/* <![CDATA[ */'."
+ echo '<script type="text/javascript">/* <![CDATA[ */'."
document.observe('dom:loaded', function () {
- $('$element_id-ajax').update('<div style=\"text-align:center\">". $this->getPicto('ic/spinner.gif','spinner','spinner') ."</div>');
+ $('$element_id-ajax').update('<div style=\"text-align:center\">". $this->getPicto('ic/spinner.gif','spinner','spinner', 10, 10) ."</div>');
new Ajax.Updater('$element_id-ajax',
'". $widget->getAjaxUrl($owner_id, $owner_type) ."'
);
$subMenuAttr = array();
if (forge_get_config('use_project_tags')) {
- $subMenuTitle[] = _('Tag cloud');
+ $subMenuTitle[] = _('Tag Cloud');
$subMenuUrl[] = '/softwaremap/tag_cloud.php';
$subMenuAttr[] = array('title' => _('Browse per tags defined by the projects.'), 'class' => 'tabtitle-nw');
}
if (forge_get_config('use_trove')) {
$subMenuTitle[] = _('Project Tree');
$subMenuUrl[] = '/softwaremap/trove_list.php';
- $subMenuAttr[] = array('title' => _('Browse per category.'), 'class' => 'tabtitle');
+ $subMenuAttr[] = array('title' => _('Browse by Category'), 'class' => 'tabtitle');
}
if (forge_get_config('use_project_full_list')) {
// mode: php
// c-file-style: "bsd"
// End:
-
-?>