Skip to content

Commit beee953

Browse files
committed
move admin menu & admin bar notices to sidebar metabox
1 parent 03552f5 commit beee953

File tree

5 files changed

+192
-145
lines changed

5 files changed

+192
-145
lines changed

assets/css/admin.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,22 @@
1010
*/
1111
#adminmenu #menu-posts-udb_widgets a[href="https://ultimatedashboard.io/pro/"] {
1212
color: #47D87C;
13+
}
14+
15+
/**
16+
* Notices for metabox.
17+
*/
18+
.udb-notice-metabox.is-success {
19+
border-left-width: 4px;
20+
border-left-color: #00a32a;
21+
}
22+
23+
.udb-notice-metabox.is-warning {
24+
border-left-width: 4px;
25+
border-left-color: #dba617;
26+
}
27+
28+
.udb-notice-metabox.is-info {
29+
border-left-width: 4px;
30+
border-left-color: #72aee6;
1331
}

modules/admin-bar/assets/css/admin-bar.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,16 @@
1515
}
1616
}
1717

18+
.udb_widgets_page_udb_admin_bar .heatbox-main {
19+
width: 68%;
20+
}
21+
22+
.udb_widgets_page_udb_admin_bar .heatbox-sidebar {
23+
width: 30%;
24+
}
25+
1826
.udb-admin-bar-box {
19-
max-width: 700px;
27+
/* max-width: 700px; */
2028
}
2129

2230
.udb-admin-bar-box .is-hidden {

modules/admin-bar/templates/template.php

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -55,65 +55,70 @@
5555
</div>
5656

5757
<div class="heatbox-container heatbox-container-center">
58-
5958
<h1 style="display: none;"></h1>
59+
</div>
6060

61-
<?php if ( ! udb_is_pro_active() ) : ?>
61+
<div class="heatbox-container heatbox-container-center heatbox-column-container">
62+
<div class="heatbox-main">
63+
<?php if ( ! udb_is_pro_active() ) : ?>
6264

63-
<div class="udb-pro-admin-bar-nag">
64-
<p><?php _e( 'This feature is available in Ultimate Dashboard PRO.', 'ultimate-dashboard' ); ?></p>
65-
<a href="https://ultimatedashboard.io/pro/?utm_source=plugin&utm_medium=admin_bar_link&utm_campaign=udb" class="button button-large button-primary" target="_blank">
66-
<?php _e( 'Get Ultimate Dashboard PRO', 'ultimate-dashboard' ); ?>
67-
</a>
68-
</div>
65+
<div class="udb-pro-admin-bar-nag">
66+
<p><?php _e( 'This feature is available in Ultimate Dashboard PRO.', 'ultimate-dashboard' ); ?></p>
67+
<a href="https://ultimatedashboard.io/pro/?utm_source=plugin&utm_medium=admin_bar_link&utm_campaign=udb" class="button button-large button-primary" target="_blank">
68+
<?php _e( 'Get Ultimate Dashboard PRO', 'ultimate-dashboard' ); ?>
69+
</a>
70+
</div>
6971

70-
<?php endif; ?>
72+
<?php endif; ?>
7173

72-
<?php do_action( 'udb_admin_bar_before_form' ); ?>
74+
<?php do_action( 'udb_admin_bar_before_form' ); ?>
7375

74-
<form action="options.php" method="post" class="udb-admin-bar--edit-form">
76+
<form action="options.php" method="post" class="udb-admin-bar--edit-form">
7577

76-
<div class="heatbox udb-admin-bar-box">
78+
<div class="heatbox udb-admin-bar-box">
7779

78-
<div class="udb-admin-bar-box--header">
79-
<h2 class="udb-admin-bar-box--title">
80-
<?php _e( 'Admin Bar Editor', 'ultimate-dashboard' ); ?>
81-
</h2>
80+
<div class="udb-admin-bar-box--header">
81+
<h2 class="udb-admin-bar-box--title">
82+
<?php _e( 'Admin Bar Editor', 'ultimate-dashboard' ); ?>
83+
</h2>
8284

83-
<?php do_action( 'udb_admin_bar_header' ); ?>
84-
</div>
85+
<?php do_action( 'udb_admin_bar_header' ); ?>
86+
</div>
8587

86-
<div class="udb-admin-bar--edit-area">
87-
<div id="udb-admin-bar--workspace" class="udb-admin-bar--workspace">
88-
<ul class="udb-admin-bar--menu-list" data-menu-type="parent">
89-
<!-- to be re-written via js -->
90-
<li class="loading"></li>
91-
</ul>
88+
<div class="udb-admin-bar--edit-area">
89+
<div id="udb-admin-bar--workspace" class="udb-admin-bar--workspace">
90+
<ul class="udb-admin-bar--menu-list" data-menu-type="parent">
91+
<!-- to be re-written via js -->
92+
<li class="loading"></li>
93+
</ul>
9294

93-
<?php do_action( 'udb_admin_bar_add_menu_button' ); ?>
95+
<?php do_action( 'udb_admin_bar_add_menu_button' ); ?>
96+
</div>
9497
</div>
95-
</div>
9698

97-
<div class="heatbox-footer">
99+
<div class="heatbox-footer">
98100

99-
<?php if ( ! udb_is_pro_active() ) : ?>
101+
<?php if ( ! udb_is_pro_active() ) : ?>
100102

101-
<div class="udb-pro-settings-page-notice udb-pro-admin-bar-notice">
102-
<p><?php _e( 'This feature is available in Ultimate Dashboard PRO.', 'ultimate-dashboard' ); ?></p>
103-
<a href="https://ultimatedashboard.io/pro/?utm_source=plugin&utm_medium=admin_bar_link&utm_campaign=udb" class="button button-large button-primary" target="_blank">
104-
<?php _e( 'Get Ultimate Dashboard PRO', 'ultimate-dashboard' ); ?>
105-
</a>
106-
</div>
103+
<div class="udb-pro-settings-page-notice udb-pro-admin-bar-notice">
104+
<p><?php _e( 'This feature is available in Ultimate Dashboard PRO.', 'ultimate-dashboard' ); ?></p>
105+
<a href="https://ultimatedashboard.io/pro/?utm_source=plugin&utm_medium=admin_bar_link&utm_campaign=udb" class="button button-large button-primary" target="_blank">
106+
<?php _e( 'Get Ultimate Dashboard PRO', 'ultimate-dashboard' ); ?>
107+
</a>
108+
</div>
107109

108-
<?php endif; ?>
110+
<?php endif; ?>
109111

110-
<?php do_action( 'udb_admin_bar_form_footer' ); ?>
112+
<?php do_action( 'udb_admin_bar_form_footer' ); ?>
111113

114+
</div>
112115
</div>
113-
</div>
114-
115-
</form>
116116

117+
</form>
118+
</div>
119+
<div class="heatbox-sidebar">
120+
<?php do_action( 'udb_admin_bar_sidebar' ); ?>
121+
</div>
117122
</div>
118123

119124
</div>

modules/admin-menu/assets/css/admin-menu.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,16 @@
1515
}
1616
}
1717

18+
.udb_widgets_page_udb_admin_menu .heatbox-main {
19+
width: 68%;
20+
}
21+
22+
.udb_widgets_page_udb_admin_menu .heatbox-sidebar {
23+
width: 30%;
24+
}
25+
1826
.udb-admin-menu-box {
19-
max-width: 700px;
27+
/* max-width: 700px; */
2028
}
2129

2230
.udb-admin-menu-box .is-hidden {

0 commit comments

Comments
 (0)