en:user:expanding_on_gs3_customisation_tutorials
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:user:expanding_on_gs3_customisation_tutorials [2020/09/03 21:36] – created anupama | en:user:expanding_on_gs3_customisation_tutorials [2023/03/13 01:46] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | |||
======Expanding on the GS3 Customisation tutorials====== | ======Expanding on the GS3 Customisation tutorials====== | ||
This wiki explains how to introduce support for other Greenstone 3 features into the custom '' | This wiki explains how to introduce support for other Greenstone 3 features into the custom '' | ||
- | =====Adding support for collection groups====== | + | =====Displaying |
- | If you edited web/ | + | If you have edited |
1. Change: | 1. Change: | ||
Line 89: | Line 92: | ||
<!-- If the group has a description - display it --> | <!-- If the group has a description - display it --> | ||
< | < | ||
+ | <!-- for supporting html in group description, | ||
+ | is displayed in template name=' | ||
<p class=" | <p class=" | ||
</ | </ | ||
Line 99: | Line 104: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | 3. Save and close the file.\\ | ||
+ | Any changes to '' | ||
+ | |||
+ | |||
+ | ==== Advanced: if laying out groups column-wise in table cells of an html table ==== | ||
+ | There is some complexity if you want every 2 groups (or collections) appearing in a separate ''< | ||
+ | |||
+ | The following modifications to '' | ||
+ | |||
+ | These modifications also optionally provide support for an additional column of standalone collections. | ||
+ | |||
+ | First follow the steps in the section Displaying Collection Groups above, then, edit '' | ||
+ | |||
+ | 1. Locate: | ||
+ | < | ||
+ | Replace with: | ||
+ | < | ||
+ | <!-- < | ||
+ | |||
+ | <!-- output the groups, the following outputs them column wise --> | ||
+ | < | ||
+ | <!-- then output the collectionList in a final column --> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | 2. Locate: | ||
+ | < | ||
+ | Replace with: | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | 3. Locate: | ||
+ | < | ||
+ | Replace with: | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | 4. Before the '' | ||
+ | < | ||
+ | <!-- To organise table cells, <td>, one column at a time: | ||
+ | https:// | ||
+ | will not work, since we have an if-statement inside the for loop to filter for groups. | ||
+ | Instead, counting only the groups using Borodin' | ||
+ | https:// | ||
+ | |||
+ | While that gives us a proper counter not dependent on position(), it doesn' | ||
+ | that we need to open a tag (td) on odd count and close it on even. | ||
+ | For that, the solution is at: | ||
+ | https:// | ||
+ | |||
+ | General: https:// | ||
+ | --> | ||
+ | < | ||
+ | < | ||
+ | <xsl:if test=" | ||
+ | <td style=" | ||
+ | < | ||
+ | <!-- calls the template match=" | ||
+ | </td> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <!-- We want collections to appear in a separate and single column. | ||
+ | So we don't do even odd columns here. --> | ||
+ | < | ||
+ | <td style=" | ||
+ | < | ||
+ | <!-- why does calling the template match=" | ||
+ | attr this time NOT work? --> | ||
+ | </td> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | If yo were to set a '' | ||
+ | |||
+ | |||
+ | =====Adding the Depositor link and Depositor pages====== | ||
+ | 1. Edit '' | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <xsl:if test=" | ||
+ | <li class=" | ||
+ | <li class=" | ||
+ | </ | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Immediately after ''< | ||
+ | < | ||
+ | <!-- Depositor link: only for logged-in users. | ||
+ | CSS class=login to make Depositor link blue to indicate it's only available when logged in. | ||
+ | Don't put this depositorTitleAndLink inside the test for whether user ' | ||
+ | in the current list of groups, as we want the depositor link to be visible for any | ||
+ | logged in user. The collection they want to deposit a doc into will determine whether | ||
+ | that user has the right to modify that collection. | ||
+ | --> | ||
+ | <li class=" | ||
+ | </ | ||
+ | |||
+ | 2. Then copy the folder '' | ||
+ | |||
+ | This is because this folder is referred to from your '' | ||
+ | < | ||
+ | <action class=" | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 3. Save and close the file.\\ | ||
+ | Refresh your browser and login to see the Depositor link. The Depositor wizard' | ||
+ | |||
+ | |||
+ | =====Displaying the document/ | ||
+ | By default, the visible search box does not provide a dropdown to search at document vs section level, even if there is more than one search level index available for a collection. It just searches within the default level index, and users would need to choose one of the form search options to have control over this. | ||
+ | |||
+ | |||
+ | With the following changes in place, if there is more than one search level index for a collection, a dropdown will be displayed near the default search box, allowing the user to choose at what index level to search. By default this dropdown would be set to the default search level index configured when the collection was built. | ||
+ | |||
+ | |||
+ | Edit '' | ||
+ | |||
+ | 1. Comment out the code that hides index levels by replacing | ||
+ | < | ||
+ | <input type=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | with: | ||
+ | < | ||
+ | <!-- don't hide indexing levels: code further down will hide it if there' | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | --> | ||
+ | |||
+ | 2. Find: | ||
+ | < | ||
+ | Insert the following //before// that line: | ||
+ | < | ||
+ | |||
+ | <!-- The index level selection list. hideSingle=true to hide the dropdown if there' | ||
+ | < | ||
+ | <span class=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | 3. Save and close the file.\\ | ||
+ | Refresh your digital library page in your browser, visit a collection and look for the new dropdown in the basic search form area. | ||
+ | |||
+ | =====Adding in links to available search forms===== | ||
+ | Collections tend to have text, fielded and advanced search forms turned on by default. The perrin interface provides links to these in a dropdown in the navigation bar for the collection. | ||
+ | |||
+ | If you wanted to display a horizontal line of links to these instead, then as follows: | ||
+ | |||
+ | 1. Adjust '' | ||
+ | Locate: | ||
+ | < | ||
+ | <br class=" | ||
+ | <div id=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | Replace the above with: | ||
+ | < | ||
+ | <!-- The list of other search types --> | ||
+ | <div class=" | ||
+ | <ul> | ||
+ | < | ||
+ | <xsl:if test="/ | ||
+ | <li class=" | ||
+ | <a class=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </a> | ||
+ | </li> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 2. Change in web/ | ||
+ | < | ||
+ | By editing the 67px for height to 90px, so the same line now looks like: | ||
+ | < | ||
+ | |||
+ | 3. Edit '' | ||
+ | < | ||
+ | Add the following above that: | ||
+ | < | ||
+ | div.query-form-links{float: | ||
+ | div.query-form-links a{font-size: | ||
+ | div.query-form-links li{display: | ||
+ | div.query-form-links ul{padding-right: | ||
+ | </ | ||
+ | |||
+ | 4. Save and close the edited files.\\ | ||
+ | Refresh your digital library page in your browser, visit a collection that supports multiple search forms and there should now be links under the default search form to the other search forms available. | ||
en/user/expanding_on_gs3_customisation_tutorials.1599169002.txt.gz · Last modified: 2020/09/03 21:36 by anupama