.. include :: substitutions.txt .. index:: !Front-end .. _front_end: Front-end editing ================== .. _front_end_configuration: Front-end configuration ------------------------- |GC| can be configured to allow front-end (the public side of |J|) editing for certain users using the standard |J| permissions system (see: :ref:`permissions`). How to open the map editor -------------------------- When front-end editing is enabled, you can create hyperlinks to let your users add or edit content to |GCIs|, this can be done manually or automatically. To show a button-style hyperlink that points to the map editor window under the |J| article's editor window, you must publish |GC| :ref:`editor_plugin` plugin and the button will appear automatically. .. figure :: images/gc_plugin_editor.* If you want to *automatically* insert into an article's body a button-style hyperlink that points to the map editor window, you can create a :ref:`mapeditor_button` with the :ref:`content_plugin` using `{gcmapeditor}` tag. If you want to *manually* create an hyperlink that points to the editor window, you should load the modal API by adding the following piece of code at the very top of your template: .. code-block:: php :linenos: then, create a link like this: .. code-block:: php :linenos: Click to activate map editor * change `XXX` with the |GCI|'s' ID, this parameter is optional * change `YYY` with the article's ID, this parameter is optional * change `ZZZ` with the |GCL|'s ID, this parameter is optional * optionally change popup x and y size values in `rel` attribute * see :ref:`front_end_parameters` for the full list of supported parameters .. note::: Depending on :ref:`permissions`, certain front-end editing features can be disabled or limited to certain user levels. .. note:: |GC| comes with a plugin :ref:`editor_plugin` wich adds a button to the standard |J| editor form. .. _mapeditor_steps: Front-end |GC| editing steps ---------------------------- These are the steps that the user may encounter when adding or editing |GCIs| from the front-end. Some steps could be missing because the user doesn't have the necessary permissions or because they have been disabled by |GC| configuration. Item selection .............. Just after pressing the button, the user will see a list of the existing |GCIs| (if any) for the article being edited (if any). If permissions are granted, the user could also see the button to add a new |GCI|. .. figure :: images/gc_fe_itemselect.* Layer selection ............... The second step is to choose the |GCL| (or change it, if editing an existing |GCI|). .. figure :: images/gc_fe_layerselect.* Balloon content editing ....................... The third step is to edit the balloon title, the hyperlink (if permissions are granted) and the content. .. figure :: images/gc_fe_balloon.* Map features editing ....................... The last step is to edit the geometries in the map. GPX file upload is also available in this view. .. figure :: images/gc_fe_mapeditor.* .. _mapeditor_button: Map Editor Button ----------------- The :ref:`content_plugin` has a tag `{gcmapeditor}` that generates an HTML button with modal behavior to open the map editor.