Project

General

Profile

Feature #1395

Content for frontends

Added by Alexander Watzinger 12 months ago. Updated 11 months ago.

Status:
Closed
Priority:
Low
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.

History

#1

Updated by Alexander Watzinger 12 months ago

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

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.

#2

Updated by Alexander Watzinger 12 months ago

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

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.

#3

Updated by Alexander Watzinger 12 months ago

  • Description updated (diff)
#4

Updated by Bernhard Koschiček-Krombholz 12 months 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.

#5

Updated by Alexander Watzinger 12 months ago

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

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.

#6

Updated by Alexander Watzinger 12 months ago

  • Description updated (diff)
#7

Updated by Christoph Hoffmann 12 months ago

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

#8

Updated by Alexander Watzinger 11 months ago

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

#9

Updated by Alexander Watzinger 11 months ago

  • Target version changed from 6.0.0 to 5.6.0
#10

Updated by Alexander Watzinger 11 months ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF