H2020-IPM-Decisions / Content-Management-System

MICRO-SERVICE (CMS) able to manage the creation and modification of IPM Web Portal digital content

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cockpit Next

Requirements

  • PHP >= 7.0
  • PDO + SQLite (or MongoDB)
  • GD extension
  • mod_rewrite, mod_versions enabled (on apache)

make also sure that $_SERVER['DOCUMENT_ROOT'] exists and is set correctly.

Installation

  1. Download Cockpit and put the cockpit folder in the root of your web project
  2. Make sure that the /cockpit/storage folder and all its subfolders are writable
  3. Go to /cockpit/install via Browser
  4. You're ready to use Cockpit :-)

Editing the CMS contents

Within the CMS there are three sets of elements: Singletons, Collections and Forms. To change the content of the CMS, you need to:

  1. Connect to the service and log in.

  2. Find out which CMS element is used in the template of IPM Platform by checking the .html files of the page involved and look for the 'innerHtml' property, which is used to load the content received from the CMS into the template.

  3. Look for the attribute of the .ts file of the public page loaded in the template and check which method of the class managing the CMS (class CMSService) is used to set it.

  4. The URL used by CMSService method is divided into <cmsURL>/api/<ElementSet>/get/<ElementName>?token=${}, where "ElementSet" indicates whether it is a Collection, Singleton or Form and "ElementName" is the name associated with the element within the CMS.

  5. Within the CMS, search for the corresponding element in the set specified in the URL.

  6. Click on element settings (gear icon) and select edit.

On the left are the name of the element, corresponding to 'ElementName' in the URL displayed earlier, and the element label, the name under which it is displayed within the CMS. Fields can be added to the CMS element. These fields are named after the abbreviated form of the language they translate and can contain either plain text or HTML. To add a new field, simply click on "add field" at the bottom of the fields list and edit the name. You can then use the field settings (gear icon) to add: content type, content, label (the name associated when displaying the element in view mode).

For more details please check the user manual here that provide step by step guide to editing CMS content translations.

Build (Only if you modify JS components)

You need nodejs installed on your system.

First run npm install to install development dependencies

  1. Run npm run build - For one-time build of styles and components
  2. Run npm run watch - For continuous build every time styles or components change

Dockerized Development

You need docker installed on your system: https://www.docker.com.

  1. Run npm run docker-init to build the initial image.
  2. Run npm run docker to start an Apache environment suited for Cockpit on port 8080 (this folder mapped to /var/www/html).

πŸ’ Partners

ginetta
We create websites and apps that click with users.

BrowserStack
Live, Web-Based Browser Testing

πŸ’ Sponsors

Backers on Open Collective Sponsors on Open Collective

Become a backer or sponsor through:

Thank you to all our backers! πŸ™

Copyright and license

Copyright since 2015 Agentejo under the MIT license.

See LICENSE for more information.

About

MICRO-SERVICE (CMS) able to manage the creation and modification of IPM Web Portal digital content

License:MIT License


Languages

Language:JavaScript 42.3%Language:PHP 25.2%Language:Less 20.1%Language:Hack 11.4%Language:CSS 0.9%Language:Dockerfile 0.0%