Hello CSpacers,
I'm attempting to modify the fields available in Advanced Search
(SearchFieldsTemplate-{record type}.html) with some success. However, there
are some inconsistencies that require your guidance, all of which follow a
similar theme. Can you help me complete the picture?
(I have posted my question here, too:
https://wiki.collectionspace.org/questions/165216469/ui-field-naming-conventions-for-class-names-tips-and-tricks
)
Are these class names declared somewhere, or is it a somewhat wild guess at
to which one is correct? I've been lucky with some, and unlucky with
others, using the {RecordType}Template.html, core-messages.properties, and
{tenant|base}-{record-type}.xml (application layer) configuration files as
a guide. Of course, using the existing fields in the
SearchFieldsTemplate-{record type}.html as a guide as well.
- Determining the label,
<div class="info-pair">
<div class="header">
<!-- Convention is inconsistent across fields. For those that do not work,
or those whose label is not adequate, is it poor practice to hard code the
label between the div?-->
<div class="label *csc-collection-object-objectNumber-label*"></div>
</div>
<!-- Although not necessary for all, where is this declared?-->
<div class="content clearfix *csc-collection-object-objectNumberGroup*">
<!-- Is the {RecordType}Template.html the best place to acquire this
field class name? -->
<input type="text" class="*csc-object-identification-object-number*
"/>
</div>
</div>
- Determining the label for start and end dates in addition the data
fields,
<div class="info-pair">
<div class="header">
<div class="label
csc-collection-object-objectProductionDate-label"></div>
</div>
<div class="content">
<table>
<thead>
<tr>
<!-- Where are these? -->
<td class="
*csc-collection-object-objectProductionDateStart-label*"></td>
<td class="
*csc-collection-object-objectProductionDateEnd-label*"></td>
</tr>
</thead>
<tbody>
<tr>
<!-- And these, since they are not declared
in the {RecordType}Template.html? -->
<td><input type="text"
class="
*csc-collection-object-objectProductionDateStart*"/>
</td>
<td><input type="text"
class="
*csc-collection-object-objectProductionDateEnd*"/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
I have referenced the provided documentation with some success:
Adding New Fields to the User Interface:
https://wiki.collectionspace.org/display/CSPACE321/Adding+New+Fields+to+the+User+Interface
Selector Naming Conventions:
https://wiki.collectionspace.org/display/collectionspace/Selector+Naming+Conventions
Thanks you!
Yousuf
Hello CSpacers,
I'm attempting to modify the fields available in Advanced Search
(SearchFieldsTemplate-{record type}.html) with some success. However, there
are some inconsistencies that require your guidance, all of which follow a
similar theme. Can you help me complete the picture?
(I have posted my question here, too:
https://wiki.collectionspace.org/questions/165216469/ui-field-naming-conventions-for-class-names-tips-and-tricks
)
Are these class names declared somewhere, or is it a somewhat wild guess at
to which one is correct? I've been lucky with some, and unlucky with
others, using the {RecordType}Template.html, core-messages.properties, and
{tenant|base}-{record-type}.xml (application layer) configuration files as
a guide. Of course, using the existing fields in the
SearchFieldsTemplate-{record type}.html as a guide as well.
1) Determining the label,
<div class="info-pair">
<div class="header">
<!-- Convention is inconsistent across fields. For those that do not work,
or those whose label is not adequate, is it poor practice to hard code the
label between the div?-->
<div class="label *csc-collection-object-objectNumber-label*"></div>
</div>
<!-- Although not necessary for all, where is this declared?-->
<div class="content clearfix *csc-collection-object-objectNumberGroup*">
<!-- Is the {RecordType}Template.html the best place to acquire this
field class name? -->
<input type="text" class="*csc-object-identification-object-number*
"/>
</div>
</div>
2) Determining the label for start and end dates in addition the data
fields,
<div class="info-pair">
<div class="header">
<div class="label
csc-collection-object-objectProductionDate-label"></div>
</div>
<div class="content">
<table>
<thead>
<tr>
<!-- Where are these? -->
<td class="
*csc-collection-object-objectProductionDateStart-label*"></td>
<td class="
*csc-collection-object-objectProductionDateEnd-label*"></td>
</tr>
</thead>
<tbody>
<tr>
<!-- And these, since they are not declared
in the {RecordType}Template.html? -->
<td><input type="text"
class="
*csc-collection-object-objectProductionDateStart*"/>
</td>
<td><input type="text"
class="
*csc-collection-object-objectProductionDateEnd*"/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
I have referenced the provided documentation with some success:
*Adding New Fields to the User Interface:*
https://wiki.collectionspace.org/display/CSPACE321/Adding+New+Fields+to+the+User+Interface
*Selector Naming Conventions:*
https://wiki.collectionspace.org/display/collectionspace/Selector+Naming+Conventions
Thanks you!
Yousuf