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
46 require_once '../env.inc.php';
47 require_once $gfcommon.'include/pre.php';
48 require_once $gfwww.'include/trove.php';
50 if (!forge_get_config('use_project_full_list')) {
54 $HTML->header(array('title'=>_('Project List'),'pagename'=>'softwaremap'));
55 $HTML->printSoftwareMapLinks();
57 $projects = get_public_active_projects_asc($TROVE_HARDQUERYLIMIT);
59 $querytotalcount = count($projects);
61 // #################################################################
62 // limit/offset display
64 $page = getIntFromRequest('page',1);
66 // store this as a var so it can be printed later as well
68 if ($querytotalcount == $TROVE_HARDQUERYLIMIT) {
69 $html_limit .= sprintf(_('More than <strong>%1$s</strong> projects in result set.'), $querytotalcount);
71 $html_limit .= sprintf(_('<strong>%1$s</strong> projects in result set.'), $querytotalcount);
75 // only display pages stuff if there is more to display
76 if ($querytotalcount > $TROVE_BROWSELIMIT) {
77 $html_limit .= html_trove_limit_navigation_box($_SERVER['PHP_SELF'], $querytotalcount, $TROVE_BROWSELIMIT, $page);
80 print $html_limit."<hr />\n";
82 // #################################################################
83 // print actual project listings
84 for ($i_proj=0;$i_proj<$querytotalcount;$i_proj++) {
85 $row_grp = $projects[$i_proj];
87 // check to see if row is in page range
88 if (($i_proj >= (($page-1)*$TROVE_BROWSELIMIT)) && ($i_proj < ($page*$TROVE_BROWSELIMIT))) {
96 // Embed RDFa description for /projects/PROJ_NAME
97 $proj_uri = util_make_url_g(strtolower($row_grp['unix_group_name']),$row_grp['group_id']);
98 print '<div typeof="doap:Project sioc:Space" about="'.$proj_uri.'">'."\n";
99 print '<span rel="planetforge:hosted_by" resource="'. util_make_url ('/') .'"></span>'."\n";
101 print '<table class="fullwidth">';
102 print '<tr class="top"><td colspan="2">';
103 print util_make_link_g(strtolower($row_grp['unix_group_name']),$row_grp['group_id'],'<strong>'
104 .'<span property="doap:name">'
105 .$row_grp['group_name']
109 if ($row_grp['short_description']) {
111 . '<span property="doap:short_desc">'
112 . $row_grp['short_description']
117 print '</td></tr><tr class="top"><td>';
118 // list all trove categories
119 if (forge_get_config('use_trove')) {
120 print trove_getcatlisting($row_grp['group_id'],0,1,1);
123 print '<td class="bottom align-right"><br />'._('Register Date:').' <strong>'.date(_('Y-m-d H:i'),$row_grp['register_time']).'</strong></td>';
126 print '</div>'; // /doap:Project
128 } // end if for row and range chacking
131 // print bottom navigation if there are more projects to display
132 if ($querytotalcount > $TROVE_BROWSELIMIT) {
136 $HTML->footer(array());