Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce the mediapicker field #1125

Merged
merged 32 commits into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4c4b166
Move common media functionality from pro
flaviocopes May 26, 2017
b406a11
Merge media picker changes
flaviocopes May 26, 2017
7502ab5
Merge media picker changes
flaviocopes May 26, 2017
0c01d64
Fix filters
flaviocopes May 26, 2017
69ae3e0
Remove unused twig
flaviocopes May 26, 2017
c7ec4f8
Fix svg thumb
flaviocopes May 26, 2017
5f204e8
Various fixes and improvements
rhukster May 26, 2017
a555c4a
Added the resizer
rhukster May 26, 2017
7e103ca
slider is real-time
rhukster May 26, 2017
a9182e1
Updates to use non @2 name in filename
rhukster May 26, 2017
c046550
Add metadata to medialist + cleanup
rhukster May 26, 2017
d3d80e9
Fix regex to delete all files it should
rhukster May 27, 2017
fac0dee
And in remove media
rhukster May 27, 2017
1b4b941
cleanup
rhukster May 27, 2017
97cf523
lower any mimetypes
rhukster May 27, 2017
cbe3384
Fix token issue caused by nested form
flaviocopes May 29, 2017
e4532e1
Fix empty space, center and make it load once. Moved resize to the ri…
flaviocopes May 29, 2017
472d27b
recompiled stuff
rhukster May 29, 2017
fcbc2ed
Added option to control how parents select displays
rhukster May 29, 2017
50464b4
Updated changelog
rhukster May 29, 2017
d60c2b4
Fill view with media, add infinite loading
flaviocopes May 30, 2017
3613315
Merge branch 'feature/common-media-functionality' of https://github.c…
flaviocopes May 30, 2017
9e010b5
Fix loading all assets when going from page to all media
flaviocopes May 30, 2017
85c94ef
Fix page
flaviocopes May 31, 2017
15cb9c6
Fix pagination
flaviocopes May 31, 2017
bfa5cda
Fix infinite loading when date/type filters are activated and then re…
flaviocopes May 31, 2017
af73f4f
Add number of media in date filter
flaviocopes May 31, 2017
2798aa1
Show month names instead of number
flaviocopes May 31, 2017
1b39ccf
Set pagination to 20
flaviocopes May 31, 2017
27899aa
Fix issue when tot files < pagination interval
flaviocopes May 31, 2017
a05ae36
Merge branch 'develop' into feature/common-media-functionality
flaviocopes Jun 2, 2017
45fd5ff
Changelog
flaviocopes Jun 2, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# v1.5.0-rc.3
## 05/xx/2017

1. [](#new)
* Added a new `mediapicker` form field which allows to select a media from any page [#1125](https://github.com/getgrav/grav-plugin-admin/pull/1125)
1. [](#improved)
* Various form styling improvements
* Provided an option to control how parent select field displays

# v1.5.0-rc.2
## 05/22/2017
Expand All @@ -14,7 +17,7 @@
* Use new unified `Utils::getPagePathFromToken()` method rather
1. [](#bugfix)
* Fix for undefined `include_metadata` error


# v1.5.0-rc.1
## 05/16/2017
Expand Down
21 changes: 20 additions & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ public static function getSubscribedEvents()
{
if (!Grav::instance()['config']->get('plugins.admin-pro.enabled')) {
return [
'onPluginsInitialized' => [['setup', 100000], ['onPluginsInitialized', 1001]],
'onPluginsInitialized' => [
['setup', 100000],
['onPluginsInitialized', 1001]
],
'onPageInitialized' => ['onPageInitialized', 0],
'onShutdown' => ['onShutdown', 1000],
'onFormProcessed' => ['onFormProcessed', 0],
'onAdminDashboard' => ['onAdminDashboard', 0],
Expand All @@ -95,6 +99,17 @@ public static function getSubscribedEvents()
return [];
}

public function onPageInitialized()
{
$page = $this->grav['page'];

$template = $this->grav['uri']->param('tmpl');

if ($template) {
$page->template($template);
}
}

/**
* If the admin path matches, initialize the Login plugin configuration and set the admin
* as active.
Expand Down Expand Up @@ -516,6 +531,10 @@ public function onShutdown()
$this->popularity->trackHit();
}
}

if ($this->grav['admin']->shouldLoadAdditionalFilesInBackground()) {
$this->grav['admin']->loadAdditionalFilesInBackground();
}
}

/**
Expand Down
2 changes: 2 additions & 0 deletions admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ widgets:
dashboard-notifications: true
dashboard-feed: true
dashboard-pages: true
pages:
show_parents: both
session:
timeout: 1800
warnings:
Expand Down
10 changes: 10 additions & 0 deletions blueprints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ form:
frontend_tab: Separate tab (always the same)
_self: Current tab

pages.show_parents:
type: select
size: medium
label: Parent dropdown
highlight: 1
options:
both: Show slug and folder
folder: Show folder
fullpath: Show fullpath

google_fonts:
type: toggle
label: Use Google Fonts
Expand Down
2 changes: 2 additions & 0 deletions blueprints/config/media.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ form:
.mime:
type: text
label: PLUGIN_ADMIN.MIME_TYPE
validate:
type: lower
.image:
type: textarea
yaml: true
Expand Down
Loading