diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-01-08 02:17:18 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-01-08 02:17:18 +0100 |
commit | e7747bf975a8523be7756a71d1b5166f5229363b (patch) | |
tree | 74e69eebf29c7c963a8ef36d3aed4d0470a3cbdd | |
parent | 4b30e32dba3a53f02f2c5b5360ed73d1a023a5df (diff) | |
download | wcms-e7747bf975a8523be7756a71d1b5166f5229363b.tar.gz wcms-e7747bf975a8523be7756a71d1b5166f5229363b.zip |
mini help
-rw-r--r-- | app/class/art2.php | 18 | ||||
-rw-r--r-- | app/view/templates/edithelp.php | 50 | ||||
-rw-r--r-- | app/view/templates/editleftbar.php | 10 | ||||
-rw-r--r-- | app/view/templates/editrightbar.php | 2 | ||||
-rw-r--r-- | assets/css/edit.css | 30 |
5 files changed, 73 insertions, 37 deletions
diff --git a/app/class/art2.php b/app/class/art2.php index b6311c0..474531b 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -24,8 +24,6 @@ class Art2 protected $renderhead; protected $renderbody; protected $secure; - protected $invitepassword; - protected $readpassword; protected $interface; protected $linkfrom; protected $linkto; @@ -37,6 +35,7 @@ class Art2 protected $thumbnail; protected $authors; protected $invites; + protected $readers; protected $affcount; protected $editcount; @@ -98,8 +97,6 @@ class Art2 $this->setrenderhead(''); $this->setrenderbody(''); $this->setsecure(3); - $this->setinvitepassword('invitepassword'); - $this->setinvitepassword('readpassword'); $this->setinterface('main'); $this->setlinkfrom([]); $this->setlinkto([]); @@ -111,6 +108,7 @@ class Art2 $this->setthumbnail(''); $this->setauthors([]); $this->setinvites([]); + $this->setreaders([]); $this->setaffcount(0); $this->seteditcount(0); } @@ -420,6 +418,11 @@ class Art2 return $this->invites; } + public function readers($type = 'array') + { + return $this->invites; + } + public function affcount($type = 'int') { return $this->affcount; @@ -716,6 +719,13 @@ class Art2 } } + public function setreaders($readers) + { + if(is_array($readers)) { + $this->readers = array_values(array_filter($readers)); + } + } + public function setaffcount($affcount) { if (is_int($affcount)) { diff --git a/app/view/templates/edithelp.php b/app/view/templates/edithelp.php index d01f3aa..ff0ade5 100644 --- a/app/view/templates/edithelp.php +++ b/app/view/templates/edithelp.php @@ -1,27 +1,25 @@ - <h2>Help !</h2> - <p>To save your article, press the HOME, UPDATE, or DISPLAY buttons. You can use the keyboard shortcuts as well.</p> - <pre><span class="i">ALT + W</span> : home</pre> - <pre><span class="i">ALT + X</span> : update</pre> - <pre><span class="i">ALT + C</span> : display</pre> - <h3>Markdown</h3> - <p>The html main use <a href="https://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown encoding</a>. Actualy, W is using Michel Fortin's <a href="https://michelf.ca/projects/php-markdown/extra/" target="_blank">Markdown Extra</a>.</p> - <h3>Links</h3> - <pre>[text](=<span class="i">article_id</span>)</pre> - <p>where article_id is the article's id you want to point to.</p> - <h3>Images</h3> - <pre>[altimage](/<span class="i">img_id.extension</span>)</pre> - <p>Where img_id is the id of your image and its extension.</p> - <h3>Shortcuts</h3> - <pre>%TITLE%</pre> - <p>Show the title of your article.</p> - <pre>%DESCRIPTION%</pre> - <p>Show the description of your article.</p> - <pre>%SUMMARY%</pre> - <p>Generate a <strong>summary</strong>, the list of all your head titles using #, ##, ###...</p> - <pre>%%<span class="i">tag_name</span>%%</pre> - <p>Generate a <strong>menu</strong>, a list of links to all articles under this tag.</p> - <p>vv</p> - <p>vv</p> - <p>vv</p> - <p></p>
\ No newline at end of file + <h4>update shortcut</h4> + <kbd>ALT</kbd> + <kbd>X</kbd> + <h4>Synthax</h4> + <p> + 📏<a href="https://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown encoding</a> + </br> + 📐<a href="https://michelf.ca/projects/php-markdown/extra/" target="_blank">Markdown Extra</a></i> + </p> + <ul> + <li><code>[<i>hello</i>](<i>PAGE_ID</i>)</code>link</li> + <li><code>[<i>PAGE_ID</i>]</code>quick link</li> + <li><code>%TITLE%</code>page title</li> + <li><code>%DESCRIPTION%</code>page desc'</li> + <li><code>%DATE%</code>date of page</li> + <li><code>%TIME%</code>time of page</li> + <li><code>%SUMMARY%</code>Summary</li> + <li><code>===<i>article</i></code>article separator</li> + <li><code>%TAG:<i>tag</i>%</code>page list by <i>tag</i></li> + <li><code>%MEDIA:<i>dir</i>%</code>media list</li> + </ul> + + <h4>More infos</h4> + + <a href="<?= $this->url('info') ?>" target="_blank">📕 Manual</a>
\ No newline at end of file diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index 3cc747a..7a2a40b 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -182,12 +182,12 @@ </fieldset> </details> - <details> + <details id="help"> <summary>Help</summary> - <div id="help"> - <?php $this->insert('edithelp') ?> - - </div> + <div> + <?php $this->insert('edithelp') ?> + </div> + </details> </div> diff --git a/app/view/templates/editrightbar.php b/app/view/templates/editrightbar.php index e42cdf1..a081aac 100644 --- a/app/view/templates/editrightbar.php +++ b/app/view/templates/editrightbar.php @@ -80,7 +80,7 @@ <label for="invites">Invites editors</label> <select name="invites[]" id="invites"> - <option value="" selected>--select invite user--</option> + <option value="" selected>--add invite user--</option> <?php $newinviteuserlist = array_diff($inviteuserlist, $art->invites()); foreach ($newinviteuserlist as $inviteuser) { diff --git a/assets/css/edit.css b/assets/css/edit.css index e9283b5..be812a3 100644 --- a/assets/css/edit.css +++ b/assets/css/edit.css @@ -266,6 +266,33 @@ form#update { text-overflow: ellipsis; } +#help kbd { + border: 1px solid; + padding: 3px 6px; + background-color: lightgrey; + box-shadow: 3px 3px #00000087; +} + +#help div { + padding: 2%; +} + +#help code { + background-color: #1b1b1b; + color: white; + padding: 2px; + margin-right: 5px; +} + +#help code i { + color: #7b97b9; +} + + +#help li { + margin-bottom: 8px; +} + @media (max-width: 600px) { .bar { display: none; @@ -279,4 +306,5 @@ form#update { display: none; } -}
\ No newline at end of file +} + |