Commit 52643069 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'develop' into 'master'

Refs #12615. Implements silent HEIC/HEIF conversion to png. Write a note in...

See merge request !355
parents 768c8a93 ae52d966
Pipeline #5376 passed with stages
in 3 minutes and 22 seconds
......@@ -178,6 +178,15 @@ Upload to server, before 'save'
* An optional existing variable [STORE_EXTRA][<uploadSip>][FILES_TMP_NAME] will be deleted. The 'flagDelete' must not
be change - it's later needed to detect to delete, of earlier uploaded files.
Upload HEIC/HEIF
................
As of 2021, latest iPhone & Samsung uses the HEIC or HEIF image format. These format isn't still fully supported under
linux. Especially Ubuntu 18.04 has, without installed extra packages, no support at all. Ubuntu 20.04 knows the mimetype
but still need extra packages.
As a temporary workaround, QFQ will silently convert uploaded HEIC/HEIF images to png. The package `libheif-examples`
has to be installed. Detection of HEIC/HEIF images are done via `heif-info`, conversion via `heif-convert`.
Form save
.........
* Step 1: insert / update the record.
......
<mxfile host="Electron" modified="2021-05-26T10:17:26.031Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/12.6.5 Chrome/80.0.3987.86 Electron/8.0.0 Safari/537.36" etag="hdgggFcpD_TCr-HYCta5" version="12.6.5" type="device"><diagram id="9q-i_z5IJf1DyX_JrZ7c" name="Page-1">7V1bk5s4Fv41rnlKFxL3x3Y7PUlVMtWdTrK7T1PYyDYbjAiW0+359SOB8AXJbmWDkeTZfkiMBALO+XTO0bmIkXu3evm9SsrlR5yifASd9GXkTkYQeqHn0P9Yy7ZpgUHEWxZVljZtYN/wlP2FeGN72iZL0froRIJxTrLyuHGGiwLNyFFbUlX4+fi0Oc6P71omCyQ0PM2SXGz9V5aSZdPquo6z73iHssWS39oLIn7JKmnP5qeul0mKnw+a3Lcj967CmDS/Vi93KGfkawnTXHd/onf3ZBUqiMoFXxfO14/g+f3H6XhCvsdo/PWP8g3w+dP9SPINf2f+uGTbEqHCmyJFbBhn5I6flxlBT2UyY73PlO+0bUlWO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JaDEk1e3f0Sd5h8mKEClHt+/+BdodnyVYp6zIpjkgcfN9g1jHHBXmzrsXvLT2BkuBl39kmdjQ0hM57yhTa7eA5/edjkrEh7/CqpDqv9l/sNlxpbtd+AeRarU3Q3eQPSizNGLYG6TC2pm9zNNJXtjV9vbUu/jUn5hj44UPO7+tS0W63VM4IQovb17eCnekKFSUCHKkWebx/pJ3j9it1zbnvO3t2va5bmqe4dt0ifHRKUp2z353tyGnt/zw26GGFGbN2fb/T91p+xCliZ/wN</diagram></mxfile>
\ No newline at end of file
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......@@ -1546,7 +1546,19 @@ Type: editor
^^^^^^^^^^^^
* TinyMCE (https://www.tinymce.com, community edition) is used as the QFQ Rich Text Editor.
* The content will be saved as HTML inside the database.
* The content will be saved as HTML code in the database.
.. important::
*FormElement.encode*: To save HTML code, incl. HTML tags (bold, table, lists, ...), the **htmspecialchar**
encoding can't be used, cause the HTML tags loose their meaning. Therefore **single tick** or **none** is necessary.
* *FormElement.checktype*
* *all*: The only useful setting for Editor. HTML tags might contain ``% ' " < >`` and so on. This is **dangerous**
due of potential inserted malicous code! But there is no other option, cause the HTML tags are required.
* All configuration and plugins will be configured via the 'parameter' field. Just prepend the word 'editor-' in front
of each TinyMCE keyword. Check possible options under:
......@@ -1961,7 +1973,7 @@ and will be processed after saving the primary record and before any action Form
* *FormElement.value* = `<string>` - By default, the full path of any already uploaded file is shown. To show something
different, e.g. only the filename, define:
* ``{{filenameBase:V}}`` (see :ref:STORE_VARS)
* ``{{filenameBase:V}}`` (see :ref:`STORE_VARS`)
* ``{{SELECT SUBSTRING_INDEX( '{{pathFileName:R}}', '/', -1) }}``
See also :ref:`download Button<downloadButton>` to offer a download of an uploaded file.
......@@ -2000,11 +2012,11 @@ FormElement.parameter
such an installation (filesystem and database) are moveable.
* If the original filename should be part of `fileDestination`, the variable *{{filename}}*
(see :ref:STORE_VARS) can be used. Example ::
(see :ref:`STORE_VARS`) can be used. Example ::
fileDestination={{SELECT 'fileadmin/user/pictures/', p.name, '-{{filename}}' FROM Person AS p WHERE p.id={{id:R0}} }}
* Several more variants of the filename and also mimetype and filesize are available. See :ref:STORE_VARS.
* Several more variants of the filename and also mimetype and filesize are available. See :ref:`STORE_VARS`.
* The original filename will be sanitized: only '<alnum>', '.' and '_' characters are allowed. German 'umlaut' will
be replaced by 'ae', 'ue', 'oe'. All non valid characters will be replaced by '_'.
......@@ -2062,7 +2074,7 @@ FormElement.parameter
`fe.value`. The button is only shown if `fe.value` points to a readable file on the server.
* If `downloadButton` is empty, just shows the regular download glyph.
* To just show the filename: `downloadButton = t:{{filenameOnly:V}}` (see :ref:STORE_VARS)
* To just show the filename: `downloadButton = t:{{filenameOnly:V}}` (see :ref:`STORE_VARS`)
* Additional attributes might be given like `downloadButton = t:Download|o:check file|G:0`. Please check :ref:`download`.
* *fileUnzip* - If the file is a ZIP file (only then) it will be unzipped. If no directory is given via ``fileUnzip``, the
......@@ -2166,7 +2178,7 @@ with 'my', e.g. 'myUpload1'.
* *FormElement.parameter*:
* *fileDestination* = `<pathFileName>` - define the path/filename
(see :ref:STORE_VARS). E.g.::
(see :ref:`STORE_VARS`). E.g.::
fileDestination=fileadmin/person/{{name:R0}}_{{id:R}}/uploads/picture_{{filename}}
......@@ -2594,7 +2606,9 @@ record (defined by `multiSql`).
| multiMgsNoRecord | Default: No data | Message shown if `multiSql` selects no records |
+------------------+----------------------------------+------------------------------------------------+
* Multi Form do not use 'record-locking' at all.
.. note::
Multi Form do not use 'record-locking' at all.
The Form is shown as a HTML table.
......@@ -2603,25 +2617,25 @@ The Form is shown as a HTML table.
* A uniq column 'id' or '_id' (not shown) is mandatory and has to reflect an existing record id in table `primary table`.
* Additional columns, defined in `multiSql`, will be shown on the form in the same line, before the FormElements.
* Per row, the STORE_PARENT is filled with the current record of the primary table.
The following definition of *Simple* and *Advanced* is just for explanation, there is no *flag* or *mode* which
has to be set. Also the *Simple* and *Advanced* variant can be mixed in the same Multi Form.
Simple
^^^^^^
General:
* All FormElements uses columns of the primary table.
* QFQ handles all updates - that's why it's called *Simple*.
* It's not possible to create new records in simple mode, only existing records can be modified.
Form:
* Per row, the STORE_RECORD is filled with the whole record of the primary table, referenced
by `multiSql.id`.
FormElement:
* The FormElement.name represents a column of the defined primary table.
* The existing values of such FormElements are automatically loaded.
* No further definition is required.
* No further definition (sqlInsert, sqlUpdate, ...) is required.
Advanced
^^^^^^^^
......@@ -2630,6 +2644,37 @@ To handle foreign records (insert/update/delete), use the :ref:`slave-id` concep
Typically the `FormElement.name` is not a column of the primary table.
Example of how to edit the address of each person, saved in a separate address record::
# Iterate over all person in the database. If there are 10 persons in the table person, than 10 rows are shown.
Form.multiSql = {{!SELECT p.name, p.id AS _id FROM Person AS p}}
# Only one input field in this example: street. It's saved in table *Address*.
FE.name = myStreet
FE.type = text
# ``{{street:VE}}`` will be set via ``fillStoreVar``.
FE.value = {{street:VE}}
# Select the first address record owned by the current person.id = ``{{id:R}}`` ( or ``{{id:P}}``)
# Task 1: Get the ``slaveId`` (Address.id).
# Task 2: Get the value of column *street*.
FE.parameter.fillStoreVar={{!SELECT a.id AS aId, a.street FROM Address AS a WHERE a.personId={{id:R}} ORDER BY a.id LIMIT 1}}
# Set the slaveId. If there is no address, than {{aId:V}} doesn't exist and will be replaced by 0.
FE.parameter.slaveId={{aId:V0}}
# Update existing Address record.
FE.parameter.sqlUpdate={{UPDATE Address SET street='{{myStreet:FE:allbut}}' WHERE id={{slaveId:V}} }}
# Create new Address record.
FE.parameter.sqlInsert={{INSERT INTO Address (personId, street) VALUES ({{id:R0}}, '{{myStreet:FE:allbut}}') }}
# In case FE *myStreet* is empty, remove the whole Address record.
FE.parameter.sqlHonorFormElements = myStreet
FE.parameter.sqlDelete = {{DELETE FROM Address WHERE id={{slaveId:V}} }}
.. _multiple-languages:
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......@@ -235,6 +235,18 @@ Switch off the TLS encryption. In :ref:`configuration` specify for *config.sendE
-o tls=no
.. _`sendEmailSpaces`:
sendEmail: 'random' injected spaces
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If in emails unwanted spaces appear, please check that the body does not contain lines longer than 1000 characters.
The spaces will be inserted by the email system in such long lines and has nothing to do with QFQ.
In HTML mails, this
situation might happen if all newlines will be replaced by ``<br>``. To prevent this situation, QFQ will check for
``<br>`` (without newline) and add automatically a newline behind it. This applies only to email body texts.
.. _`javascriptProblem`:
Javascript problem
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......@@ -49,7 +49,7 @@ The following features are only tested / supported on linux hosts:
* Mime type detection for uploads - command `file`.
* Split PDF into JPG - command `convert`.
* Repair PDF - command `pdftocairo`.
* Convert HEIC/HEIF to png - command `heif-info` and `heif-convert`.
.. _`preparation`:
......@@ -69,7 +69,7 @@ Preparation for Ubuntu::
sudo apt install php-intl
# for file upload, PDF and 'HTML to PDF' (wkhtmltopdf), PDF split
sudo apt install poppler-utils libxrender1 file pdf2svg qpdf ghostscript img2pdf
sudo apt install poppler-utils libxrender1 file pdf2svg qpdf ghostscript img2pdf libheif-examples
sudo apt install inkscape imagemagick # to render thumbnails
.. _wkhtml:
......@@ -425,6 +425,10 @@ Extension Manager: QFQ Configuration
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cmdImg2pdf | img2pdf | PathFilename of img2pdf. Optional variables like LD_LIBRARY_PATH=... |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cmdHeifConvert | heif-convert | PathFilename of heif-convert. Optional variables like LD_LIBRARY_PATH=... .|
| | | During upload, HEIF/HEIC images will be silently converted to PNG. To |
| | | disable the conversion, leave the field blank. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| sendEMailOptions | -o tls=yes | General options. Check: http://caspian.dotconf.net/menu/Software/SendEmail |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| reportAsFileAutoExport | no | Auto export of qfq reports to files. See :ref:`reportAsFile` |
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......@@ -641,7 +641,7 @@ Summary:
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _exec | :ref:`column_exec` - Run batch files or executables on the webserver. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _script | :ref:`column_script` - Run php function defined in an external script |
| _script | :ref:`column_script` - Run php function defined in an external script. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _vertical | :ref:`column_vertical` - Render Text vertically. This is useful for tables with limited column width. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
......@@ -1899,7 +1899,7 @@ Output::
31.12.2019 23:55 / - / -
.. _qlugify:
.. _qslugify:
QSLUGIFY: clean a string
^^^^^^^^^^^^^^^^^^^^^^^^
......@@ -1915,6 +1915,71 @@ Output::
abcd-abcd-ae-a-oe-o-ue-u-z-z
.. _qent_squote:
QENT_SQUOTE: convert single tick to HTML entity &apos;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Convert all single ticks in a string to the HTML entity "&apos;"
Example::
10.sql = SELECT QENT_SQUOTE("John's car")
Output::
John&apos;s car
.. _qent_dquote:
QENT_DQUOTE: convert double tick to HTML entity &quot;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Convert all double ticks in a string to the HTML entity "&quot;"
Example::
10.sql = SELECT QENT_SQUOTE('A "nice" event')
Output::
A &quot;nice&quot; event
.. _qesc_squote:
QESC_SQUOTE: escape single tick
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Escape all single ticks with a backslash. Double escaped single ticks (two backslashes) will be replaced by a single
escaped single tick.
Example::
Be Music.style = "Rock'n' Roll"
10.sql = SELECT QESC_SQUOTE(style) FROM Music
Output::
Rock\'n\'n Roll
.. _qesc_dquote:
QESC_SQUOTE: escape double tick
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Escape all double ticks with a backslash. Double escaped double ticks (two backslashes) will replaced by a single
escaped double tick.
Example::
Set Comment.note = 'A "nice" event'
10.sql = SELECT QESC_DQUOTE(style) FROM Music
Output::
Rock\'n\'n Roll
.. _strip_tags:
strip_tags: strip html tags
......@@ -1951,6 +2016,7 @@ values.
* The output of a QFQ function is accessible via ``{{_output:R}}``.
* It is possible to call functions inside of a function.
* If ``render = api`` is defined in the function, both tt-content records can be saved on the *same* page and won't interfere.
* FE Groups are not respected - don't use them on QFQ functions.
Example tt-content record for the function::
......@@ -1962,11 +2028,12 @@ Example tt-content record for the function::
render = api
100 {
  sql = SELECT p.firstName AS _firstName
               , NOW() AS now, CONCAT('p:{{pageAlias:T}}&form=person&r=', p.id ) AS '_pagee|_hide|myLink'            
          FROM Person AS p
          WHERE p.id={{pId:R}}
}                       
sql = SELECT p.firstName AS _firstName
, NOW() AS now
, CONCAT('p:{{pageAlias:T}}&form=person&r=', p.id ) AS '_pagee|_hide|myLink'
FROM Person AS p
WHERE p.id={{pId:R}}
}
Example tt-content record for the calling report::
......@@ -1976,24 +2043,24 @@ Example tt-content record for the calling report::
#
10 {
  sql = SELECT p.id AS _pId, p.name FROM Person AS p ORDER BY p.name
  head = <table class="table"><tr><th>Name</th><th>Firstname</th><th>Link (final)</th><th>Link (source)</th><th>NOW() (via Output)</th></tr>
  tail = </table>
  rbeg = <tr>
  renr = </tr>
  fbeg = <td>
  fend = </td>
                                                                    
  20 {
    function = getFirstName(pId) => firstName, myLink    
  }
                                                                    
  30 {
    sql = SELECT '{{firstName:R}}', "{{myLink:R}}", "{{&myLink:R}}", '{{_output:R}}'
    fbeg = <td>
    fend = </td>
  }
}                                                                    
sql = SELECT p.id AS _pId, p.name FROM Person AS p ORDER BY p.name
head = <table class="table"><tr><th>Name</th><th>Firstname</th><th>Link (final)</th><th>Link (source)</th><th>NOW() (via Output)</th></tr>
tail = </table>
rbeg = <tr>
renr = </tr>
fbeg = <td>
fend = </td>
20 {
function = getFirstName(pId) => firstName, myLink
}
30 {
sql = SELECT '{{firstName:R}}', "{{myLink:R}}", "{{&myLink:R}}", '{{_output:R}}'
fbeg = <td>
fend = </td>
}
}
Explanation:
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
......@@ -16,7 +16,7 @@
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:downloadButton (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Images: .. image:: ../Images/a4.jpg
..
..
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment