Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn reference URLs into hyperlinks #2234

Merged
merged 7 commits into from
May 13, 2024
Merged

Turn reference URLs into hyperlinks #2234

merged 7 commits into from
May 13, 2024

Commits on May 13, 2024

  1. BaseReference: new class.

    Move the common functionality of the Reference and PublishedReference
    classes into a common abstract base class.
    Benjamin Moody committed May 13, 2024
    Configuration menu
    Copy the full SHA
    48e6866 View commit details
    Browse the repository at this point in the history
  2. Move References section to a generic template.

    Benjamin Moody committed May 13, 2024
    Configuration menu
    Copy the full SHA
    e6f5f13 View commit details
    Browse the repository at this point in the history
  3. PublishedReference: add url field.

    This field should hold the URL of the cited work, if any.
    
    In most cases, this should be easy to determine by searching for a
    regular expression.  However, if that pattern is changed in the
    future, we may not want the new rules to apply retroactively.
    
    Therefore, for published projects, store the URL in a model field, and
    perform a one-time migration to compute this field for existing
    published projects.
    Benjamin Moody committed May 13, 2024
    Configuration menu
    Copy the full SHA
    5023f8e View commit details
    Browse the repository at this point in the history
  4. Reference: add url property.

    Like the url field of PublishedReference, this should contain the URL
    of the cited work, if any.
    
    Unlike published references, this can be automatically derived from
    the description, since the results can be checked in the project
    preview before publishing.
    Benjamin Moody committed May 13, 2024
    Configuration menu
    Copy the full SHA
    909fda3 View commit details
    Browse the repository at this point in the history
  5. Copy the reference URL field when publishing a project.

    When a project is published, the URL field of each reference should be
    copied from the active Reference object to the new PublishedReference
    object.
    Benjamin Moody committed May 13, 2024
    Configuration menu
    Copy the full SHA
    01f46f2 View commit details
    Browse the repository at this point in the history
  6. BaseReference: add html_description property.

    If a reference has a URL, this should be transformed into a clickable
    link.  This is done using either the saved url field
    (PublishedReference) or the automatically-derived url property
    (Reference).
    Benjamin Moody committed May 13, 2024
    Configuration menu
    Copy the full SHA
    b79614c View commit details
    Browse the repository at this point in the history
  7. reference_list.html: use the html_description field.

    If a reference has a URL, this should be transformed into a clickable
    link; this is done automatically by the BaseReference html_description
    property.
    Benjamin Moody committed May 13, 2024
    Configuration menu
    Copy the full SHA
    7b6be98 View commit details
    Browse the repository at this point in the history