├── lang
├── de_de.lang
└── en_en.lang
├── package.yml
├── boot.php
├── LICENSE
├── assets
├── css
│ └── frontend_edit.css
└── js
│ ├── frontend_edit.js
│ └── jquery-3.1.1.min.js
├── lib
├── frontend_edit.php
└── frontend_edit_abstract.php
└── README.md
/lang/de_de.lang:
--------------------------------------------------------------------------------
1 | accessdenied_blocked = gesperrt
2 |
3 | # Benennung für die Addonrechte, sichtbar innerhalb der REDAXO-Administration unter Benutzer > Rollen > Allgemein
4 |
5 | perm_general_accessdenied[] = Recht Für Accessdenied-AddOn
6 |
--------------------------------------------------------------------------------
/lang/en_en.lang:
--------------------------------------------------------------------------------
1 | accessdenied_blocked = blocked
2 |
3 | # Benennung für die Addonrechte, sichtbar innerhalb der REDAXO-Administration unter Benutzer > Rollen > Allgemein
4 |
5 | perm_general_accessdenied[] = Rights for accessdenied Addon
6 |
--------------------------------------------------------------------------------
/package.yml:
--------------------------------------------------------------------------------
1 | package: frontend_edit
2 | version: '1.0.0-alpha1'
3 | author: FriendsOfREDAXO
4 | supportpage: github.com/FriendsOfREDAXO/frontend_edit
5 |
6 | requires:
7 | packages:
8 | structure: '^2.1.0'
9 | redaxo: '^5.1.0'
10 | php:
11 | version: '>=5.6'
12 |
--------------------------------------------------------------------------------
/boot.php:
--------------------------------------------------------------------------------
1 | isAdmin()) {
11 |
12 | rex_extension::register('PACKAGES_INCLUDED', array('frontend_edit', 'init'), rex_extension::LATE);
13 |
14 | rex_extension::register('ART_INIT', function (rex_extension_point $ep) {
15 | $article = $ep->getParam('article');
16 | //$article->setSliceRevision($version);
17 | if ($article instanceof rex_article_content) {
18 | $article->getContentAsQuery();
19 | }
20 | $article->setEval(true);
21 | });
22 |
23 | rex_extension::register('OUTPUT_FILTER', ['frontend_edit', 'outputFilter'], rex_extension::LATE);
24 | }
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Friends Of REDAXO
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/assets/css/frontend_edit.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin-top: 35px;
3 | }
4 | rex-frontend-edit, rex-frontend-edit-inner {
5 | display: none;
6 | }
7 |
8 | rex-frontend-edit.initialized {
9 | }
10 |
11 | rex-frontend-edit.initialized.rfe-buttons-visible {
12 | display: block;
13 | }
14 |
15 | rex-frontend-edit {
16 | position: absolute;
17 | margin: 0;
18 | z-index: 99999;
19 | background: #2e8f75;
20 | opacity: .5;
21 | min-width: 150px;
22 | box-shadow: 1px 1px 2px #000;
23 | }
24 |
25 | rex-frontend-edit:hover {
26 | opacity: 1;
27 | }
28 |
29 | rex-frontend-edit a {
30 | color: #fff;
31 | display: block;
32 | padding: 10px;
33 | }
34 |
35 | rex-frontend-edit-toolbar {
36 | position: fixed;
37 | top: 0;
38 | left: 0;
39 | z-index: 999999;
40 | width: 100%;
41 | height: 35px;
42 | background: #2e8f75;
43 | opacity: 1;
44 | }
45 |
46 | rex-frontend-edit-toolbar:hover {
47 | opacity: 1;
48 | }
49 |
50 | .rex-frontend-edit-toolbar-inner {
51 | color: #fff;
52 | padding: 0px 20px;
53 | position: absolute;
54 | top: 50%;
55 | transform: translateY(-50%);
56 | }
57 |
58 | .rfe-title {
59 | font-weight: bold;
60 | text-transform: uppercase;
61 | display: inline-block;
62 | }
63 |
64 | .rfe-title span:first-child {
65 | color: #d76f8a;
66 | }
67 |
68 | .rfe-title span:last-child {
69 | color: #fff;
70 | }
71 |
72 | .rex-frontend-edit-toolbar-inner ul {
73 | list-style: none;
74 | display: block;
75 | display: inline-block;
76 | margin-left: 50px;
77 | }
78 |
79 | .rex-frontend-edit-toolbar-inner ul li {
80 | list-style-type: none;
81 | display: inline-block;
82 | margin-left: 20px;
83 | cursor: pointer;
84 | }
85 |
86 | .rex-frontend-edit-toolbar a {
87 | color: #fff;
88 | }
89 |
--------------------------------------------------------------------------------
/lib/frontend_edit.php:
--------------------------------------------------------------------------------
1 | getSubject();
29 | $params = $ep->getParams();
30 |
31 |
32 | $module = rex_sql::factory();
33 | $module->setQuery('SELECT name FROM ' . rex::getTable('module') . ' WHERE id = ' . $params['module_id']);
34 |
35 | $slice_content = 'Block: ' . $module->getValue('name') . ' bearbeiten'.$subject;
43 |
44 | $ep->setSubject(trim($slice_content));
45 | }
46 |
47 | public static function outputFilter(rex_extension_point $ep)
48 | {
49 | $content = $ep->getSubject();
50 |
51 | // CSS-First in den head einbinden
52 | $before_head = '';
53 | $content = str_replace('', $before_head . '', $content);
54 |
55 | $before_body= '';
59 | $content = str_replace('