-
Notifications
You must be signed in to change notification settings - Fork 199
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
Fixes notification width on Students page #5278
base: trunk
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -105,7 +105,6 @@ public function __construct( $file ) { | |
add_action( 'wp_ajax_remove_user_from_post', array( $this, 'remove_user_from_post' ) ); | ||
add_action( 'wp_ajax_reset_user_post', array( $this, 'reset_user_post' ) ); | ||
add_action( 'wp_ajax_sensei_json_search_users', array( $this, 'json_search_users' ) ); | ||
|
||
// Add custom navigation. | ||
add_action( 'in_admin_header', [ $this, 'add_custom_navigation' ] ); | ||
} | ||
|
@@ -123,7 +122,7 @@ public function add_custom_navigation() { | |
if ( ! $screen ) { | ||
return; | ||
} | ||
|
||
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 think the empty space here makes the linter angry. 😄 Could you remove it? |
||
if ( in_array( $screen->id, [ 'course_page_sensei_learners' ], true ) && ( 'term' !== $screen->base ) ) { | ||
$this->display_students_navigation( $screen ); | ||
} | ||
|
@@ -136,17 +135,18 @@ public function add_custom_navigation() { | |
*/ | ||
private function display_students_navigation( WP_Screen $screen ) { | ||
?> | ||
<div id="sensei-custom-navigation" class="sensei-custom-navigation"> | ||
<div class="sensei-custom-navigation__heading-with-info"> | ||
<div class="sensei-custom-navigation__title"> | ||
<h1><?php esc_html_e( 'Students', 'sensei-lms' ); ?></h1> | ||
<div id="sensei-custom-navigation" class="sensei-custom-navigation"> | ||
<div class="sensei-custom-navigation__heading-with-info"> | ||
<div class="sensei-custom-navigation__title"> | ||
<h1><?php esc_html_e( 'Students', 'sensei-lms' ); ?></h1> | ||
</div> | ||
<div class="sensei-custom-navigation__separator"></div> | ||
<a class="sensei-custom-navigation__info" target="_blank" href="https://senseilms.com/documentation/student-management?utm_source=plugin_sensei&utm_medium=docs&utm_campaign=student-management"> | ||
<?php echo esc_html__( 'Guide To Student Management', 'sensei-lms' ); ?> | ||
</a> | ||
</div> | ||
<div class="sensei-custom-navigation__separator"></div> | ||
<a class="sensei-custom-navigation__info" target="_blank" href="https://senseilms.com/documentation/student-management?utm_source=plugin_sensei&utm_medium=docs&utm_campaign=student-management"> | ||
<?php echo esc_html__( 'Guide To Student Management', 'sensei-lms' ); ?> | ||
</a> | ||
<hr class="wp-header-end"> | ||
Comment on lines
+138
to
+148
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. What do you think of moving the
Let me know if you have other ideas! |
||
</div> | ||
</div> | ||
<?php | ||
} | ||
|
||
|
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.
My suggestion here would be to keep the previous code, because I think it would be better to move the notifications outside of the navigation. That way we won't have to account for them being there. See the next comments for more info.
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.
Forgot to mention that the grid view changes how the navigation looks on the other screen (some of the spacing is missing), but we won't have to worry about that if we decide to move the notifications outside.