Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Additional external resources within the template #8

Open
pjotrsavitski opened this issue Feb 4, 2019 · 2 comments
Open

Additional external resources within the template #8

pjotrsavitski opened this issue Feb 4, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers Pending Requires more input or has to be discusses task A task to be completed

Comments

@pjotrsavitski
Copy link
Contributor

pjotrsavitski commented Feb 4, 2019

Current code allows using certain special notation within descriptions of activities. Currently handled ones include {{website}}, {{dashboard}}, {{Q1}}, {{Q2}} ... that are being generated by the system and automatically replaced.

It might be useful to allow creator defining additional external resources to be replaced within the texts. This should allow the system to link to those even if the HTML input is not allowed.

Proposed logic

Resources should reside within the resources key of the general Session Template context structural element. The key should have an array of objects, empty array or even a missing key.

The structure should be as follows:

context:
  title: title
  ...
  resources:
    -
      key: weburl
      url: https://weburl.url
      text: Web URL

This would allow the {{weburl}} to be referenced from within the texts and replaced with an anchor that would look similar to this:
<a href="URL" target="_blank">TEXT</a>

The text could be made optional with either key or url being used instead.

@pjotrsavitski pjotrsavitski added enhancement New feature or request task A task to be completed labels Feb 4, 2019
@lprisan
Copy link
Collaborator

lprisan commented Apr 16, 2019

I'd make resources a separate section from context

@pjotrsavitski pjotrsavitski added the Pending Requires more input or has to be discusses label May 10, 2019
@lprisan lprisan added the good first issue Good for newcomers label Mar 12, 2020
@lprisan
Copy link
Collaborator

lprisan commented Mar 12, 2020

Also, I'd open the link in a new tab/window, if possible

pjotrsavitski added a commit that referenced this issue Mar 12, 2020
Added code that would handle showing resources attached to a standalone
activity items. Resouces should be a collection of items where item
could either be a URL or a complex structure with "url" and "title" keys.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers Pending Requires more input or has to be discusses task A task to be completed
Projects
None yet
Development

No branches or pull requests

2 participants