Commit Graph

187 Commits

Author SHA1 Message Date
Andy Miller
1b97769ea5 Logout is one step now 2017-12-01 16:08:52 -07:00
Andy Miller
96469b673e Remove admin pro dependency 2017-09-25 17:10:54 -06:00
Andy Miller
fb24c95952 Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop 2017-08-31 12:46:56 -06:00
Andy Miller
4311b80eec minor improvements 2017-08-31 12:46:51 -06:00
Matias Griese
49a93e9897 Fixed administration being broken in multi-site environments with plugin overrides 2017-08-30 19:09:06 +03:00
Andy Miller
2f94c936ad Merge branch 'feature/simple-icon-picker' into develop
# Conflicts:
#	themes/grav/js/admin.min.js
#	themes/grav/js/vendor.min.js
2017-08-15 16:00:25 -06:00
Flavio Copes
05a6abd794 If a form is already defined, do not override it (#1132)
Preserves form validation re
https://github.com/getgrav/grav-plugin-admin/issues/1129
2017-07-25 18:54:58 -06:00
Flavio Copes
c227963540 Pick FA icons from yaml file
To update icons: dump the content of
https://rawgit.com/FortAwesome/Font-Awesome/master/src/icons.yml in
`themes/grav/templates/forms/fields/iconpicker/icons.yaml`
2017-07-14 17:42:20 +02:00
Dávid Szabó
ee2051eba6 Feature/page types events (#1105)
* Add function which replaces types and modularTypes

* Replace Pages statics with AdminPlugin statics

* Use Event's built-in items rather than data member

* Add configration for hiding page types
2017-06-27 12:43:12 -06:00
Andy Miller
fe6ecf4805 Fix for bad referenced to shouldLoadAdditionalFilesInBackground() #1145 2017-06-23 10:32:00 -06:00
Djamil Legato
dbdd6e2a45 Added info metadata button for preview images. Fixed preview of images 2017-06-21 17:55:33 -07:00
Flavio Copes
09f4d2b791 Fix #1141 referencing DI element when not initialized 2017-06-21 15:50:31 +02:00
Flavio Copes
f700837e92 Introduce the mediapicker field (#1125)
Added a new `mediapicker` form field which allows to select a media from any page
+ 
Provided an option to control how parent select field displays
2017-06-02 16:28:52 +02:00
Andy Miller
98897ad766 Revert "Bugfix: Save in wrong lang when multiple tabs open (#1101)"
This reverts commit 424e8400f9.
2017-05-10 15:20:47 -06:00
David Côté-Tremblay
424e8400f9 Bugfix: Save in wrong lang when multiple tabs open (#1101)
* Bugfix: Save in wrong lang when multiple tabs open

English and french in this PR are used only for example purposes.

When you have multiple tabs opened in different languages, it often cause to ovewrite the french contents with the english contents (or vice-versa, or according to your specific language configuration).

How to reproduce the bug :

1. Open a tab and edit a page in french
2. In another tab, open the same page in english then save
3. Return to the french tab and save
4. **The english contents got overwrited by the french contents**

This patch makes the use of the language code in URL instead of the session when editing a page, preventing to overwrite the contents of another page while power-editing with many tabs in different languages.

* Remove unused scopes about the session language
2017-05-06 11:01:31 -06:00
Andy Miller
46afadf5d4 Use new password and username regex from grav system config
# Conflicts:
#	CHANGELOG.md
2017-04-14 11:31:19 -06:00
Andy Miller
1bb1f378ed Initialize dynamic page forms properly 2017-04-14 11:27:44 -06:00
Flavio Copes
a1f5970a9c Fix misleading comment #1058 2017-04-11 09:47:12 +02:00
Djamil Legato
dfeb7c5c4a Initial impelementation of "View" item for pagemedia cards (#1010) 2017-03-08 17:05:08 -08:00
Andy Miller
8a84626935 Fixed issue with admin page using default expires, now forces 0 #1009 2017-03-08 15:36:28 -07:00
Flavio Copes
c7256134ba [WORK IN PROGRESS] First draft of a Tools menu with direct install (#990)
* First draft of a Tools menu with direct install

* Basic styling

* Translate GPM messages

* Basic frontend validation

* Fix form action path

* Added lang strings for offical_gpm_only toggle
2017-02-22 13:34:21 -07:00
Andy Miller
810a263544 Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop 2017-02-16 15:03:36 -07:00
Andy Miller
b849f040f1 Moved GPM get updates to standard method 2017-02-16 15:03:30 -07:00
Flavio Copes
799f13bdfb Fix #965 issue with quotes in Admin strings used in JS 2017-02-13 18:55:01 +01:00
Flavio Copes
508887e3e2 Remove cli-server exception since we now have compatibility with a custom router https://github.com/getgrav/grav/pull/1219 2016-12-17 15:11:12 +01:00
Flavio Copes
5966ed99e5 Add permissions field (don't merge yet) (#850)
* Add permissions field

* Add new PERMISSIONS string, compile SCSS
2016-11-28 19:01:01 +01:00
Andy Miller
f361addd60 Feature/admin fragmentation (#856)
* Separated Admin Controller into a generic and extendable Base controller. Added Autoload for properly loading classes

* Implemented custom class loader to force lowercase

* Removed composer autoloader for classes

* Updates

* Ability to pass custom upload URL for files

* Added new onAdminCanSave event for 3rd party plugins

* Moved files upload GC in onOutputGenerated event

* Cleanup

* Moved autoloader so it is always registering

* Fixed onOutputGenerated event location

* Moved `taskRemoveFileFromBlueprint`,  `taskRemoveMedia `, `canEditMedia` methods to admin base controller

* Allow to globally define `blueprint_type` and `file_url_remove` for the file field

* Moved `isMultilang()` into base controller

* Properly generate thumbnails in proportions for file fields

* Simplified execute restrictions with blacklist
2016-11-07 09:54:10 -07:00
Andy Miller
f13bd7983d Added new Admin cache_enabled option independent of main site. 2016-09-29 18:14:08 -06:00
Matias Griese
8e5720f7b9 Improve multi-site support 2016-09-27 18:21:11 +03:00
Flavio Copes
e7ca469167 Fixed composer dependencies missing error message 2016-09-06 15:42:36 +02:00
Djamil Legato
6b34336599 [WIP] Ajax Files Upload (#748)
* Reworked the `file` field. All files get uploaded via Ajax and are stored upon Save

This improves the Save task tremendously as now there is no longer the need of waiting for the files to finish uploading. Fully backward compatible, `file` field now includes also a `limit` and `filesize` option in the blueprints. The former determines how many files are allowed to be uploaded when in combination with `multiple: true` (default: 10), the latter determines the file size limit (in MB) allowed for each file (default: 5MB)

* Added support for `accept: [‘*’]` to allow any file type

* Minor tweaks in the comments and messages

* Delete any orphan file when discarding the uploaded files session

* Minor optimization

* Fixed issue with `_json` elements where nested fields merging would get stored in an unexpected way

* Potential fix for wrong order of value in Datetime

* Fixed nested fields for files

* Fixed tmp streams

* Minor cleanup

* Update JSON data when removing a file. Implemented task to remove files that haven’t been saved yet, from the flash object session

* Ensure temporary files are deleted when removing un-saved files from the flash object session

* Fixed wrong reference of HTML file field when clicking on the drop zone area to pick a file

* Added JSON template for pages

* fix a CSS issue in page order

* More CSS fixes

* Trigger file field mutation when adding or removing a file

* Recompiled JS

* Removed twig templates that are no longer needed

* Fixed issue with nested header fields in a page, not properly merging data

* [internal] Fixed issue with collections not capable of handling both param and dot notations at the same time

* Reorganized FileField structure to be more consistent with the other fields

* Added support for dynamically created file fields (ie, autoinitialization on new lists items)

* Added translationable strings for file uploads errors

* Added translasions for all Dropzone available strings

* Changed default values
2016-08-29 11:12:09 -07:00
Flavio Copes
988f4a0389 [WIP] Notifications (#599)
Adds a new notifications feature to the Admin plugin. It will now lookup notifications which are set up on getgrav.org and will inform users, and also alert for new updates and provide awareness on various topics.

Also fixes issue with Array field in `value_only` mode, improperly displaying the key when novalue was set, and fixes issue with drag handlers in Array not showing/hiding properly (#950)

Updated FontAwesome to 4.6.3
2016-08-11 19:17:02 +02:00
Flavio Copes
b159581156 Avoid overwriting a file when uploaded with the same filename through the Admin blueprint file type 2016-08-02 16:22:20 +02:00
Flavio Copes
d233220726 Prepend / to theme_url variable 2016-07-15 17:39:13 +02:00
Andy Miller
5b4b1577e8 Fix for preview escaping when it shouldn't 2016-07-14 11:28:08 -06:00
Flavio Copes
1c19190929 Lint 2016-07-07 18:55:52 +02:00
Flavio Copes
99bc525095 Translate some missing string, fix #629 2016-06-10 15:10:24 +02:00
Andy Miller
96562e5692 This does not appear to be used as $this->pages in admin.php does not exist 2016-06-02 17:28:20 -06:00
Andy Miller
08c5a6c3d0 Missed a reference that needed updating to media.types 2016-06-02 14:56:13 -06:00
Flavio Copes
5738616647 Fix #569 translate page filters 2016-05-06 18:17:26 +02:00
Andy Miller
b5a651eca9 added onAdminRegisterPermissions event 2016-05-04 14:26:27 -06:00
Flavio Copes
cb16c429e6 Fix #556 translate email buttons titles 2016-05-04 14:57:40 +02:00
Flavio Copes
38d3a70cb7 Fix #539 "Drop files here to upload" text not translated. Also translate Insert and Delete buttons 2016-05-03 11:10:54 +02:00
Andy Miller
5c95964052 Better way to get plugin version 2016-04-26 12:57:29 -06:00
Andy Miller
59dbec5371 updated message 2016-04-26 12:42:16 -06:00
Andy Miller
99aaebdf1a version update with version notice 2016-04-26 12:10:56 -06:00
Flavio Copes
c56c2103aa Add a message if installed on Grav < 1.1.0-beta.1 2016-04-26 18:53:13 +02:00
Flavio Copes
42e35746f8 Use $this->grav['user']->authenticated to determine if user is logged in 2016-04-21 15:10:02 +02:00
Oscar Recio
b180e13e8e If user not logged in redirect to base path (#445)
Solved problem when  user not logged in can go to admin/something and view admin dashboard with Error 404.
2016-04-21 15:08:37 +02:00
Andy Miller
cdf4a4b0e8 Set cache key uniquely for admin to not colide with site. 2016-04-14 15:28:48 -06:00