Customizing LibraryFind 0.8.3
LibraryFind 0.8 moved all user interface styling and layout into CSS. The following is a description of how each CSS is used:
/public/stylesheets/look_and_feel.css - Provides the overall look and feel of the interface consisting of a header and 2-column format for the general page layout.
/public/styleshhets/library_find.css - Provides styling and layout for specific LibraryFind user interface elements such as the tabs and the search results.
The overall layout of the user interface has changed to provide a consistent user experience. The user will always have a header, search section with tabs, left nav bar, and central results/action area. This is a list of the major templates and how they are used to achieve the layout:
/app/views/layouts/libraryfind.rhtml - This one layout is used for both searching and admin functions. This layout provides a header, the search section, and a div for the rest of the page. In this way, users will always be able to enter a search even if they are in the admin client.
/app/views/record/general.rhtml & /app/views/record/images.rhtml - These files both establish a left-hand navigation bar and right-hand side for search results. General.rhtml chooses a partial result_rows for displaying each result in one row where images.rhtml chooses image_rows.rhtml to display 3 results per row.
/app/views/record/navigation.rhtml - Establishes the layout and functionality of the left nav bar used in search results.
/app/views/record/details/_article.rthml - This partial template is used to display a single record where the material_type is article.
/app/views/record/details/_book.rthml - This partial template is used to display a single record where the material_type is book.
/app/views/record/details/_generic.rthml - This partial template is used when the record to be displayed does not match a material type of article, book, or image.
/app/views/record/details/_image.rthml - This partial template is used to display a single record where the material_type is image.
/app/views/record/citation/_article.rhtml - This partial template is used to create an labeled citation for a record with a material_type of article. The citation can be viewed when the user clicks the citation link in the search results.
/app/views/record/citation/_book.rhtml - This partial template is used to create an labeled citation for a record with a material_type of book. The citation can be viewed when the user clicks the citation link in the search results.
/app/views/record/citation/_image.rhtml - This partial template is used to create an labeled citation for a record where the material_type is neither article nor book. The labeled citation format followed for this template is the style used for web-pages. The citation can be viewed when the user clicks the citation link in the search results.
/app/views/admin/navigation.rhtml - Establishes the layout and functionality of the left nav bar used to navigate between admin actions.
/app/views/admin/collection/_form - Creates the input fields for creating/editing a collection.
/app/views/admin/collection/edit - Displays the Edit Collection task to the user and calls _form
/app/views/admin/collection/list - Displays a list of all collections to the user and creates links to available actions on each collection.
/app/views/admin/collection/new - Displays the Create a New Collection task to the user and calls _form
/app/views/admin/collection/show - Displays all attributes of a single collection to the user.
This same format of _form, edit, list, new, and show is used for all administrative actions on: collection, collection_group, coverage, provider, and user.
Edit /config/config.yml to map a given tab name to a desired collection_group. For example, to search a newly created collection_group (where name=cust_collection) in LibraryFind, add that value in /config/config.yml:
A search may be initiated from a URL and parameters may be supplied to override the default behavior. The following is a list of required parameters and optional parameters to override the default actions:
sets - id of the sets to be searched on the desired tab - this will override the default search and the interface will remember the specified sets for the given tab during the entire session. The id should be the database id. For example, if you wanted to search only an agriculture collection_group, you'd supply the id for that collection_group (i.e. &sets=g1). Before overriding this value, make sure that the values in /config/config.yml are setup for your given instance and only use this parameter for search cases where the values in config.yml do not support all needs (see config.yml above)
query[type] - specify the type of search. Possible values are: keyword, title, creator, subject - default is keyword.
query[max] - specify the maximum number of results per database being searched. Our default is 25 results per target.
tab_template - use this to override the default template for the search results - including the left nav bar. The two default templates are 'general' and 'images'. 'general' is used for all search results from all tabs except the Images tab. 'images' is used to display results on the Images tab. To override this, create your own template - i.e /app/view/record/my_customization.rhtml then supply the template name as the param - i.e. &tab_template=my_customization. Use tab_template in conjuction with 'partial' - described below:
sort_value - specify the sort order. Possible values are: relevance, datedown, dateup - default is relevance.
filter - a / separated list of name:value pairs. For example: library_find_server/record/retrieve?query[string]=user_query&filter=material_type:article/subject:education