3 * Copyright (C) 2008-2009 Alcatel-Lucent
4 * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
5 * Copyright 2012, Franck Villaume - TrivialDev
7 * This file is part of FusionForge. FusionForge is free software;
8 * you can redistribute it and/or modify it under the terms of the
9 * GNU General Public License as published by the Free Software
10 * Foundation; either version 2 of the Licence, or (at your option)
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * Standard Alcatel-Lucent disclaimer for contributing to open source
26 * "The Full List ("Contribution") has not been tested and/or
27 * validated for release as or in products, combinations with products or
28 * other commercial use. Any use of the Contribution is entirely made at
29 * the user's own responsibility and the user can not rely on any features,
30 * functionalities or performances Alcatel-Lucent has attributed to the
33 * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
34 * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
35 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
36 * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
37 * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
38 * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
39 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
40 * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
41 * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
45 require_once '../env.inc.php';
46 require_once $gfcommon.'include/pre.php';
47 require_once $gfwww.'include/trove.php';
49 if (!forge_get_config('use_project_full_list')) {
53 $HTML->header(array('title'=>_('Project List'),'pagename'=>'softwaremap'));
54 $HTML->printSoftwareMapLinks();
56 $projects = get_public_active_projects_asc($TROVE_HARDQUERYLIMIT);
58 $querytotalcount = count($projects);
60 // #################################################################
61 // limit/offset display
63 $page = getIntFromRequest('page',1);
65 // store this as a var so it can be printed later as well
67 if ($querytotalcount == $TROVE_HARDQUERYLIMIT) {
68 $html_limit .= sprintf(_('More than <strong>%1$s</strong> projects in result set.'), $querytotalcount);
70 $html_limit .= sprintf(_('<strong>%1$s</strong> projects in result set.'), $querytotalcount);
74 // only display pages stuff if there is more to display
75 if ($querytotalcount > $TROVE_BROWSELIMIT) {
76 $html_limit .= html_trove_limit_navigation_box($_SERVER['PHP_SELF'], $querytotalcount, $TROVE_BROWSELIMIT, $page);
79 print $html_limit."<hr />\n";
81 // #################################################################
82 // print actual project listings
83 for ($i_proj=0;$i_proj<$querytotalcount;$i_proj++) {
84 $row_grp = $projects[$i_proj];
86 // check to see if row is in page range
87 if (($i_proj >= (($page-1)*$TROVE_BROWSELIMIT)) && ($i_proj < ($page*$TROVE_BROWSELIMIT))) {
95 // Embed RDFa description for /projects/PROJ_NAME
96 $proj_uri = util_make_url_g(strtolower($row_grp['unix_group_name']),$row_grp['group_id']);
97 print '<div typeof="doap:Project sioc:Space" about="'.$proj_uri.'">'."\n";
98 print '<span rel="planetforge:hosted_by" resource="'. util_make_url ('/') .'"></span>'."\n";
100 print '<table class="fullwidth">';
101 print '<tr class="top"><td colspan="2">';
102 print util_make_link_g(strtolower($row_grp['unix_group_name']),$row_grp['group_id'],'<strong>'
103 .'<span property="doap:name">'
104 .$row_grp['group_name']
108 if ($row_grp['short_description']) {
110 . '<span property="doap:short_desc">'
111 . $row_grp['short_description']
116 print '</td></tr><tr class="top"><td>';
117 // list all trove categories
118 if (forge_get_config('use_trove')) {
119 print trove_getcatlisting($row_grp['group_id'],0,1,1);
122 print '<td class="bottom align-right"><br />'._('Register Date:').' <strong>'.date(_('Y-m-d H:i'),$row_grp['register_time']).'</strong></td>';
125 print '</div>'; // /doap:Project
127 } // end if for row and range chacking
130 // print bottom navigation if there are more projects to display
131 if ($querytotalcount > $TROVE_BROWSELIMIT) {
135 $HTML->footer(array());