// 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') . '/');
<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+meta links to alternate
+ * 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');
-
- if ($script_name == '/projects' || $script_name == '/users') {
+ $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
+ // 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());
$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 -->
$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')) {
$subMenuAttr[] = array('title' => _('Complete listing of available projects.'), 'class' => 'tabtitle');
}
+ // Allow plugins to add more softwaremap submenu entries
+ $hookParams = array();
+ $hookParams['TITLES'] = & $subMenuTitle;
+ $hookParams['URLS'] = & $subMenuUrl;
+ $hookParams['ATTRS'] = & $subMenuAttr;
+ plugin_hook("softwaremap_links", $hookParams);
+
echo $this->subMenu($subMenuTitle, $subMenuUrl, $subMenuAttr);
}