Skip to content

The Aristotle Glossary extension provides a mechanism for defining a collection of reusable terms and definitions and the rich text plugins for inserting these into object definitions.

Notifications You must be signed in to change notification settings

GigiusB/aristotle-glossary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aristotle Glossary Extensions

https://travis-ci.org/aristotle-mdr/aristotle-glossary.svg?branch=master

The Aristotle Glossary Extension provides additional models for defining reusable terms and a rich text plugins for inserting references into object definitions.

Quick start

  1. Add "aristotle_glossary" to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        ...
        'aristotle_mdr',
        'aristotle_glossary',
        ...
    )
    
  2. Include the glossary URL definitions in your Django URLconf file. The glossary URLs Must exist at /glossary/ for the glossary definition popovers to work.:

    url(r'^glossary/', include('aristotle_glossary.urls')),
    
  3. Include links in your HTML to ensure the javascript and CSS are loaded for the popovers. This can be done by creating a new local template for your project based on the aristotle_mdr/scripts.py template. More information on how to override files in the Aristotle Metadata Registry documentation on customisation

    <script src="{% static 'aristotle_glossary/aristotle.glossary.js' %}" type="text/javascript"></script>
    <link rel="stylesheet" href="{% static 'aristotle_glossary/aristotle.glossary.css' %}" />
    
  4. Update the CONTENT_EXTENSIONS list in the ARISTOTLE_SETTINGS dictionary in your settings.py file to let the registry know of the additional model. For example:

    ARISTOTLE_SETTINGS['CONTENT_EXTENSIONS'] = [
            'aristotle_glossary',
            # ... other models here based on your requirements
        ]
    
  5. (Optional) Override the CKEDITOR_CONFIGS configuration dictionary to include a button in the rich text editor for in inserting links to glossary items. This can be done either by using the default Aristotle glossary configuration:

    from aristotle_glossary.settings import CKEDITOR_CONFIGS
    

    or manually by:

        CKEDITOR_CONFIGS = {
            'default': {
                'toolbar' : [
                        # ... other configuration options
                       { 'name': 'aristotletoolbar', 'items': [ 'Glossary' ] },
                ],
                'extraPlugins' : 'aristotle_glossary',
            },
        }
    
    For more information on customising the CKeditor toolbar consult the
    `Django-CKEditor documentation<https://github.com/django-ckeditor/django-ckeditor>`_.
    
  6. Run python manage.py migrate to update the database to include the models for the glossary.

Screenshots

A complete glossary

https://cloud.githubusercontent.com/assets/2173174/7443527/8b439c18-f195-11e4-8a97-9286a15983b5.png

Inserting a term into an existing description:

https://cloud.githubusercontent.com/assets/2173174/7443530/b9d333f4-f195-11e4-8ed7-f8c52f0e958a.png

When inserted into an item, hovering gives a brief description:

https://cloud.githubusercontent.com/assets/2173174/7443535/e67ae5c8-f195-11e4-8595-afd2833d901d.png

Clicking the link then takes a user to the complete glossary term:

https://cloud.githubusercontent.com/assets/2173174/7443526/52f433c2-f195-11e4-8b31-7dca1f024d1c.png

About

The Aristotle Glossary extension provides a mechanism for defining a collection of reusable terms and definitions and the rich text plugins for inserting these into object definitions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 71.1%
  • JavaScript 15.3%
  • HTML 11.2%
  • CSS 2.4%