Project

General

Profile

« Previous | Next » 

Revision 27b71dd0

Added by Francisco Revilla over 13 years ago

adding palmae synonymy highlites, palame synonym of at the heading and moudle help system

View differences:

.gitattributes
70 70
modules/cdm_dataportal/ext_links/ext_links.info -text
71 71
modules/cdm_dataportal/ext_links/ext_links.js -text
72 72
modules/cdm_dataportal/ext_links/ext_links.module -text
73
modules/cdm_dataportal/help.php -text
74
modules/cdm_dataportal/help/overview.apt -text
75
modules/cdm_dataportal/help/overview.html -text
76
modules/cdm_dataportal/help/settings_cache.html -text
77
modules/cdm_dataportal/help/settings_general.html -text
78
modules/cdm_dataportal/help/settings_geo.html -text
79
modules/cdm_dataportal/help/settings_layout.html -text
73 80
modules/cdm_dataportal/images/Protologue-media-BHL.png -text
74 81
modules/cdm_dataportal/images/Protologue-media.png -text
75 82
modules/cdm_dataportal/images/btn_collapse.gif -text
modules/cdm_dataportal/cdm_dataportal.module
15 15

  
16 16
require_once('node_types.php');
17 17
require_once('settings.php');
18
require_once('help.php');
18 19

  
19 20
require_once('theme/cdm_dataportal.common.theme');
20 21
require_once('theme/cdm_dataportal.descriptions.theme');
......
30 31
require_once('classes/footnotekey.php');
31 32
require_once('classes/renderhints.php');
32 33

  
33

  
34

  
35 34
function _add_js_progressbar(){
36 35
	drupal_add_js(drupal_get_path('module', 'cdm_dataportal').'/js/jquery.progressbar/js/jquery.progressbar.js');
37 36
}
......
125 124

  
126 125
/* ====================== hook implementations ====================== */
127 126

  
128
/**
129
 * Implementation of hook_help()
130
 *
131
 * Display help and module information
132
 * @param section which section of the site we're displaying help
133
 * @return help text for section
134
 */
135
function cdm_dataportal_help($section='') {
136

  
137
	$out = '';
138
	switch ($section) {
139
		case "admin/modules#description":
140
			$out = t("The dataportal publishes CDM data hosted in a CommunityStore on the web.");
141
			break;
142
	}
143
	return $out;
144
}
145

  
146 127

  
147 128
/**
148 129
 * Implementation of hook_perm()
......
166 147
	$items = array();
167 148

  
168 149
	cdm_dataportal_menu_admin($may_cache, $items);
150
	cdm_dataportal_menu_help($may_cache, $items);
169 151

  
170 152
	if ($may_cache) {
171 153

  
......
291 273
      'callback' => 'cdm_dataportal_taxon_page_view',
292 274
      'access' => true,
293 275
      'type' => MENU_LOCAL_TASK,
294
      'weight' => 3,
295
      'callback arguments' => array(arg(2), "synonymy")
276
      'weight' => 4,
277
      'callback arguments' => array(arg(2), "synonymy", arg(4))
296 278
			// expected callback arguments: name_uuid
297 279
			);
298

  
299 280
			$items[] = array(
300 281
      'path' => 'cdm_dataportal/taxon/'.arg(2).'/images',
301 282
      'title' => theme('cdm_taxonpage_tab', 'Images'),
302 283
      'callback' => 'cdm_dataportal_taxon_page_view',
303 284
      'access' => true,
304 285
      'type' => MENU_LOCAL_TASK,
305
      'weight' => 4,
286
      'weight' => 5,
306 287
      'callback arguments' => array(arg(2), "images")
307 288
			// expected callback arguments: name_uuid
308 289
			);
......
312 293
		 'callback' => 'cdm_dataportal_taxon_page_view',
313 294
		 'access' => true,
314 295
		 'type' => MENU_LOCAL_TASK,
315
		 'weight' => 5,
296
		 'weight' => 6,
316 297
		 'callback arguments' => array(arg(2), "specimens")
317 298
		 // expected callback arguments: name_uuid
318 299
		 );
319

  
320 300
		}
321 301
	}
322 302

  
......
812 792
 *         valid values are: 'description', 'images', 'synonymy', 'specimens', 'all'
813 793
 * @return unknown_type
814 794
 */
815
function cdm_dataportal_taxon_page_view($uuid, $chapter = 'all'){
795
function cdm_dataportal_taxon_page_view($uuid, $chapter = 'all', $synonym_uuid = null){
816 796
	// display the page for the taxon defined by $uuid
817 797
	set_last_taxon_page_tab(arg(3));
818
	$taxonpage = cdm_dataportal_taxon_view($uuid, $chapter);
798
	$taxonpage = cdm_dataportal_taxon_view($uuid, $chapter, $synonym_uuid);
819 799
	return cdm_node_show(NODETYPE_TAXON, $uuid, $taxonpage->title , $taxonpage->content);
820 800
}
821 801

  
......
825 805
 *         valid values are: 'description', 'images', 'synonymy', 'all'
826 806
 * @return unknown_type
827 807
 */
828
function cdm_dataportal_taxon_view($uuid, $chapter = 'all'){
829

  
808
function cdm_dataportal_taxon_view($uuid, $chapter = 'all', $synonym_uuid = null){
830 809
	$taxon = cdm_ws_get(CDM_WS_PORTAL_TAXON, $uuid);
831 810
	if(!$taxon){
832 811
		drupal_set_title(t('Taxon does not exist'));
833 812
		return false;
834 813
	}
835
	$taxonpage->title = theme('cdm_taxon_page_title', $taxon);
814
	
815
	$taxonpage->title = theme('cdm_taxon_page_title', $taxon, $uuid, $synonym_uuid);
836 816

  
837 817
	// check if the taxon id contained in the currently selected tree
838 818
	$taxon_in_current_tree = taxon_in_current_tree($uuid);
......
1035 1015
	return $result->Integer;
1036 1016
}
1037 1017

  
1038
function uri_to_synonym($synonymUuid, $acceptedUuid, $pagePart = null){
1018
function theme_cdm_uri_to_synonym($synonymUuid, $acceptedUuid, $pagePart = null){
1039 1019
	$acceptedPath = path_to_taxon($acceptedUuid);
1040 1020
	return url($acceptedPath.($pagePart ? '/'.$pagePart : ''), 'highlite='.$synonymUuid.'&acceptedFor='.$synonymUuid, $synonymUuid);
1041 1021
}
modules/cdm_dataportal/help.php
1
<?php
2
// $Id$
3

  
4
/**
5
 * @file
6
 * Adds helpful messages for website administrators
7
 * and provides documentation in /admin/help
8
 */
9

  
10
//html paths for differents documentation sections:
11
define('HELP_OVERVIEW', './sites/all/modules/cdm_dataportal/help/overview.html');
12
define('HELP_SETTINGS_GENERAL', './sites/all/modules/cdm_dataportal/help/settings_general.html');
13
define('HELP_SETTINGS_GEO', './sites/all/modules/cdm_dataportal/help/settings_geo.html');
14
define('HELP_SETTINGS_LAYOUT', './sites/all/modules/cdm_dataportal/help/settings_layout.html');
15
define('HELP_SETTINGS_CACHE', './sites/all/modules/cdm_dataportal/help/settings_cache.html');
16

  
17
function cdm_dataportal_menu_help ($may_cache, &$items) {
18

  
19
	if (!$may_cache) {
20

  
21
		$items[] = array(
22
	  'path' => 'admin/help/cdm_dataportal_general',
23
      'title' => t('general'),
24
      'callback' => 'cdm_dataportal_file_get_content',
25
      'callback arguments' => array(HELP_SETTINGS_GENERAL),
26
	  'access' => true,
27
      'type' => MENU_LOCAL_TASK,
28
		);
29
		
30
		$items[] = array(
31
	  'path' => 'admin/help/cdm_dataportal_geo',
32
      'title' => t('geo'),
33
      'callback' => 'cdm_dataportal_file_get_content',
34
      'callback arguments' => array(HELP_SETTINGS_GEO),
35
	  'access' => true,
36
      'type' => MENU_LOCAL_TASK,
37
		);
38
			
39
		$items[] = array(
40
	  'path' => 'admin/help/cdm_dataportal_layout',
41
      'title' => t('layout'),
42
      'callback' => 'cdm_dataportal_file_get_content',
43
      'callback arguments' => array(HELP_SETTINGS_LAYOUT),
44
	  'access' => true,
45
      'type' => MENU_LOCAL_TASK,
46
		);
47
		
48
		$items[] = array(
49
	  'path' => 'admin/help/cdm_dataportal_cache',
50
      'title' => t('cache'),
51
      'callback' => 'cdm_dataportal_file_get_content',
52
      'callback arguments' => array(HELP_SETTINGS_CACHE),
53
	  'access' => true,
54
      'type' => MENU_LOCAL_TASK,
55
		);
56
	}
57
}
58

  
59
/**
60
 * Implementation of hook_help().
61
 */
62
function cdm_dataportal_help($path) {
63
	//result to return
64
	$res = '';
65
	
66
	switch ($path) {
67

  
68
		case 'admin/help#cdm_dataportal':
69
			//$popup = (module_exists('advanced_help')) ? theme('advanced_help_topic', 'cdm_help', 'website-overview') : '';
70
			//var_dump($popup);
71
			$content = cdm_dataportal_file_get_content(HELP_OVERVIEW);
72
			$res = $content;
73
			break;
74

  
75
		default:
76
			$path_aux = str_replace('/' , '_' , $path);
77
			$res = theme('cdm_dataportal_' . $path_aux);
78
	}
79

  
80
	return $res;
81
}
82

  
83
function cdm_dataportal_file_get_content ($path) {
84
	
85
	//modyfing the html file to get the drupal paths 
86
	$content = file_get_contents($path);
87
	$content_result = str_replace("{MODULE_PATH}", file_directory_path(), $content);
88
	
89
	//converting from html to apt for maven documentation
90
	$apt_content = $content_result;
91
	//general modifications	
92
	$apt_content = str_replace('<p>', '', $apt_content);
93
	$apt_content = str_replace('</p>', '', $apt_content);
94
	$apt_content = str_replace('<b>', '<<', $apt_content);
95
	$apt_content = str_replace('</b>', '>>', $apt_content);
96
	$apt_content = str_replace('<i>', '<', $apt_content);
97
	$apt_content = str_replace('</i>', '>', $apt_content);
98
	$apt_content = str_replace('<h4>', '', $apt_content);
99
	$apt_content = str_replace('</h4>', '', $apt_content);
100
	$apt_content = str_replace('<h3>', '', $apt_content);
101
	$apt_content = str_replace('</h3>', '', $apt_content);
102
	$apt_content = str_replace('<ul>', '', $apt_content);
103
	$apt_content = str_replace('</ul>', '', $apt_content);
104
	$apt_content = str_replace('&amp', '&', $apt_content);
105
	$apt_content = str_replace('<li>', '*', $apt_content);
106
	$apt_content = str_replace('</li>', '', $apt_content);
107
    //special modifications
108
	$apt_content = str_replace('<a target="_blank" href="./?q=admin/build/modules">Administer&#45&#62Site buildin&#45&#62Modules</a>', 
109
	                           '<Administer-\>Site building-\>Modules>', 
110
	                           $apt_content);
111
    $apt_content = str_replace('<a target="_blank" href="./?q=admin/build/themes">Administer&#45&#62Site buildin&#45&#62Themes</a>',
112
	                           '<Administer-\>Site building-\>Themes>', 
113
	                           $apt_content);
114
	$apt_content = str_replace('<a target="_blank" href="./?q=admin/settings/cdm_dataportal">Administer&#45&#62Site Configuration&#45&#62CDM Dataportal</a>',
115
	                           '<Administer-\>Site Configuration-\>CDM Dataportal>', 
116
	                           $apt_content);
117
	$apt_content = str_replace('<a target="_blank" href="./?q=admin/settings/cdm_dataportal/general" title="General">here</a>',
118
	                           '<Administer-\>Site Configuration-\>CDM Dataportal>', 
119
	                           $apt_content);         
120
	$apt_content = str_replace('<a target="_blank" href="./?q=admin/settings/cdm_dataportal/geo" title="General">Geo &amp Map settings</a>',
121
	                           '<Administer-\>Site Configuration-\>CDM Dataportal-\>geo & Map>', 
122
	                           $apt_content);
123
	$apt_content = str_replace('<a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout/search">Search Layout Settings</a>',
124
	                           '<Administer-\>Site Configuration-\>CDM Dataportal-\>Layout-\>Search>', 
125
	                           $apt_content);
126
	$apt_content = str_replace('<a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout/media">Media Layout Settings</a>',
127
	                           '<Administer-\>Site Configuration-\>CDM Dataportal-\>Layout-\>Media>', 
128
	                           $apt_content);
129
	//regular expressions
130
	$apt_content = preg_replace('/<!--.*-->/', '', $apt_content);
131
	$apt_content = preg_replace('/\<a target="(.*)" href="(.*)" title="(.*)"\>(.*)\<\/a\>/', '{{{$2}$4}}', $apt_content);
132
	                           
133
	            
134
                 
135
	$apt_file = str_replace('html', 'apt', $path);
136
	$fd = fopen($apt_file, 'w');
137
	fwrite($fd, $apt_content);
138
	fclose($fd);
139
	
140
	return $content_result;
141
}
142

  
143
function theme_cdm_dataportal_admin_settings_cdm_dataportal_general () {
144
	$res = t('<p>Help text for this page</p>');
145
	return $res;
146
}
147

  
148
function theme_cdm_dataportal_admin_settings_cdm_dataportal_geo () {
149
	$res = t('<p>Help text for this page</p>');	
150
	return $res;
151
}
152

  
153
function theme_cdm_dataportal_admin_settings_cdm_dataportal_layout () {
154
	$res = t('<p>Help text for this page</p>');
155
	return $res;
156
}
157

  
158
function theme_cdm_dataportal_admin_settings_cdm_dataportal_cache () {
159
	$res = t('<p>Help text for this page</p>');
160
	return $res;
161
}
modules/cdm_dataportal/help/overview.apt
1

  
2
    {{{http://drupal.org}Drupal}} is an open source 
3
    {{{http://en.wikipedia.org/wiki/Web_content_management_system}content managent system}}
4
    which can be expanded, builded and custimized by developing modules and themes.
5
    <<CDM Dataportal module>> is a drupal module developed for supporting the front end or presentation layer of the 
6
    {{{http://wp5.e-taxonomy.eu/cdm-server/}EDIT CDM Server}}.
7
    It allows taxonomist to look up for taxa, search taxa and other features. Besides 
8
    the CDM Dataportal module there are several <<drupal themes>>
9
    which personalized the layout (colours, images and others) of the CDM Dataportal module results.
10

  
11

  
12

  
13
    On this basis, it can be possible, for example, to have two different taxonomy collections whith differents selected looks
14
    thanks to the different drupal themes (each one per collection). However both collections will have the same features (such
15
    taxa search) thanks to the CDM Dataportal module.
16

  
17

  
18

  
19
    More documentation about the CDM (Common Data Library) where the CDM dataportal belongs could be found at the following locations:
20

  
21
    * {{{http://wp5.e-taxonomy.eu/cdmlib/}CDM Library}}
22
    
23
    * {{{http://wp5.e-taxonomy.eu/taxeditor/}Taxonomic Editor}}
24
    
25
    * {{{http://wp5.e-taxonomy.eu/cdm-server/}CDM Server}}
26
    
27
    * {{{http://wp5.e-taxonomy.eu/printpublisher/}Print Publisher}}
28
    
29
    * {{{http://wp5.e-taxonomy.eu/cdm-setups/}CDM Setups}}
30
    
31

  
32

  
33

  
34

  
35
Drupal module and theme activation
36

  
37
    To activate the datataportal module go to 
38
    <Administer-\>Site building-\>Modules>
39
    and at the CDM section select the modules CDM API, CDM Dataportal and CDM Taxon Tree. The other two 
40
    modules are optional.
41
    
42

  
43
    To change your default theme just navigate to      
44
    <Administer-\>Site building-\>Themes>
45
    where you can select your default theme as well as configured it. 
46

  
47

  
48

  
49
CDM Dataportal Settings
50

  
51

  
52
    If you are using the CDM Dataportal module, you will need to configure it in order to make it run. Here you will find how to
53
    explore and configure the module.
54

  
55

  
56

  
57
    First step to configure the module is making sure your user has access to the settings options of CDM Dataportal module.
58
    You can find the configurations options under <Administer-\>Site Configuration-\>CDM Dataportal>. Once you are in the
59
    configuration site you will see four different sections:
60

  
61

  
62

  
63

  
64
*General
65
    
66
    Drupal's CDM Dataportal module dialogues with the <CDM Server> asking for taxa data 
67
   	and classification of taxa. The first thing the <CDM Dataportal module> needs to know
68
   	is where is the CDM Server located in order to access it. Such parameters are configurable
69
    via the general tag of the settings.
70
    
71
    The general settings has enough documentation that explains itself. However the same
72
    documentation with some extra details is avaible
73
    <a href="./?q=admin/help/cdm_dataportal_general" title="General">here</a>
74
    as one html site. If you prefer to go directly to the general settings just click 
75
    <Administer-\>Site Configuration-\>CDM Dataportal>
76
    to start the configuration click here. 
77
	
78

  
79
	
80
*Geo & Map
81
    
82
    As with <CDM Server>, CDM Dataportal module also dialogues with a Map Server to 
83
    generate all the maps displayed on your web site. Again the module needs to know where
84
    the map server is located and this parameter as well as others related with the maps
85
    appaerance like map legends, map size, map background ... are configurable via
86
    {{{./?q=admin/settings/cdm_dataportal/geo}Geo & Map settings}}.
87
    This configuration site also explain all the configurable options itself. Same documentation with some extra details is avaible
88
    <a href="./?q=admin/help/cdm_dataportal_geo" title="Geo & Map">here</a> as one html site.
89
   	 	
90

  
91
	 	
92
*Layout		
93
    
94
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout" >Here</a> 
95
    you will find the settings for configuring the layout issues such pictures size or
96
    number of search results to show. Layout section itself contains three subsections; 
97
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout/taxon">Taxon Layout Settings</a>,
98
    <Administer-\>Site Configuration-\>CDM Dataportal-\>Layout-\>Search> and
99
    <Administer-\>Site Configuration-\>CDM Dataportal-\>Layout-\>Media>. 
100
    Each one of the listed links forward you to the settings configuration site where each site explains 
101
    itself the different options.
102
	
103
	
104
    
105
	A html site with more level of details is available 
106
	<a target="_blank" href="./?q=admin/settings/cdm_dataportal_layout">here</a>.
107
    
108

  
109
	
110
*Cache
111
    
112
    It is possible to increase the portal time response when serving taxa sites. The mechanism 
113
    is quite simple. It works caching all taxa sites available in your portal in a way that when
114
    a user wants to visit new taxa, the module will not create the new taxon site from scratch.
115
    Instead of that the taxon site will be loaded from the cache and therefore will be no
116
    dialogue with the CDM Server. 		 
117
    
118
		 
119
    
120
    <a href="./?q=admin/help/cdm_dataportal_cache.html" title="Cache">Here</a>
121
    you can read the cache configuration help or much better go directly to the
122
    {{{./?q=admin/help/settings/cdm_dataportal/cachesite}cache settings site}}.
123
    
124

  
125

  
modules/cdm_dataportal/help/overview.html
1
<p>
2
    <a target="_blank" href="http://drupal.org" title="drupal">Drupal</a> is an open source 
3
    <a target="_blank" href="http://en.wikipedia.org/wiki/Web_content_management_system" title="CMS">content managent system</a>
4
    which can be expanded, builded and custimized by developing modules and themes.
5
    <b>CDM Dataportal module</b> is a drupal module developed for supporting the front end or presentation layer of the 
6
    <a target="_blank" href="http://wp5.e-taxonomy.eu/cdm-server/" title="EDIT CDM Server">EDIT CDM Server</a>.
7
    It allows taxonomist to look up for taxa, search taxa and other features. Besides 
8
    the CDM Dataportal module there are several <b>drupal themes</b>
9
    which personalized the layout (colours, images and others) of the CDM Dataportal module results.
10
</p>
11

  
12
<p>
13
    On this basis, it can be possible, for example, to have two different taxonomy collections whith differents selected looks
14
    thanks to the different drupal themes (each one per collection). However both collections will have the same features (such
15
    taxa search) thanks to the CDM Dataportal module.
16
</p>
17

  
18
<p>
19
    More documentation about the CDM (Common Data Library) where the CDM dataportal belongs could be found at the following locations:
20
<ul>
21
    <li> <a target="_blank" href="http://wp5.e-taxonomy.eu/cdmlib/" title="CDM Library">CDM Library</a>
22
    </li>
23
    <li> <a target="_blank" href="http://wp5.e-taxonomy.eu/taxeditor/" title="Taxonomic Editor">Taxonomic Editor</a>
24
    </li>
25
    <li> <a target="_blank" href="http://wp5.e-taxonomy.eu/cdm-server/" title="CDM Server">CDM Server</a>
26
    </li>
27
    <li> <a target="_blank" href="http://wp5.e-taxonomy.eu/printpublisher/" title="Print Publisher">Print Publisher</a>
28
    </li>
29
    <li> <a target="_blank" href="http://wp5.e-taxonomy.eu/cdm-setups/" title="CDM Setups">CDM Setups</a>
30
    </li>
31
</ul>
32
</p>
33

  
34
<!-- module activation  -->
35
<h3>Drupal module and theme activation</h3>
36
<p>
37
    To activate the datataportal module go to 
38
    <a target="_blank" href="./?q=admin/build/modules">Administer&#45&#62Site buildin&#45&#62Modules</a>
39
    and at the CDM section select the modules CDM API, CDM Dataportal and CDM Taxon Tree. The other two 
40
    modules are optional.
41
</p>    
42
<p>
43
    To change your default theme just navigate to      
44
    <a target="_blank" href="./?q=admin/build/themes">Administer&#45&#62Site buildin&#45&#62Themes</a>
45
    where you can select your default theme as well as configured it. 
46
</p>
47

  
48
<!-- CDM Dataportal Settings  -->
49
<h3>CDM Dataportal Settings</h3>
50

  
51
<p>
52
    If you are using the CDM Dataportal module, you will need to configure it in order to make it run. Here you will find how to
53
    explore and configure the module.
54
</p>
55

  
56
<p>
57
    First step to configure the module is making sure your user has access to the settings options of CDM Dataportal module.
58
    You can find the configurations options under <a target="_blank" href="./?q=admin/settings/cdm_dataportal">Administer&#45&#62Site Configuration&#45&#62CDM Dataportal</a>. Once you are in the
59
    configuration site you will see four different sections:
60
</p>
61

  
62
<ul>
63

  
64
<li><h4>General</h4>
65
    <p>
66
    Drupal's CDM Dataportal module dialogues with the <i>CDM Server</i> asking for taxa data 
67
   	and classification of taxa. The first thing the <i>CDM Dataportal module</i> needs to know
68
   	is where is the CDM Server located in order to access it. Such parameters are configurable
69
    via the general tag of the settings.
70
    </p>
71
    <p>The general settings has enough documentation that explains itself. However the same
72
    documentation with some extra details is avaible
73
    <a href="./?q=admin/help/cdm_dataportal_general" title="General">here</a>
74
    as one html site. If you prefer to go directly to the general settings just click 
75
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/general" title="General">here</a>
76
    to start the configuration click here. 
77
	</p>
78
</li>
79
	
80
<li><h4>Geo &amp Map</h4>
81
    <p>
82
    As with <i>CDM Server</i>, CDM Dataportal module also dialogues with a Map Server to 
83
    generate all the maps displayed on your web site. Again the module needs to know where
84
    the map server is located and this parameter as well as others related with the maps
85
    appaerance like map legends, map size, map background ... are configurable via
86
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/geo" title="General">Geo &amp Map settings</a>.
87
    This configuration site also explain all the configurable options itself. Same documentation with some extra details is avaible
88
    <a href="./?q=admin/help/cdm_dataportal_geo" title="Geo & Map">here</a> as one html site.
89
   </p>	 	
90
</li>
91
	 	
92
<li><h4>Layout</h4>		
93
    <p>
94
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout" >Here</a> 
95
    you will find the settings for configuring the layout issues such pictures size or
96
    number of search results to show. Layout section itself contains three subsections; 
97
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout/taxon">Taxon Layout Settings</a>,
98
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout/search">Search Layout Settings</a> and
99
    <a target="_blank" href="./?q=admin/settings/cdm_dataportal/layout/media">Media Layout Settings</a>. 
100
    Each one of the listed links forward you to the settings configuration site where each site explains 
101
    itself the different options.
102
	</p>
103
	
104
    <p>
105
	A html site with more level of details is available 
106
	<a target="_blank" href="./?q=admin/settings/cdm_dataportal_layout">here</a>.
107
    </p>
108
</li>
109
	
110
<li><h4>Cache</h4>
111
    <p>
112
    It is possible to increase the portal time response when serving taxa sites. The mechanism 
113
    is quite simple. It works caching all taxa sites available in your portal in a way that when
114
    a user wants to visit new taxa, the module will not create the new taxon site from scratch.
115
    Instead of that the taxon site will be loaded from the cache and therefore will be no
116
    dialogue with the CDM Server. 		 
117
    </p>
118
		 
119
    <p>
120
    <a href="./?q=admin/help/cdm_dataportal_cache.html" title="Cache">Here</a>
121
    you can read the cache configuration help or much better go directly to the
122
    <a target="_blank" href="./?q=admin/help/settings/cdm_dataportal/cachesite" title="Cache">cache settings site</a>.
123
    </p>
124
</li>
125
</ul>
modules/cdm_dataportal/help/settings_cache.html
1
<p><b>TODO:</b> write cache documentation</p>
modules/cdm_dataportal/help/settings_general.html
1
<p>Drupal's CDM Dataportal module dialogues with the <i>EDIT CDM Server</i> asking for taxa data 
2
   and classification of taxa. The first thing the <i>CDM Dataportal module</i> needs to know
3
   is where is the CDM Server located in order to access it and this parameters are configurable
4
   via the general settings here explained. 
5
</p>
6

  
7
<ul>
8
	<li>
9
		<p><b>CDM web service URL</b></p>
10
		<p>This is the ip address of the location of the CDM Web Server which contains your collection 
11
		   database and it is accessible through web services. The first part of the address is the 
12
		   ip address asigned to the device/server where your CDM Server is running, the second part 
13
		   after the two points is the port where the CDM Server is listening the Web Services request. 
14
		   And the last part after the slash is the name of the database of your collection.  
15
		</p>
16
		<img alt="web service url image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_services_url.PNG">
17
		<p>Probably you will need to ask for are these parameters to your <i>system adminitrator</i>.
18
		</p>
19
	</li>
20
	
21
	<li>		
22
		<p><b>Rank of highest displayed taxon</b></p>
23
		<p>It is possible to navigate the taxa through a tree structure, here you can select the which
24
		   should be the maximal rank to show at the top of the tree(s).
25
		</p>
26
		<img alt="Rank image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_max_rank.PNG">
27
		<img alt="Rank image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_max_rank_2.PNG">	 	
28
	</li>
29
	 	
30
	<li> 
31
		<p><b>Enable caching</b></p>
32
		<p>This feature save the visited single taxon sites in an internal drupal cache doing 
33
		   the portal response of taxa sites faster beacause the sites are loaded from the cache and
34
		   are not created from scratch.  
35
		</p>
36
		<p>If taxa are modified by the editor or any other application the changes will be not visible till 
37
		   the cache is erased. Therefore developers should deactived this feature when they are working 
38
		   with the portal
39
		</p>
40
		<img alt="enable cache image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_cahe.PNG">		
41
	</li>
42
	
43
	<li>
44
		<p><b>Debug CDM Web Service</b></p>
45
		<p>This is a useful feature for developers. Activating this feature is possible to see which web services
46
		   have been called and its results. Green color means that the web services worked properly and red color
47
		   shows which web services failed.
48
		</p>
49
		<p>In order to see the debug mode just click on the black box of each site and then click on the green or
50
		   red text to see web services answers.
51
		</p>
52
		<img alt="debug close image"
53
			 src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_debug_close.PNG">
54
		<img alt="debug open image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_debug_open.PNG">
55
		
56
		<p>After clicking for a web service answer you will get a JSON file on your browse as follows.
57
		</p>
58
		
59
		<img alt="debug answer image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_debug_answer.PNG">
60
		<p>It is possible to see the web service answer in two different formats. JSON is the default format,
61
		   but if you want to change to a xml format just change the browser address as the picture shows.
62
		</p>
63
		<img alt="debug xnml answer image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_debug_answer_xml.PNG">
64
		
65
	</li>
66
	
67
	<li>
68
		<p><b>Available classifications</b></p>
69
		<p>Here you can choose which taxa classification is the standard for your portal, the other classifications 
70
		  will be also available but with a manual user change.
71
		</p>
72
		<img alt="clasifications image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_general_classifications.PNG">
73
	</li>
74
</ul>
modules/cdm_dataportal/help/settings_geo.html
1
<p><b>TODO:</b> write geo documentation</p>
2

  
3
<ul>
4

  
5
	<li>
6
		<p><b>Geoservice Access Point URL</b></p>
7
		<p>Here it is possible to select the <i>Map Server</i> you want the portal to connect
8
		   in order to generate the geographic data. If you want to introduce a custom address 
9
		   just select the <i>Alternative URL</i> value and fill the field
10
		   <i><u>Geoservice Access Point - Alternative URL</u></i> with the custem ip address.
11
		</p>
12
		<img alt="map url image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_geo_map_url.PNG">
13
	</li>
14
	
15
	<li>
16
		<p><b>Geoservice Display Width</b></p>
17
		<p>This feature give the administer the possibility to choose the size of the taxon
18
		   distribution map.
19
		</p>
20
		<img alt="map size url image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_geo_map_size.PNG">
21
	</li>
22
	
23
	<li>
24
		<p><b>Fixed Geoservice Bounding Box</b></p>
25
		<img alt="map size url image" src="{MODULE_PATH}/cdm_dataportal_help/images/help_geo_bounding_box.PNG">
26
	</li>
27
	
28
	<li>
29
		<p><b>Display Country Labels</b></p>
30
	</li>
31
	
32
	<li>
33
		<p><b>Map Caption</b></p>
34
	</li>
35
	
36
	<li>
37
		<p><b>OpenLayers Viewer</b></p>
38
	</li>
39
	
40
	<li>
41
		<p><b>Baser Layers</b></p>
42
	</li>
43
	
44
	<li>
45
		<p><b>Gogle Maps API Key</b></p>
46
	</li>
47
	
48
	<li>
49
		<p><b>Distribution Layer Opacity</b></p>
50
	</li>
51
	
52
	<li>
53
		<p><b>Legend Opacity</b></p>
54
	</li>
55
	
56
	<li>
57
		<p><b>Display a map legend</b></p>
58
	</li>
59
	
60
	<li>
61
		<p><b>Distribution Layer Opacity</b></p>
62
	</li>
63
	
64
	<li>
65
		<p><b>Distribution Layer Opacity</b></p>
66
	</li>
67
	
68
	<li>
69
		<p><b>Distribution Layer Opacity</b></p>
70
	</li>
71
	
72
</ul>
modules/cdm_dataportal/help/settings_layout.html
1
<p><b>TODO:</b> write layout documentation</p>
modules/cdm_dataportal/settings.php
43 43

  
44 44
function cdm_dataportal_menu_admin($may_cache, &$items){
45 45

  
46
	if ($may_cache) {
46
	if (!$may_cache) {
47 47

  
48 48
		$items[] = array(
49 49
      'path' => 'admin/settings/cdm_dataportal',
modules/cdm_dataportal/theme/cdm_dataportal.name.theme
328 328

  
329 329

  
330 330
function theme_cdm_taxonName($taxonName, $nameLink = NULL, $refenceLink = NULL,
331
$show_annotations = true, $is_type_designation = false, $skiptags = array()){
332

  
331
	$show_annotations = true, $is_type_designation = false, $skiptags = array()){
332
		
333 333
	$renderTemplate = get_nameRenderTemplate(RenderHints::getRenderPath(), $nameLink, $refenceLink);
334 334
	$partDefinition = get_partDefinition($taxonName->class);
335 335

  
modules/cdm_dataportal/theme/cdm_dataportal.page.theme
16 16
 * @param NameTO $nameTO
17 17
 * @return the formatted taxon name
18 18
 */
19
function theme_cdm_taxon_page_title($taxon){
19
function theme_cdm_taxon_page_title($taxon, $uuid){
20 20
	RenderHints::pushToRenderStack('taxon_page_title');
21 21
	if(isset($taxon->name->nomenclaturalReference)){
22 22
		$referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid));
modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme
209 209
			$acceptedTaxa = $table_of_accepted[$uuid];
210 210
			if(count($acceptedTaxa) == 1){
211 211
				$acceptedTaxon = $acceptedTaxa[0];
212
				$taxonUri = uri_to_synonym($taxon->uuid, $acceptedTaxon->uuid, 'synonymy');
212
				$taxonUri = theme('cdm_uri_to_synonym', $taxon->uuid, $acceptedTaxon->uuid, 'synonymy');
213 213
				if(isset($acceptedTaxon->name->nomenclaturalReference)){
214 214
					$referenceUri = url(path_to_reference($acceptedTaxon->name->nomenclaturalReference->uuid));
215 215
				}

Also available in: Unified diff