/[drupal]/contributions/modules/biblio/biblio.pages.inc
ViewVC logotype

Diff of /contributions/modules/biblio/biblio.pages.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.79, Wed Apr 29 20:32:55 2009 UTC revision 1.1.2.80, Fri May 1 02:08:02 2009 UTC
# Line 1099  function biblio_author_page($filter = NU Line 1099  function biblio_author_page($filter = NU
1099      while ($author = db_fetch_array($db_result)){      while ($author = db_fetch_array($db_result)){
1100        $authors[] = $author;        $authors[] = $author;
1101      }      }
1102      $rows[] = array(array('data' => theme(biblio_alpha_line, 'authors', $filter, $path), 'colspan' => 3));      $rows[] = array(array('data' => theme(biblio_alpha_line, 'authors', $filter), 'colspan' => 3));
1103      for ($i=0; $i < count($authors); $i+=3) {      for ($i=0; $i < count($authors); $i+=3) {
1104        $rows[] = array( array('data' => _biblio_format_author($authors[$i], $path) ),        $rows[] = array( array('data' => _biblio_format_author($authors[$i]) ),
1105                         array('data' => isset($authors[$i+1])?_biblio_format_author($authors[$i+1], $path):'' ),                         array('data' => isset($authors[$i+1])?_biblio_format_author($authors[$i+1]):'' ),
1106                         array('data' => isset($authors[$i+2])?_biblio_format_author($authors[$i+2], $path):'' ));                         array('data' => isset($authors[$i+2])?_biblio_format_author($authors[$i+2]):'' ));
1107      }      }
1108    //$header = array(array('data' => t('There are a total of @count authors !header_ext in the database',array('@count' => count($authors), '!header_ext' => $header_ext)), 'align' =>'center', 'colspan' => 3));    //$header = array(array('data' => t('There are a total of @count authors !header_ext in the database',array('@count' => count($authors), '!header_ext' => $header_ext)), 'align' =>'center', 'colspan' => 3));
1109    $output .= theme('table', $header, $rows);    $output .= theme('table', $header, $rows);
# Line 1112  function biblio_author_page($filter = NU Line 1112  function biblio_author_page($filter = NU
1112  /*  /*
1113   * Helper function to format the authors and add edit links if required   * Helper function to format the authors and add edit links if required
1114   */   */
1115  function _biblio_format_author($author, $path) {  function _biblio_format_author($author) {
1116    $style_name = biblio_get_style();    $style_name = biblio_get_style();
1117    $style_function = "biblio_style_$style_name"."_author_options";    $style_function = "biblio_style_$style_name"."_author_options";
1118    module_load_include('inc','biblio',"biblio_style_$style_name");    module_load_include('inc','biblio',"biblio_style_$style_name");
1119    $author_options = $style_function();    $author_options = $style_function();
1120    $format = theme('biblio_format_authors', array($author), $author_options, $inline);    $format = theme('biblio_format_authors', array($author), $author_options, $inline);
1121    $format .= ' ('. $author['cnt'] . ') '. ((biblio_access('edit_author'))?_biblio_author_edit_links($author, $path):'');    $format .= ' ('. $author['cnt'] . ') '. ((biblio_access('edit_author'))?_biblio_author_edit_links($author):'');
1122    return $format;    return $format;
1123  }  }
1124    
1125  function _biblio_author_edit_links($author, $path) {  function _biblio_author_edit_links($author) {
1126      $base = variable_get('biblio_base', 'biblio');      $path =  (ord(substr($_GET['q'],-1)) > 97) ? $_GET['q'] . "/" : substr($_GET['q'], 0, -1);
1127      return l(' ['.t('edit').']', "$path" . $author['cid'] ."/edit/" );      return l(' ['.t('edit').']', $path . $author['cid'] ."/edit/" );
1128  }  }
1129    
1130  function biblio_keyword_page($filter = NULL) {  function biblio_keyword_page($filter = NULL) {
# Line 1157  function _biblio_format_keyword($keyword Line 1157  function _biblio_format_keyword($keyword
1157    $base      = variable_get('biblio_base', 'biblio');    $base      = variable_get('biblio_base', 'biblio');
1158    $format    = l(trim($keyword->word), "$base/keyword/$keyword->kid" );    $format    = l(trim($keyword->word), "$base/keyword/$keyword->kid" );
1159    $format   .= ' ('. $keyword->cnt . ') ' ;    $format   .= ' ('. $keyword->cnt . ') ' ;
1160    $edit_link = ' ['.l(t('edit'), "$base/keyword/$keyword->kid/edit/" ).'] ';    $path =  (ord(substr($_GET['q'],-1)) > 97) ? $_GET['q'] . "/" : substr($_GET['q'], 0, -1);
1161      $edit_link = ' ['.l(t('edit'), $path . $keyword->kid . "/edit/" ).'] ';
1162    $format   .= (user_access('administer biblio')) ? $edit_link: '';    $format   .= (user_access('administer biblio')) ? $edit_link: '';
1163    
1164    return $format;    return $format;

Legend:
Removed from v.1.1.2.79  
changed lines
  Added in v.1.1.2.80

  ViewVC Help
Powered by ViewVC 1.1.2