-
Notifications
You must be signed in to change notification settings - Fork 34
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
Move playlist notice and add check for other notices #371
Changes from 1 commit
4bb58c1
ccd4006
f429f15
289f4cf
3054350
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,23 @@ public function __construct() { | |
* Adds all templates for Backbone application | ||
*/ | ||
public function add_templates() { | ||
?> | ||
global $pagenow; ?> | ||
|
||
<?php /* Used by views/media-manager.js */ ?> | ||
<script type="text/html" id="tmpl-brightcove-media"> | ||
<div id="brightcove-media-frame-router" class="brightcove media-frame-router"></div> | ||
<?php if ( 'admin.php' === $pagenow ) : ?> | ||
<div class="brightcove brightcove-notices"> | ||
<# if( data.mediaType === 'playlists' ) { #> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Please note that you can create new playlists only from Brightcove.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<# } #> | ||
</div> | ||
<?php endif; ?> | ||
<div id="brightcove-media-frame-router" class="brightcove media-frame-router"> | ||
</div> | ||
<div class="brightcove-message message hidden"></div> | ||
<div id="brightcove-media-frame-content" class="brightcove media-frame-content"> | ||
<span id="js-media-loading" class="spinner"></span> | ||
|
@@ -1275,34 +1287,37 @@ class="brightcove-datetime brightcove-end-date" | |
<# }); #> | ||
</select> | ||
<# }#> | ||
<?php if ( in_array( $pagenow, array( 'post.php', 'post-new.php' ), true ) ) : ?> | ||
<# if( data.mediaType === 'videoexperience' ) { #> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Please note that you can create new Experiences only from Brightcove.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Leave videos unselected for default Experience behavior.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<# } #> | ||
|
||
<# if( data.mediaType === 'videoexperience' ) { #> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Please note that you can create new Experiences only from Brightcove.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Leave videos unselected for default Experience behavior.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<# } #> | ||
|
||
<# if ( data.mediaType === 'playlistexperience' ) { #> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Please note that you can create new Experiences only from Brightcove.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<# } #> | ||
|
||
<# if( data.mediaType === 'playlists' || data.mediaType === 'playlistexperience' ) { #> | ||
<# if ( data.mediaType === 'playlistexperience' ) { #> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Please note that you can create new playlists only from Brightcove.', 'brightcove' ); ?> | ||
<?php esc_html_e( 'Please note that you can create new Experiences only from Brightcove.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<# } #> | ||
|
||
<# if( data.mediaType === 'playlists' || data.mediaType === 'playlistexperience' ) { #> | ||
<div class="notice notice-warning"> | ||
<p> | ||
<?php esc_html_e( 'Please note that you can create new playlists only from Brightcove.', 'brightcove' ); ?> | ||
</p> | ||
</div> | ||
<# } #> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand this one, @MARQAS. If you are testing for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @felipeelia, this was already present, I just moved them. I believe it is there for a reason, There are two different sections, one is to add a Playlist, and the other one is to add a Playlist experience. So it tells the user in the playlist experience section, that you cannot add a new playlist and also you cannot add the new experiences from here as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Between lines 1292 and 1319 we have 3 ifs, all of them testing
Do you think that makes sense from the user's perspective? Were you able to reproduce that specific scenario? |
||
<?php endif; ?> | ||
<# if( data.mediaType === 'playlists' || data.mediaType === 'playlistexperience' ) { #> | ||
<p> | ||
<input type="checkbox" name="brightcove-empty-playlists" id="brightcove-empty-playlists" class="brightcove-empty-playlists attachment-filters"> | ||
<label for="brightcove-empty-playlists"><?php esc_html_e( 'Hide Empty Playlists', 'brightcove' ); ?></label> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.