[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> project_page.php (source)

   1  <?php
   2  # Mantis - a php based bugtracking system
   3  
   4  # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
   5  # Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
   6  
   7  # Mantis is free software: you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation, either version 2 of the License, or
  10  # (at your option) any later version.
  11  #
  12  # Mantis is distributed in the hope that it will be useful,
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  # GNU General Public License for more details.
  16  #
  17  # You should have received a copy of the GNU General Public License
  18  # along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
  19  
  20      # --------------------------------------------------------
  21      # $Id: project_page.php,v 1.3.2.1 2007-10-13 22:34:25 giallu Exp $
  22      # --------------------------------------------------------
  23  
  24      require_once ( 'core.php' );
  25  
  26      $t_core_path = config_get( 'core_path' );
  27  
  28      require_once( $t_core_path . 'project_api.php' );
  29      require_once( $t_core_path . 'last_visited_api.php' );
  30      require_once( $t_core_path . 'print_api.php' );
  31  
  32      $f_project_id    = gpc_get_int( 'project_id' );
  33  
  34      $t_view_issues_url = "set_project.php?project_id=$f_project_id&ref=view_all_bug_page.php";
  35  
  36      if ( $f_project_id == ALL_PROJECTS ) {
  37          $t_redirect_url = $t_view_issues_url;
  38          print_header_redirect( $t_redirect_url );
  39          exit;
  40      }
  41  
  42      # Override the current page to make sure we get the appropriate project-specific configuration
  43      $g_project_override = $f_project_id;
  44  
  45      $t_changelog_url = "changelog_page.php?project_id=$f_project_id";
  46      $t_roadmap_url = "roadmap_page.php?project_id=$f_project_id";
  47  
  48      html_page_top1( project_get_field( $f_project_id, 'name' ) );
  49      html_page_top2();
  50  
  51      print_recently_visited();
  52  
  53      echo '<h1>', string_display( project_get_field( $f_project_id, 'name' ) ), '</h1>';
  54  
  55      echo '<p>';
  56      
  57      # View Issues
  58      echo '<a href="', $t_view_issues_url, '">', lang_get( 'view_bugs_link' ), '</a>';
  59      
  60      # Changelog
  61      echo ' | <a href="', $t_changelog_url, '">', lang_get( 'changelog_link' ), '</a>';
  62      
  63      # Roadmap
  64      echo ' | <a href="', $t_roadmap_url, '">', lang_get( 'roadmap_link' ), '</a>';
  65      
  66      # Documentation
  67      if ( config_get( 'enable_project_documentation' ) == ON ) {
  68          echo ' | <a href="proj_doc_page.php?project_id=', $f_project_id, '">', lang_get( 'docs_link' ), '</a>';
  69      }
  70  
  71      # Wiki
  72      if ( config_get( 'wiki_enable' ) == ON ) {
  73          echo ' | <a href="wiki.php?type=project&amp;id=', $f_project_id, '">', lang_get( 'wiki' ), '</a>';
  74      }
  75  
  76      # Summary Page for Project
  77      if ( access_has_project_level( config_get( 'view_summary_threshold' ), $f_project_id ) ) {
  78          echo ' | <a href="summary_page.php?project_id=', $f_project_id, '">', lang_get( 'summary_link' ), '</a>';
  79      }
  80  
  81      # Manage Project Page
  82      if ( access_has_project_level( config_get( 'manage_project_threshold' ), $f_project_id ) ) {
  83          echo ' | <a href="manage_proj_edit_page.php?project_id=', $f_project_id, '">', lang_get( 'manage_link' ), '</a>';
  84      }
  85  
  86      echo '</p>';
  87      
  88      # @@@ Add status, view state, versions, sub-projects, parent projects, and news.
  89      # @@@ Schema change: add home page, license,
  90  
  91      $t_description = project_get_field( $f_project_id, 'description' );
  92  
  93      if ( !is_blank( $t_description ) ) {
  94          echo '<h2>', lang_get( 'description' ), '</h2>';
  95          echo '<p>', string_display( $t_description ), '</p>';
  96      }
  97  
  98      $t_access_level_for_dev_team = config_get( 'development_team_threshold' );
  99  
 100      $t_users = project_get_all_user_rows( $f_project_id, $t_access_level_for_dev_team );
 101      $t_show_real_names = config_get( 'show_realname' ) == ON;
 102  
 103      if ( count( $t_users ) > 0 ) {
 104          echo '<h2>', lang_get( 'development_team' ), '</h2>';
 105  
 106          # @@@ sort users in DESC order by access level, then ASC by username/realname.
 107          foreach ( $t_users as $t_user_data ) {
 108              $t_user_id = $t_user_data['id'];
 109              
 110              if ( $t_show_real_names && !is_blank( $t_user_data['realname'] ) ) {
 111                  $t_user_name = $t_user_data['realname'];
 112              } else {
 113                  $t_user_name = $t_user_data['username'];
 114              }
 115  
 116               echo $t_user_name, ' (', get_enum_element( 'access_levels', $t_user_data['access_level'] ), ')<br />';
 117           }
 118       }
 119  
 120      html_page_bottom1( __FILE__ );
 121  ?>


Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics