Revision 2138
Added by sgarg over 20 years ago
lib/style/common/templates/entryForm.tmpl | ||
---|---|---|
258 | 258 |
<a href="mailto:[% recipient %]"><i>[% recipient %]</i></a>. |
259 | 259 |
</p> |
260 | 260 |
[% ELSE %] |
261 |
<p>Use this page to edit the data set description that you submitted earlier to the registry.<br>The ID of this data set is: <b>[% docid %]</b></p>
|
|
261 |
<p>Use this page to edit the data set description that you submitted earlier to the registry.<br>The ID of this data set is: <b><a href="@servlet-path@?action=read&qformat=[% cfg %]&docid=[% docid %]">[% docid %]</a></b></p>
|
|
262 | 262 |
<p> </p> |
263 | 263 |
<p>Please have a look at the |
264 | 264 |
<a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&stage=guide" target="guide"> |
... | ... | |
284 | 284 |
<input type="hidden" name="cfg" value="[% cfg %]"> |
285 | 285 |
<input type="hidden" name="docid" value="[% docid %]"> |
286 | 286 |
<input type="hidden" name="stage" value="insert"> |
287 |
<input type="hidden" name="hasKeyword" value="[% hasKeyword %]"> |
|
287 | 288 |
<p align="left"> |
288 | 289 |
<a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&stage=guide#BasicInformation" target="guide">BASIC INFORMATION </a> |
289 | 290 |
</p> |
... | ... | |
749 | 750 |
</td> |
750 | 751 |
</tr> |
751 | 752 |
</table> |
753 |
[% IF hasKeyword == 'true' %] |
|
752 | 754 |
<p align="left"><font size="4" color="0000ff"><b><font size="-1"> |
753 | 755 |
<a |
754 | 756 |
href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&stage=guide#KeywordInformation" |
... | ... | |
822 | 824 |
</td> |
823 | 825 |
</tr> |
824 | 826 |
</table> |
827 |
[% END %] |
|
825 | 828 |
<br> |
826 | 829 |
<p align="left"><font size="4" color="0000ff"><b><font size="-1"> |
827 | 830 |
<a |
lib/style/common/templates/confirmData.tmpl | ||
---|---|---|
242 | 242 |
<a name="DataSetAbstract"></a> |
243 | 243 |
<p><b><font size="4" color="#0000ff">DATA SET ABSTRACT</font></b><br> [%abstract%] |
244 | 244 |
</p> |
245 |
|
|
245 |
[% IF hasKeyword == 'true' %] |
|
246 | 246 |
<hr> |
247 | 247 |
<a name="KeywordInformation"></a> |
248 | 248 |
<p><b><font size="4" color="#0000ff">KEYWORD INFORMATION</font></b> |
... | ... | |
283 | 283 |
[% cnt = cnt + 1 %] |
284 | 284 |
[% END %] |
285 | 285 |
</table> |
286 |
[% END %] |
|
287 |
|
|
286 | 288 |
<hr> |
287 | 289 |
<a name="TemporalCoverageOfData"></a> |
288 | 290 |
<p><b><font size="4" color="#0000ff">TEMPORAL COVERAGE OF DATA</font></b> |
... | ... | |
499 | 501 |
<input type="hidden" name="cfg" value="[% cfg %]"> |
500 | 502 |
<input type="hidden" name="docid" value="[% docid %]"> |
501 | 503 |
<input type="hidden" name="stage" value="confirmed"> |
504 |
<input type="hidden" name="hasKeyword" value="[% hasKeyword %]"> |
|
502 | 505 |
<input type="hidden" name="providerGivenName" value="[%providerGivenName%]"> |
503 | 506 |
<input type="hidden" name="providerSurName" value="[%providerSurName%]"> |
504 | 507 |
<input type="hidden" name="site" value="[%site%]"> |
lib/style/common/templates/genericResponse.tmpl | ||
---|---|---|
6 | 6 |
<p>Your entry has been [% function %]. Thank you.</p> |
7 | 7 |
[%ELSE%] |
8 | 8 |
<p>Your entry has been [% function %]. Thank you.</p> |
9 |
<p>You can the see the entry by clicking the Search button above. |
|
9 |
<p>You can the see the entry by clicking |
|
10 |
<a href="@servlet-path@?action=read&qformat=[% cfg %]&docid=[% docid %]">here</a> or the Search button above. |
|
10 | 11 |
<!-- <p>The entry will be reviewed by the [% orgabbrev %] Data Registry |
11 | 12 |
Manager and then will be added to the registry. You |
12 | 13 |
should expect to see the entry within a few days.</p> --> |
... | ... | |
48 | 49 |
<input type="hidden" name="docid" value="[% docid %]"> |
49 | 50 |
<input type="hidden" name="stage" value="confirmed"> |
50 | 51 |
<input type="hidden" name="dataWrong" value="No, go back to editing"> |
52 |
<input type="hidden" name="hasKeyword" value="[% hasKeyword %]"> |
|
51 | 53 |
<input type="hidden" name="providerGivenName" value="[%providerGivenName%]"> |
52 | 54 |
<input type="hidden" name="providerSurName" value="[%providerSurName%]"> |
53 | 55 |
<input type="hidden" name="site" value="[%site%]"> |
src/perl/register-dataset.cgi | ||
---|---|---|
72 | 72 |
$config->define("accesssysid"); |
73 | 73 |
$config->define("datasetpubid"); |
74 | 74 |
$config->define("datasetsysid"); |
75 |
$config->define("hasKeyword", { DEFAULT => 'true'} ); |
|
75 | 76 |
$config->define("mailhost"); |
76 | 77 |
$config->define("sender"); |
77 | 78 |
$config->define("recipient"); |
... | ... | |
107 | 108 |
my $orgabbrev = $config->orgabbrev(); |
108 | 109 |
my $orgurl = $config->orgurl(); |
109 | 110 |
my $orgfilter = $organization; |
110 |
$orgfilter =~ s/ /%20/g; |
|
111 |
$orgfilter =~ s/ /%20/g;
|
|
111 | 112 |
my $responseTemplate = $config->responseTemplate(); |
112 | 113 |
my $entryFormTemplate = $config->entryFormTemplate(); |
113 | 114 |
my $deleteDataTemplate = $config->deleteDataTemplate(); |
... | ... | |
117 | 118 |
my $accesssysid = $config->accesssysid(); |
118 | 119 |
my $datasetpubid = $config->datasetpubid(); |
119 | 120 |
my $datasetsysid = $config->datasetsysid(); |
121 |
my $hasKeyword = $config->hasKeyword(); |
|
120 | 122 |
my $mailhost = $config->mailhost(); |
121 | 123 |
my $sender = $config->sender(); |
122 | 124 |
my $recipient = $config->recipient(); |
... | ... | |
233 | 235 |
$$templateVars{'wg'} = \@FORM::wg; |
234 | 236 |
} |
235 | 237 |
|
238 |
$$templateVars{'hasKeyword'} = $hasKeyword; |
|
239 |
|
|
236 | 240 |
$$templateVars{'siteList'} = \@sortedSites; |
237 | 241 |
$$templateVars{'section'} = "Entry Form"; |
238 | 242 |
$$templateVars{'docid'} = ""; |
... | ... | |
320 | 324 |
$xmldocWithDocID = $xmldoc; |
321 | 325 |
$xmldocWithDocID =~ s/docid/$docid/; |
322 | 326 |
|
327 |
# Code for testing the xml file being inserted#### |
|
323 | 328 |
#my $testFile = "/tmp/test.xml"; |
324 | 329 |
#open (TFILE,">$testFile") || die ("Cant open xml file...\n"); |
325 | 330 |
#print TFILE $xmldoc; |
326 | 331 |
#close(TFILE); |
332 |
#### |
|
327 | 333 |
|
328 | 334 |
$notunique = insertMetadata($xmldocWithDocID, $docid); |
329 | 335 |
# if (!$notunique) { |
... | ... | |
1384 | 1390 |
my $aoCount = 1; |
1385 | 1391 |
my $foundDSO; |
1386 | 1392 |
|
1393 |
# set variable values |
|
1394 |
$$templateVars{'hasKeyword'} = $hasKeyword; |
|
1395 |
|
|
1387 | 1396 |
# find out the tag <alternateIdentifier>. |
1388 | 1397 |
$results = $doc->findnodes('//dataset/alternateIdentifier'); |
1389 | 1398 |
if ($results->size() > 1) { |
... | ... | |
1623 | 1632 |
$$templateVars{"kwTh$count"} = findValue($node, "keywordThesaurus"); |
1624 | 1633 |
} |
1625 | 1634 |
$$templateVars{'keyCount'} = $count; |
1635 |
if($count > 0 ){ |
|
1636 |
$$templateVars{'hasKeyword'} = "true"; |
|
1637 |
} |
|
1626 | 1638 |
|
1627 | 1639 |
$results = $doc->findnodes('//dataset/additionalInfo'); |
1628 | 1640 |
if ($results->size() > 1) { |
... | ... | |
2308 | 2320 |
$$templateVars{'methodPara'} = \@tempMethodPara; |
2309 | 2321 |
$$templateVars{'studyExtentDescription'} = normalizeCD($FORM::studyExtentDescription); |
2310 | 2322 |
$$templateVars{'samplingDescription'} = normalizeCD($FORM::samplingDescription); |
2323 |
$$templateVars{'origStateContact'} = $FORM::origState; |
|
2324 |
|
|
2325 |
$$templateVars{'hasKeyword'} = $FORM::hasKeyword; |
|
2311 | 2326 |
$$templateVars{'docid'} = $FORM::docid; |
2312 | 2327 |
|
2313 | 2328 |
if (! $error) { |
... | ... | |
2500 | 2515 |
$$templateVars{'methodPara'} = \@FORM::methodPara; |
2501 | 2516 |
$$templateVars{'studyExtentDescription'} = $FORM::studyExtentDescription; |
2502 | 2517 |
$$templateVars{'samplingDescription'} = $FORM::samplingDescription; |
2518 |
|
|
2519 |
$$templateVars{'hasKeyword'} = $FORM::hasKeyword; |
|
2503 | 2520 |
} |
2504 | 2521 |
|
2505 | 2522 |
################################################################################ |
Also available in: Unified diff
Made changes to control whether a skin wants to use keywords or not. Keywords probably will be used by all skins alsways. But similar changes can be made for Geographic Coverage or Temporal COverage to control whether a particular section of the insert data template needs to be shown or not. This can be controlled from .cfg file. For example, in nceas.cfg is you define hasKeyword = false, none of the templates will show the keyword part. (Unless, you are using NCEAS skin and you try to modify a document which already has keywords.)