Project

General

Profile

Actions

Feature #1395

closed

Content for frontends

Added by Alexander Watzinger about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Backend
Target version:
Start date:
2020-10-17
Estimated time:

Description

With this feature individual content for frontends can be configured in the OpenAtlas backend per project. They are:

  • Intro for frontend
  • Contact for frontend
  • Legal notice for frontend
Features
  • Can configure by users with the role manager admin/content
  • Can be edited with an HTML editor
  • Multi language support
To do
  • Frontend: fetch and display intro, contact and legal issue if available (with i18n).

Technical
They can be requested in backend (currently in develop branch) by e.g.

Content.get_translation('intro_for_frontend', 'de')

I added a second language parameter ('de' in this example) because it the API isn't language aware.
If left empty, the language isn't available or the translation is empty the default language translation will be returned.
Should be relatively fail safe, worst case scenario is you get an empty string.

Actions #1

Updated by Alexander Watzinger about 4 years ago

  • Subject changed from Individual content without Git branches to Individual content for frontends
  • Description updated (diff)
  • Status changed from Acknowledged to In Progress
  • Assignee set to Alexander Watzinger

Talked with Christoph and looks like we go with the admin/backend option for text on start page. Adapted description and added optional legal issue content. This will be a combined effort between frontend, backend and API and we can discuss it Thursday. Not sure how to deal with the ticket (make 3 out of it?) but assigned it to myself for now.

Actions #2

Updated by Alexander Watzinger about 4 years ago

  • Category set to Backend
  • Assignee changed from Alexander Watzinger to Bernhard Koschiček-Krombholz
  • Target version changed from 0.3.0 to 6.0.0
  • Project changed from OpenAtlasDiscovery (origin) to OpenAtlas
  • Description updated (diff)

Added technical information, moved issue to OpenAtlas project because it touches all areas.
Done my part in backend so assigning to Berni for next step: implementation in API, which will be followed by implementation in frontend by Christoph.

Actions #3

Updated by Alexander Watzinger about 4 years ago

  • Description updated (diff)
Actions #4

Updated by Bernhard Koschiček-Krombholz about 4 years ago

  • Assignee changed from Bernhard Koschiček-Krombholz to Christoph Hoffmann

Add new path for content:

/api/0.1/content/

Possible parameters: download, lang= <'en','de'>. i.e.:
/api/0.1/content?lang=de

Returns json:

{
   "contact": "<p>Das ist der Inhalt</p>",
   "intro": "<p>Das ist das Intro</p>",
   "legal-notice": "<p>Das ist das Impressum</p>",
}

Swaggerhub is also adapted. All changes pushed to develop.

Assigning Christoph for the next task, implementation in frontend.

Actions #5

Updated by Alexander Watzinger about 4 years ago

  • Subject changed from Individual content for frontends to Content for frontends
  • Description updated (diff)

Thanks Berni for implementing in the API, I uploaded the develop branch to demo-dev (https://demo-dev.openatlas.eu) and Origins (https://origins.openatlas.eu).
I also added intro_for_frontend and contact_for_frontend with translations (EN/DE), HTML tags, special characters and the like so we can see if this is working. Legal notice is empty but should work the same way and will be tested on the fly when ready.

@ Christoph: please let us know when implemented in frontend (and which branch) and I will update demo-dev and Origins frontends online.

Actions #6

Updated by Alexander Watzinger about 4 years ago

  • Description updated (diff)
Actions #7

Updated by Christoph Hoffmann about 4 years ago

good morning guys, thank you so much, getting to this during this week

Actions #8

Updated by Alexander Watzinger about 4 years ago

After Berni's and my work is done assigning to Christoph for last step.

Actions #9

Updated by Alexander Watzinger almost 4 years ago

  • Target version changed from 6.0.0 to 5.6.0
Actions #10

Updated by Alexander Watzinger almost 4 years ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF