Révision 2392401e
Ajouté par Assos Assos il y a presque 6 ans
drupal7/sites/all/modules/admin_menu/README.txt | ||
---|---|---|
1 |
CONTENTS OF THIS FILE |
|
2 |
--------------------- |
|
1 | 3 |
|
2 |
-- SUMMARY -- |
|
4 |
* Introduction |
|
5 |
* Requirements |
|
6 |
* Installation |
|
7 |
* Configuration |
|
8 |
* Customization |
|
9 |
* Troubleshooting |
|
10 |
* FAQ |
|
11 |
* Maintainers |
|
12 |
|
|
13 |
|
|
14 |
INTRODUCTION |
|
15 |
------------ |
|
3 | 16 |
|
4 | 17 |
The Administration menu module displays the entire administrative menu tree (and |
5 | 18 |
most local tasks) in a drop-down menu, providing administrators one- or |
6 | 19 |
two-click access to most pages. Other modules may also add menu links to the |
7 | 20 |
menu using hook_admin_menu_output_alter(). |
8 | 21 |
|
9 |
For a full description of the module, visit the project page:
|
|
10 |
http://drupal.org/project/admin_menu
|
|
22 |
For a full description of the project visit the project page:
|
|
23 |
http://drupal.org/project/admin_menu |
|
11 | 24 |
|
12 | 25 |
To submit bug reports and feature suggestions, or to track changes: |
13 |
http://drupal.org/project/issues/admin_menu
|
|
26 |
http://drupal.org/project/issues/admin_menu |
|
14 | 27 |
|
15 | 28 |
|
16 |
-- REQUIREMENTS -- |
|
29 |
REQUIREMENTS |
|
30 |
------------ |
|
17 | 31 |
|
18 |
None.
|
|
32 |
No special requirements
|
|
19 | 33 |
|
20 | 34 |
|
21 |
-- INSTALLATION -- |
|
35 |
INSTALLATION |
|
36 |
------------ |
|
22 | 37 |
|
23 |
* Install as usual, see http://drupal.org/node/895232 for further information. |
|
38 |
Install as you would normally install a contributed Drupal. See: |
|
39 |
https://drupal.org/documentation/install/modules-themes/modules-7 for further |
|
40 |
information. |
|
24 | 41 |
|
25 |
* You likely want to disable Toolbar module, since its output clashes with |
|
26 |
Administration menu.
|
|
42 |
* You likely want to disable Toolbar module, since its output clashes with
|
|
43 |
Administration menu. |
|
27 | 44 |
|
28 | 45 |
|
29 |
-- CONFIGURATION -- |
|
46 |
CONFIGURATION |
|
47 |
------------- |
|
30 | 48 |
|
31 |
* Configure user permissions in Administration » People » Permissions: |
|
49 |
* Configure user permissions in Administration » People » Permissions:
|
|
32 | 50 |
|
33 |
- Use the administration pages and help (System module) |
|
51 |
- Use the administration pages and help (System module)
|
|
34 | 52 |
|
35 |
The top-level administration categories require this permission to be |
|
36 |
accessible. The administration menu will be empty unless this permission is |
|
37 |
granted. |
|
53 |
The top-level administration categories require this permission to be
|
|
54 |
accessible. The administration menu will be empty unless this permission is
|
|
55 |
granted.
|
|
38 | 56 |
|
39 |
- Access administration menu |
|
57 |
- Access administration menu
|
|
40 | 58 |
|
41 |
Users in roles with the "Access administration menu" permission will see |
|
42 |
the administration menu at the top of each page. |
|
59 |
Users in roles with the "Access administration menu" permission will see
|
|
60 |
the administration menu at the top of each page.
|
|
43 | 61 |
|
44 |
- Display Drupal links |
|
62 |
- Display Drupal links
|
|
45 | 63 |
|
46 |
Users in roles with the "Display drupal links" permission will receive |
|
47 |
links to drupal.org issue queues for all enabled contributed modules. The |
|
48 |
issue queue links appear under the administration menu icon. |
|
64 |
Users in roles with the "Display drupal links" permission will receive
|
|
65 |
links to drupal.org issue queues for all enabled contributed modules. The
|
|
66 |
issue queue links appear under the administration menu icon.
|
|
49 | 67 |
|
50 |
Note that the menu items displayed in the administration menu depend on the |
|
51 |
actual permissions of the viewing user. For example, the "People" menu item |
|
52 |
is not displayed to a user who is not a member of a role with the "Administer
|
|
53 |
users" permission. |
|
68 |
Note that the menu items displayed in the administration menu depend on the
|
|
69 |
actual permissions of the viewing user. For example, the "People" menu item
|
|
70 |
is not displayed to a user who is not a member of a role with the
|
|
71 |
"Administer users" permission.
|
|
54 | 72 |
|
55 |
* Customize the menu settings in Administration » Configuration and modules » |
|
56 |
Administration » Administration menu. |
|
73 |
* Customize the menu settings in Administration » Configuration and modules »
|
|
74 |
Administration » Administration menu.
|
|
57 | 75 |
|
58 |
* To prevent administrative menu items from appearing twice, you may hide the |
|
59 |
"Management" menu block. |
|
76 |
* To prevent administrative menu items from appearing twice, you may hide the
|
|
77 |
"Management" menu block.
|
|
60 | 78 |
|
61 | 79 |
|
62 |
-- CUSTOMIZATION -- |
|
80 |
CUSTOMIZATION |
|
81 |
------------- |
|
63 | 82 |
|
64 | 83 |
* To override the default administration menu icon, you may: |
65 | 84 |
|
... | ... | |
82 | 101 |
body #admin-menu { font-size: 10px; } |
83 | 102 |
|
84 | 103 |
|
85 |
-- TROUBLESHOOTING -- |
|
104 |
TROUBLESHOOTING |
|
105 |
------------- |
|
86 | 106 |
|
87 | 107 |
* If the menu does not display, check the following: |
88 | 108 |
|
89 |
- Are the "Access administration menu" and "Use the administration pages and help"
|
|
90 |
permissions enabled for the appropriate roles? |
|
109 |
- Are the "Access administration menu" and "Use the administration pages and |
|
110 |
help" permissions enabled for the appropriate roles?
|
|
91 | 111 |
|
92 | 112 |
- Does html.tpl.php of your theme output the $page_bottom variable? |
93 | 113 |
|
... | ... | |
99 | 119 |
See http://drupal.org/node/195386 for further information. |
100 | 120 |
|
101 | 121 |
|
102 |
-- FAQ -- |
|
122 |
FAQ |
|
123 |
--- |
|
124 |
|
|
125 |
Q: When the administration menu module is enabled, blank space is added to the |
|
126 |
bottom of my theme. Why? |
|
103 | 127 |
|
104 |
Q: When the administration menu module is enabled, blank space is added to the |
|
105 |
bottom of my theme. Why? |
|
128 |
A: This is caused by a long list of links to module issue queues at Drupal.org. |
|
129 |
Use Administer >> User management >> Permissions to disable the "display |
|
130 |
drupal links" permission for all appropriate roles. Note that since UID 1 |
|
131 |
automatically receives all permissions, the list of issue queue links cannot |
|
132 |
be disabled for UID 1. |
|
106 | 133 |
|
107 |
A: This is caused by a long list of links to module issue queues at Drupal.org. |
|
108 |
Use Administer >> User management >> Permissions to disable the "display |
|
109 |
drupal links" permission for all appropriate roles. Note that since UID 1 |
|
110 |
automatically receives all permissions, the list of issue queue links cannot |
|
111 |
be disabled for UID 1. |
|
112 | 134 |
|
135 |
Q: After upgrading to 6.x-1.x, the menu disappeared. Why? |
|
113 | 136 |
|
114 |
Q: After upgrading to 6.x-1.x, the menu disappeared. Why? |
|
137 |
A: You may need to regenerate your menu. Visit |
|
138 |
http://example.com/admin/build/modules to regenerate your menu (substitute |
|
139 |
your site name for example.com). |
|
115 | 140 |
|
116 |
A: You may need to regenerate your menu. Visit |
|
117 |
http://example.com/admin/build/modules to regenerate your menu (substitute |
|
118 |
your site name for example.com). |
|
119 | 141 |
|
142 |
Q: Can I configure the administration menu module to display another menu (like |
|
143 |
the Navigation menu, for instance)? |
|
120 | 144 |
|
121 |
Q: Can I configure the administration menu module to display another menu (like |
|
122 |
the Navigation menu, for instance)? |
|
145 |
A: No. As the name implies, administration menu module is for administrative |
|
146 |
menu links only. However, you can copy and paste the contents of |
|
147 |
admin_menu.css into your theme's stylesheet and replace #admin-menu with any |
|
148 |
other menu block id (#block-menu-1, for example). |
|
123 | 149 |
|
124 |
A: No. As the name implies, administration menu module is for administrative |
|
125 |
menu links only. However, you can copy and paste the contents of |
|
126 |
admin_menu.css into your theme's stylesheet and replace #admin-menu with any |
|
127 |
other menu block id (#block-menu-1, for example). |
|
128 | 150 |
|
151 |
Q: Sometimes, the user counter displays a lot of anonymous users, but no spike |
|
152 |
of users or requests appear in Google Analytics or other tracking tools. |
|
129 | 153 |
|
130 |
Q: Sometimes, the user counter displays a lot of anonymous users, but no spike |
|
131 |
of users or requests appear in Google Analytics or other tracking tools. |
|
154 |
A: If your site was concurrently spidered by search-engine robots, it may have |
|
155 |
a significant number of anonymous users for a short time. Most web tracking |
|
156 |
tools like Google Analytics automatically filter out these requests. |
|
132 | 157 |
|
133 |
A: If your site was concurrently spidered by search-engine robots, it may have |
|
134 |
a significant number of anonymous users for a short time. Most web tracking |
|
135 |
tools like Google Analytics automatically filter out these requests. |
|
136 | 158 |
|
159 |
Q: I enabled "Aggregate and compress CSS files", but admin_menu.css is still |
|
160 |
there. Is this normal? |
|
137 | 161 |
|
138 |
Q: I enabled "Aggregate and compress CSS files", but admin_menu.css is still |
|
139 |
there. Is this normal? |
|
162 |
A: Yes, this is the intended behavior. the administration menu module only |
|
163 |
loads its stylesheet as needed (i.e., on page requests by logged-on, |
|
164 |
administrative users). |
|
140 | 165 |
|
141 |
A: Yes, this is the intended behavior. the administration menu module only loads |
|
142 |
its stylesheet as needed (i.e., on page requests by logged-on, administrative |
|
143 |
users). |
|
144 | 166 |
|
167 |
Q: Why are sub-menus not visible in Opera? |
|
145 | 168 |
|
146 |
Q: Why are sub-menus not visible in Opera? |
|
169 |
A: In the Opera browser preferences under "web pages" there is an option to fit |
|
170 |
to width. By disabling this option, sub-menus in the administration menu |
|
171 |
should appear. |
|
147 | 172 |
|
148 |
A: In the Opera browser preferences under "web pages" there is an option to fit |
|
149 |
to width. By disabling this option, sub-menus in the administration menu |
|
150 |
should appear. |
|
151 | 173 |
|
174 |
Q: How can the administration menu be hidden on certain pages? |
|
152 | 175 |
|
153 |
Q: How can the administration menu be hidden on certain pages? |
|
176 |
A: You can suppress it by simply calling the following function in PHP: |
|
177 |
module_invoke('admin_menu', 'suppress'); |
|
154 | 178 |
|
155 |
A: You can suppress it by simply calling the following function in PHP: |
|
179 |
However, this needs to happen as early as possible in the page request, so |
|
180 |
placing it in the theming layer (resp. a page template file) is too late. |
|
181 |
Ideally, the function is called in hook_init() in a custom module. If you |
|
182 |
do not have a custom module, placing it into some conditional code at the |
|
183 |
top of template.php may work out, too. |
|
156 | 184 |
|
157 |
module_invoke('admin_menu', 'suppress'); |
|
158 | 185 |
|
159 |
However, this needs to happen as early as possible in the page request, so |
|
160 |
placing it in the theming layer (resp. a page template file) is too late. |
|
161 |
Ideally, the function is called in hook_init() in a custom module. If you do |
|
162 |
not have a custom module, placing it into some conditional code at the top of |
|
163 |
template.php may work out, too. |
|
186 |
Q: What does the "Administration Development Tools" module do? |
|
164 | 187 |
|
188 |
A: The Administration Development Tools adds a jQuery Debugger which allows |
|
189 |
a developer to debug and inspect arbitrary data/variables in Firebug's |
|
190 |
console, and also to access them again in the global window object |
|
191 |
(optionally using a named identifier, e.g. window.debug.myValue). |
|
192 |
Chainable via jQuery. Especially useful for re-accessing and debugging |
|
193 |
selected data via Firebug's console. |
|
165 | 194 |
|
166 |
-- CONTACT -- |
|
195 |
|
|
196 |
MAINTAINERS |
|
197 |
----------- |
|
167 | 198 |
|
168 | 199 |
Current maintainers: |
169 |
* Daniel F. Kudwien (sun) - http://drupal.org/user/54136 |
|
170 |
* Peter Wolanin (pwolanin) - http://drupal.org/user/49851 |
|
171 |
* Stefan M. Kudwien (smk-ka) - http://drupal.org/user/48898 |
|
172 |
* Dave Reid (Dave Reid) - http://drupal.org/user/53892 |
|
200 |
* Daniel F. Kudwien (sun) - http://drupal.org/user/54136 |
|
201 |
* Peter Wolanin (pwolanin) - http://drupal.org/user/49851 |
|
202 |
* Stefan M. Kudwien (smk-ka) - http://drupal.org/user/48898 |
|
203 |
* Dave Reid (Dave Reid) - http://drupal.org/user/53892 |
|
204 |
* Truls S. Yggeseth (truls1502) - http://drupal.org/user/325866 |
|
205 |
* Sebastian Siemssen (fubhy) - https://www.drupal.org/user/761344 |
|
173 | 206 |
|
174 | 207 |
Major rewrite for Drupal 6 by Peter Wolanin (pwolanin). |
175 | 208 |
|
176 | 209 |
This project has been sponsored by: |
177 |
* UNLEASHED MIND |
|
178 |
Specialized in consulting and planning of Drupal powered sites, UNLEASHED |
|
179 |
MIND offers installation, development, theming, customization, and hosting |
|
180 |
to get you started. Visit http://www.unleashedmind.com for more information. |
|
181 |
|
|
182 |
* Lullabot |
|
183 |
Friendly Drupal experts providing professional consulting & education |
|
184 |
services. Visit http://www.lullabot.com for more information. |
|
210 |
* UNLEASHED MIND |
|
211 |
Specialized in consulting and planning of Drupal powered sites, UNLEASHED |
|
212 |
MIND offers installation, development, theming, customization, and hosting |
|
213 |
to get you started. Visit http://www.unleashedmind.com for more information. |
|
185 | 214 |
|
186 |
* Acquia |
|
187 |
Commercially Supported Drupal. Visit http://acquia.com for more information. |
|
215 |
* Lullabot |
|
216 |
Friendly Drupal experts providing professional consulting & education |
|
217 |
services. Visit http://www.lullabot.com for more information. |
|
188 | 218 |
|
219 |
* Acquia |
|
220 |
Commercially Supported Drupal. Visit http://acquia.com for more information. |
drupal7/sites/all/modules/admin_menu/admin_devel/admin_devel.info | ||
---|---|---|
4 | 4 |
core = 7.x |
5 | 5 |
scripts[] = admin_devel.js |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2014-12-19
|
|
8 |
version = "7.x-3.0-rc5"
|
|
7 |
; Information added by Drupal.org packaging script on 2018-12-03
|
|
8 |
version = "7.x-3.0-rc6"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "admin_menu" |
11 |
datestamp = "1419029284" |
|
12 |
|
|
11 |
datestamp = "1543859284" |
drupal7/sites/all/modules/admin_menu/admin_menu-rtl.css | ||
---|---|---|
1 |
|
|
2 | 1 |
#admin-menu { |
3 | 2 |
text-align: right; |
4 | 3 |
} |
... | ... | |
25 | 24 |
border-right: 0; |
26 | 25 |
} |
27 | 26 |
#admin-menu .dropdown .admin-menu-tab a { |
28 |
border-left: 1px solid #52565E;
|
|
27 |
border-left: 1px solid #52565e;
|
|
29 | 28 |
border-right: 0; |
30 | 29 |
} |
31 | 30 |
#admin-menu .dropdown li li a { |
... | ... | |
42 | 41 |
/* Second-level lists */ |
43 | 42 |
#admin-menu .dropdown li ul { |
44 | 43 |
left: auto; |
45 |
right: -999em;
|
|
44 |
right: auto;
|
|
46 | 45 |
} |
47 | 46 |
|
48 | 47 |
/* Third-and-above-level lists */ |
49 | 48 |
#admin-menu .dropdown li li.expandable ul { |
50 |
margin-left: 0; |
|
51 |
margin-right: 160px; |
|
49 |
margin-left: 0 !important;
|
|
50 |
margin-right: 160px !important;
|
|
52 | 51 |
} |
53 | 52 |
|
54 | 53 |
/* Lists nested under hovered list items */ |
drupal7/sites/all/modules/admin_menu/admin_menu.admin.js | ||
---|---|---|
1 |
(function($) { |
|
1 |
/** |
|
2 |
* @file |
|
3 |
*/ |
|
4 |
|
|
5 |
(function ($) { |
|
2 | 6 |
|
3 | 7 |
/** |
4 | 8 |
* Live preview of Administration menu components. |
... | ... | |
45 | 49 |
// Figure out which is the other, check whether it still disabled, |
46 | 50 |
// and if so, ask whether to auto-enable it. |
47 | 51 |
var other = (this == $admin[index] ? $menu[index] : $admin[index]); |
48 |
if (!other.checked && confirm(Drupal.t('Also allow !name role to !permission?', {
|
|
49 |
'!name': $roles[index].textContent,
|
|
50 |
'!permission': (this == $admin[index] ? menuPermission : adminPermission)
|
|
52 |
if (!other.checked && confirm(Drupal.t('Also allow @name role to @permission?', {
|
|
53 |
'@name': $roles[index].textContent,
|
|
54 |
'@permission': (this == $admin[index] ? menuPermission : adminPermission)
|
|
51 | 55 |
}))) { |
52 | 56 |
other.checked = 'checked'; |
53 | 57 |
} |
drupal7/sites/all/modules/admin_menu/admin_menu.color.css | ||
---|---|---|
1 |
|
|
2 | 1 |
/** |
3 | 2 |
* @file |
4 | 3 |
* Administration menu color override. |
... | ... | |
17 | 16 |
border-right-color: #a91f1f; |
18 | 17 |
} |
19 | 18 |
#admin-menu ul li.admin-menu-tab a { |
20 |
border-right-color: #52565E;
|
|
19 |
border-right-color: #52565e;
|
|
21 | 20 |
} |
22 | 21 |
#admin-menu li li a { |
23 | 22 |
border-top-color: #801f1f; |
drupal7/sites/all/modules/admin_menu/admin_menu.css | ||
---|---|---|
1 |
|
|
2 | 1 |
/** |
3 | 2 |
* @file |
4 | 3 |
* Administration menu. |
... | ... | |
16 | 15 |
position: absolute; |
17 | 16 |
text-align: left; |
18 | 17 |
top: 0; |
18 |
height: 30px; |
|
19 | 19 |
width: 100%; |
20 | 20 |
} |
21 | 21 |
#admin-menu-wrapper { |
... | ... | |
62 | 62 |
#admin-menu li > span { |
63 | 63 |
background: transparent none; |
64 | 64 |
border: none; |
65 |
color: #EEE;
|
|
65 |
color: #eee;
|
|
66 | 66 |
font-weight: normal; |
67 | 67 |
text-align: left; /* LTR */ |
68 | 68 |
text-decoration: none; |
... | ... | |
74 | 74 |
padding: 4px 8px; |
75 | 75 |
} |
76 | 76 |
#admin-menu .dropdown .admin-menu-tab a { |
77 |
border-right: 1px solid #52565E; /* LTR */
|
|
77 |
border-right: 1px solid #52565e; /* LTR */
|
|
78 | 78 |
} |
79 | 79 |
#admin-menu .dropdown li li a { |
80 | 80 |
border-right: none; /* LTR */ |
... | ... | |
147 | 147 |
|
148 | 148 |
/* Second-and-more-level hovering */ |
149 | 149 |
#admin-menu .dropdown li li.expandable { |
150 |
background: #45454A url(images/arrow.png) no-repeat 145px 6px;
|
|
150 |
background: #45454a url(images/arrow.png) no-repeat 145px 6px;
|
|
151 | 151 |
} |
152 | 152 |
#admin-menu .dropdown li li:hover { |
153 | 153 |
background-color: #111; |
... | ... | |
155 | 155 |
#admin-menu .dropdown li li:hover a, |
156 | 156 |
#admin-menu .dropdown li li:hover li:hover a, |
157 | 157 |
#admin-menu .dropdown li li:hover li:hover li:hover a { |
158 |
color: #FFF;
|
|
158 |
color: #fff;
|
|
159 | 159 |
} |
160 | 160 |
#admin-menu .dropdown li li.expandable:hover a, |
161 | 161 |
#admin-menu .dropdown li li.expandable:hover li.expandable:hover a { |
162 | 162 |
border-color: #444; |
163 |
color: #EEE;
|
|
163 |
color: #eee;
|
|
164 | 164 |
} |
165 | 165 |
#admin-menu .dropdown li li.expandable:hover li a, |
166 | 166 |
#admin-menu .dropdown li li.expandable:hover li.expandable:hover li a { |
167 | 167 |
border-color: #323232; |
168 | 168 |
} |
169 | 169 |
#admin-menu .dropdown li li:hover li a { |
170 |
color: #EEE;
|
|
170 |
color: #eee;
|
|
171 | 171 |
} |
172 | 172 |
|
173 | 173 |
/* Search form */ |
drupal7/sites/all/modules/admin_menu/admin_menu.inc | ||
---|---|---|
97 | 97 |
$db_or = db_or(); |
98 | 98 |
foreach ($plids as $path_plids) { |
99 | 99 |
$db_and = db_and(); |
100 |
// plids with value 0 may be ignored.
|
|
100 |
// Plids with value 0 may be ignored.
|
|
101 | 101 |
foreach (array_filter($path_plids) as $column => $plid) { |
102 | 102 |
$db_and->condition($column, $plid); |
103 | 103 |
} |
... | ... | |
204 | 204 |
foreach ($load_functions as $index => $function) { |
205 | 205 |
if ($function) { |
206 | 206 |
if (is_array($function)) { |
207 |
list($function,) = each($function);
|
|
207 |
$function = key($function);
|
|
208 | 208 |
} |
209 | 209 |
// Add the loader function name minus "_load". |
210 | 210 |
$placeholder = '%' . substr($function, 0, -5); |
... | ... | |
269 | 269 |
// replace any other. |
270 | 270 |
// @todo Doing this instead leads to plenty of duplicate links below |
271 | 271 |
// admin/structure/menu; likely a hidden recursion problem. |
272 |
// $router_item['mlid'] = $router_item['href'] . $router_item['mlid']; |
|
272 |
// $router_item['mlid'] = $router_item['href'] . $router_item['mlid'];.
|
|
273 | 273 |
$router_item['mlid'] = $router_item['href']; |
274 | 274 |
// Turn menu callbacks into regular menu items to make them visible. |
275 | 275 |
if ($router_item['type'] == MENU_CALLBACK) { |
... | ... | |
278 | 278 |
|
279 | 279 |
// @see _menu_tree_check_access() |
280 | 280 |
$key = (50000 + $router_item['weight']) . ' ' . $router_item['title'] . ' ' . $router_item['mlid']; |
281 |
return array($key => array( |
|
282 |
'link' => $router_item, |
|
283 |
'below' => array(), |
|
284 |
)); |
|
281 |
return array( |
|
282 |
$key => array( |
|
283 |
'link' => $router_item, |
|
284 |
'below' => array(), |
|
285 |
), |
|
286 |
); |
|
285 | 287 |
} |
286 | 288 |
|
287 | 289 |
return array(); |
... | ... | |
461 | 463 |
'#access' => user_access('display drupal links'), |
462 | 464 |
'#href' => 'http://drupal.org', |
463 | 465 |
); |
464 |
// Add links to project issue queues. |
|
465 |
foreach (module_list(FALSE, TRUE) as $module) { |
|
466 |
$info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info'); |
|
467 |
if (!isset($info['project']) || isset($links['icon']['drupal.org'][$info['project']])) { |
|
468 |
continue; |
|
466 |
if (variable_get('admin_menu_issue_queues', TRUE)) { |
|
467 |
// Add links to project issue queues. |
|
468 |
foreach (module_list(FALSE, TRUE) as $module) { |
|
469 |
$info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info'); |
|
470 |
if (!isset($info['project']) || isset($links['icon']['drupal.org'][$info['project']])) { |
|
471 |
continue; |
|
472 |
} |
|
473 |
$links['icon']['drupal.org'][$info['project']] = array( |
|
474 |
'#title' => t('@project issue queue', array('@project' => $info['name'])), |
|
475 |
'#weight' => ($info['project'] == 'drupal' ? -10 : 0), |
|
476 |
'#href' => 'http://drupal.org/project/issues/' . $info['project'], |
|
477 |
'#options' => array( |
|
478 |
'query' => array('version' => (isset($info['core']) ? $info['core'] : 'All')), |
|
479 |
), |
|
480 |
); |
|
469 | 481 |
} |
470 |
$links['icon']['drupal.org'][$info['project']] = array( |
|
471 |
'#title' => t('@project issue queue', array('@project' => $info['name'])), |
|
472 |
'#weight' => ($info['project'] == 'drupal' ? -10 : 0), |
|
473 |
'#href' => 'http://drupal.org/project/issues/' . $info['project'], |
|
474 |
'#options' => array( |
|
475 |
'query' => array('version' => (isset($info['core']) ? $info['core'] : 'All')), |
|
476 |
), |
|
477 |
); |
|
478 | 482 |
} |
479 | 483 |
// Add items to flush caches. |
480 | 484 |
$links['icon']['flush-cache'] = array( |
... | ... | |
570 | 574 |
'#description' => t('Current anonymous / authenticated users'), |
571 | 575 |
'#weight' => -90, |
572 | 576 |
'#attributes' => array('class' => array('admin-menu-action', 'admin-menu-users')), |
573 |
'#href' => (user_access('administer users') ? 'admin/people/people' : 'user'),
|
|
577 |
'#href' => (user_access('administer users') ? 'admin/people' : 'user'), |
|
574 | 578 |
); |
575 | 579 |
return $links; |
576 | 580 |
} |
... | ... | |
658 | 662 |
'#default_value' => variable_get('admin_menu_tweak_modules', 0), |
659 | 663 |
); |
660 | 664 |
if (module_exists('util')) { |
661 |
$form['tweaks']['admin_menu_tweak_modules']['#description'] .= '<br /><strong>' . t('If the Utility module was installed for this purpose, it can be safely disabled and uninstalled.') . '</strong>';
|
|
665 |
$form['tweaks']['admin_menu_tweak_modules']['#description'] = '<br /><strong>' . t('If the Utility module was installed for this purpose, it can be safely disabled and uninstalled.') . '</strong>'; |
|
662 | 666 |
} |
663 | 667 |
$form['tweaks']['admin_menu_tweak_permissions'] = array( |
664 | 668 |
'#type' => 'checkbox', |
... | ... | |
685 | 689 |
'#title' => t('Cache menu in client-side browser'), |
686 | 690 |
'#default_value' => variable_get('admin_menu_cache_client', 1), |
687 | 691 |
); |
692 |
$form['performance']['admin_menu_issue_queues'] = array( |
|
693 |
'#type' => 'checkbox', |
|
694 |
'#title' => t('Show Issue Queue links in icon menu'), |
|
695 |
'#default_value' => variable_get('admin_menu_issue_queues', 1), |
|
696 |
); |
|
688 | 697 |
|
689 | 698 |
return system_settings_form($form); |
690 | 699 |
} |
... | ... | |
763 | 772 |
if (!isset($caches[$name])) { |
764 | 773 |
return MENU_NOT_FOUND; |
765 | 774 |
} |
775 |
$message = t('@title cache cleared.', array('@title' => $caches[$name]['title'])); |
|
766 | 776 |
} |
767 | 777 |
else { |
768 | 778 |
$caches[$name] = array( |
769 | 779 |
'title' => t('Every'), |
770 | 780 |
'callback' => 'drupal_flush_all_caches', |
771 | 781 |
); |
782 |
$message = t('All caches cleared.'); |
|
772 | 783 |
} |
773 | 784 |
// Pass the cache to flush forward to the callback. |
774 | 785 |
$function = $caches[$name]['callback']; |
775 | 786 |
$function($name); |
776 | 787 |
|
777 |
drupal_set_message(t('!title cache cleared.', array('!title' => $caches[$name]['title'])));
|
|
788 |
drupal_set_message($message);
|
|
778 | 789 |
|
779 | 790 |
// The JavaScript injects a destination request parameter pointing to the |
780 | 791 |
// originating page, so the user is redirected back to that page. Without |
... | ... | |
907 | 918 |
function theme_admin_menu_icon($variables) { |
908 | 919 |
return '<img class="admin-menu-icon" src="' . $variables['src'] . '" width="16" height="16" alt="' . $variables['alt'] . '" />'; |
909 | 920 |
} |
910 |
|
drupal7/sites/all/modules/admin_menu/admin_menu.info | ||
---|---|---|
8 | 8 |
dependencies[] = system (>7.10) |
9 | 9 |
files[] = tests/admin_menu.test |
10 | 10 |
|
11 |
; Information added by Drupal.org packaging script on 2014-12-19
|
|
12 |
version = "7.x-3.0-rc5"
|
|
11 |
; Information added by Drupal.org packaging script on 2018-12-03
|
|
12 |
version = "7.x-3.0-rc6"
|
|
13 | 13 |
core = "7.x" |
14 | 14 |
project = "admin_menu" |
15 |
datestamp = "1419029284" |
|
16 |
|
|
15 |
datestamp = "1543859284" |
drupal7/sites/all/modules/admin_menu/admin_menu.js | ||
---|---|---|
1 |
(function($) { |
|
1 |
/** |
|
2 |
* @file |
|
3 |
*/ |
|
4 |
|
|
5 |
(function ($) { |
|
2 | 6 |
|
3 | 7 |
Drupal.admin = Drupal.admin || {}; |
4 | 8 |
Drupal.admin.behaviors = Drupal.admin.behaviors || {}; |
... | ... | |
139 | 143 |
* |
140 | 144 |
* @see toolbar.js |
141 | 145 |
*/ |
142 |
Drupal.admin.height = function() { |
|
146 |
Drupal.admin.height = function () {
|
|
143 | 147 |
var $adminMenu = $('#admin-menu'); |
144 | 148 |
var height = $adminMenu.outerHeight(); |
145 | 149 |
// In IE, Shadow filter adds some extra height, so we need to remove it from |
... | ... | |
161 | 165 |
Drupal.admin.attachBehaviors = function (context, settings, $adminMenu) { |
162 | 166 |
if ($adminMenu.length) { |
163 | 167 |
$adminMenu.addClass('admin-menu-processed'); |
164 |
$.each(Drupal.admin.behaviors, function() { |
|
168 |
$.each(Drupal.admin.behaviors, function () {
|
|
165 | 169 |
this(context, settings, $adminMenu); |
166 | 170 |
}); |
167 | 171 |
} |
... | ... | |
206 | 210 |
*/ |
207 | 211 |
Drupal.admin.behaviors.destination = function (context, settings, $adminMenu) { |
208 | 212 |
if (settings.admin_menu.destination) { |
209 |
$('a.admin-menu-destination', $adminMenu).each(function() { |
|
213 |
$('a.admin-menu-destination', $adminMenu).each(function () {
|
|
210 | 214 |
this.search += (!this.search.length ? '?' : '&') + Drupal.settings.admin_menu.destination; |
211 | 215 |
}); |
212 | 216 |
} |
drupal7/sites/all/modules/admin_menu/admin_menu.map.inc | ||
---|---|---|
80 | 80 |
'access callback' => 'user_access', |
81 | 81 |
'access arguments' => array('administer site configuration'), |
82 | 82 |
); |
83 |
if (!call_user_func_array($bundle_info['admin']['access callback'], $bundle_info['admin']['access arguments'])) { |
|
83 |
$access_arguments = $bundle_info['admin']['access arguments']; |
|
84 |
if (isset($bundle_info['admin']['real path'])) { |
|
85 |
$menu_item = menu_get_item($bundle_info['admin']['real path']); |
|
86 |
if (isset($menu_item['map'])) { |
|
87 |
$access_arguments = menu_unserialize(serialize($access_arguments), $menu_item['map']); |
|
88 |
} |
|
89 |
} |
|
90 |
if (!call_user_func_array($bundle_info['admin']['access callback'], $access_arguments)) { |
|
84 | 91 |
continue; |
85 | 92 |
} |
86 | 93 |
|
drupal7/sites/all/modules/admin_menu/admin_menu.module | ||
---|---|---|
63 | 63 |
function admin_menu_menu() { |
64 | 64 |
// AJAX callback. |
65 | 65 |
// @see http://drupal.org/project/js |
66 |
$items['js/admin_menu/cache'] = array( |
|
66 |
$items['js/admin_menu/cache/%'] = array(
|
|
67 | 67 |
'page callback' => 'admin_menu_js_cache', |
68 | 68 |
'delivery callback' => 'admin_menu_deliver', |
69 | 69 |
'access arguments' => array('access administration menu'), |
... | ... | |
78 | 78 |
'file' => 'system.admin.inc', |
79 | 79 |
'file path' => drupal_get_path('module', 'system'), |
80 | 80 |
); |
81 |
$items['admin/config/administration/admin_menu'] = array(
|
|
81 |
$items['admin/config/administration/admin-menu'] = array(
|
|
82 | 82 |
'title' => 'Administration menu', |
83 | 83 |
'description' => 'Adjust administration menu settings.', |
84 | 84 |
'page callback' => 'drupal_get_form', |
... | ... | |
211 | 211 |
// @todo Drupal.behaviors.adminMenuMarginTop is obsolete, but |
212 | 212 |
// hook_page_build() does not allow to set a CSS class on the body yet. |
213 | 213 |
// @see http://drupal.org/node/1473548, http://drupal.org/node/1194528 |
214 |
//$page['#attributes']['class'][] = 'admin-menu'; |
|
214 |
// $page['#attributes']['class'][] = 'admin-menu';
|
|
215 | 215 |
} |
216 | 216 |
if ($setting = variable_get('admin_menu_position_fixed', 1)) { |
217 | 217 |
$settings['position_fixed'] = $setting; |
... | ... | |
230 | 230 |
if ($_GET['q'] == 'admin/modules' || strpos($_GET['q'], 'admin/modules/list') === 0) { |
231 | 231 |
$settings['tweak_modules'] = variable_get('admin_menu_tweak_modules', 0); |
232 | 232 |
} |
233 |
if ($_GET['q'] == 'admin/people/permissions' || $_GET['q'] == 'admin/people/permissions/list') {
|
|
233 |
if (strpos($_GET['q'], 'admin/people/permissions') === 0) {
|
|
234 | 234 |
$settings['tweak_permissions'] = variable_get('admin_menu_tweak_permissions', 0); |
235 | 235 |
} |
236 | 236 |
|
... | ... | |
502 | 502 |
|
503 | 503 |
// @todo Move the below callbacks into hook_admin_menu_build() |
504 | 504 |
// implementations (and $module.admin_menu.inc). |
505 |
|
|
506 | 505 |
// Add administration menu. |
507 | 506 |
if (!empty($components['admin_menu.menu']) || $complete) { |
508 | 507 |
$content['menu'] = admin_menu_links_menu(admin_menu_tree('management')); |
... | ... | |
548 | 547 |
|
549 | 548 |
// Store the new hash for this user. |
550 | 549 |
if (!empty($_COOKIE['has_js']) && !$complete) { |
551 |
admin_menu_cache_set($cid, md5($content)); |
|
550 |
$cache = cache_get($cid, 'cache_admin_menu'); |
|
551 |
if (!$cache || !isset($cache->data)) { |
|
552 |
admin_menu_cache_set($cid, md5($content)); |
|
553 |
} |
|
552 | 554 |
} |
553 | 555 |
|
554 | 556 |
return $content; |
... | ... | |
603 | 605 |
* Implements hook_admin_menu_output_alter(). |
604 | 606 |
*/ |
605 | 607 |
function admin_menu_admin_menu_output_alter(&$content) { |
606 |
foreach ($content['menu'] as $key => $link) { |
|
607 |
// Move local tasks on 'admin' into icon menu. |
|
608 |
if ($key == 'admin/tasks' || $key == 'admin/index') { |
|
609 |
$content['icon']['icon'][$key] = $link; |
|
610 |
unset($content['menu'][$key]); |
|
608 |
if (!empty($content['menu'])) { |
|
609 |
foreach ($content['menu'] as $key => $link) { |
|
610 |
// Move local tasks on 'admin' into icon menu. |
|
611 |
if ($key == 'admin/tasks' || $key == 'admin/index') { |
|
612 |
$content['icon']['icon'][$key] = $link; |
|
613 |
unset($content['menu'][$key]); |
|
614 |
} |
|
611 | 615 |
} |
612 | 616 |
} |
613 | 617 |
} |
... | ... | |
677 | 681 |
$elements[$path]['#options']['attributes']['class'][] = 'admin-menu-destination'; |
678 | 682 |
} |
679 | 683 |
|
684 |
// If the path has an alias replace the href with the alias. |
|
685 |
if (module_exists('path')) { |
|
686 |
if ($alias = drupal_get_path_alias($elements[$path]['#href'])) { |
|
687 |
$elements[$path]['#href'] = $alias; |
|
688 |
} |
|
689 |
} |
|
690 |
|
|
680 | 691 |
$link = l($elements[$path]['#title'], $elements[$path]['#href'], $elements[$path]['#options']); |
681 | 692 |
} |
682 | 693 |
// Handle plain text items, but do not interfere with menu additions. |
... | ... | |
751 | 762 |
} |
752 | 763 |
} |
753 | 764 |
|
754 |
// Don't waste cycles altering items that are not visible |
|
765 |
// Don't waste cycles altering items that are not visible.
|
|
755 | 766 |
if (!$item['access']) { |
756 | 767 |
return; |
757 | 768 |
} |
... | ... | |
795 | 806 |
cache_clear_all($cid, 'cache_menu', TRUE); |
796 | 807 |
// Flush client-side cache hashes. |
797 | 808 |
drupal_static_reset('admin_menu_cache_get'); |
798 |
// db_table_exists() required for SimpleTest.
|
|
799 |
if (db_table_exists('cache_admin_menu')) {
|
|
809 |
// If cache_admin_menu is not empty, flush it.
|
|
810 |
if (!cache_is_empty('cache_admin_menu')) {
|
|
800 | 811 |
cache_clear_all(isset($uid) ? $cid : '*', 'cache_admin_menu', TRUE); |
801 | 812 |
} |
802 | 813 |
} |
drupal7/sites/all/modules/admin_menu/admin_menu.uid1.css | ||
---|---|---|
1 |
|
|
2 | 1 |
/** |
3 | 2 |
* @file |
4 | 3 |
* Administration menu color override for uid1. |
drupal7/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar-rtl.css | ||
---|---|---|
1 |
#admin-menu > div > .dropdown > li > a, |
|
2 |
#admin-menu > div > .dropdown > li > span { |
|
3 |
border-left: 0; |
|
4 |
} |
drupal7/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css | ||
---|---|---|
1 |
|
|
2 | 1 |
/** |
3 | 2 |
* @file |
4 | 3 |
* Toolbar style for Administration menu. |
... | ... | |
63 | 62 |
background: url(toolbar.png) no-repeat 0 -45px; |
64 | 63 |
text-indent: -9999px; |
65 | 64 |
} |
66 |
#admin-menu > div > .dropdown > li > a { |
|
67 |
border-right: 0; |
|
65 |
#admin-menu > div > .dropdown > li > a, |
|
66 |
#admin-menu > div > .dropdown > li > span { |
|
67 |
border-right: 0; /* LTR */ |
|
68 | 68 |
margin-bottom: 4px; |
69 | 69 |
padding: 2px 10px 3px; |
70 | 70 |
} |
... | ... | |
142 | 142 |
#admin-menu .shortcut-toolbar a { |
143 | 143 |
display: block; |
144 | 144 |
} |
145 |
|
drupal7/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info | ||
---|---|---|
4 | 4 |
core = 7.x |
5 | 5 |
dependencies[] = admin_menu |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2014-12-19
|
|
8 |
version = "7.x-3.0-rc5"
|
|
7 |
; Information added by Drupal.org packaging script on 2018-12-03
|
|
8 |
version = "7.x-3.0-rc6"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "admin_menu" |
11 |
datestamp = "1419029284" |
|
12 |
|
|
11 |
datestamp = "1543859284" |
drupal7/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install | ||
---|---|---|
34 | 34 |
->condition('name', 'admin_menu_toolbar') |
35 | 35 |
->execute(); |
36 | 36 |
} |
37 |
|
drupal7/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module | ||
---|---|---|
115 | 115 |
$content['account']['account']['#options']['html'] = TRUE; |
116 | 116 |
} |
117 | 117 |
} |
118 |
|
drupal7/sites/all/modules/admin_menu/tests/admin_menu.test | ||
---|---|---|
16 | 16 |
'admin_menu' => 'access administration menu', |
17 | 17 |
); |
18 | 18 |
|
19 |
function setUp() { |
|
19 |
/** |
|
20 |
* |
|
21 |
*/ |
|
22 |
public function setUp() { |
|
20 | 23 |
// Enable admin menu module and any other modules. |
21 | 24 |
$modules = func_get_args(); |
22 | 25 |
$modules = isset($modules[0]) ? $modules[0] : $modules; |
... | ... | |
108 | 111 |
$xpath = '//div[@id="admin-menu"]/div/ul' . implode('/parent::li/ul', $xpath); |
109 | 112 |
$this->assertNoElementByXPath($xpath, $args, $message . ' link not found.'); |
110 | 113 |
} |
114 |
|
|
111 | 115 |
} |
112 | 116 |
|
113 | 117 |
/** |
114 | 118 |
* Tests menu links depending on user permissions. |
115 | 119 |
*/ |
116 | 120 |
class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { |
121 |
|
|
122 |
/** |
|
123 |
* |
|
124 |
*/ |
|
117 | 125 |
public static function getInfo() { |
118 | 126 |
return array( |
119 | 127 |
'name' => 'Menu link access permissions', |
... | ... | |
122 | 130 |
); |
123 | 131 |
} |
124 | 132 |
|
125 |
function setUp() { |
|
133 |
/** |
|
134 |
* |
|
135 |
*/ |
|
136 |
public function setUp() { |
|
126 | 137 |
parent::setUp(array('node')); |
127 | 138 |
} |
128 | 139 |
|
129 | 140 |
/** |
130 | 141 |
* Test that the links are added to the page (no JS testing). |
131 | 142 |
*/ |
132 |
function testPermissions() { |
|
143 |
public function testPermissions() {
|
|
133 | 144 |
module_enable(array('contact')); |
134 | 145 |
$this->resetAll(); |
135 | 146 |
|
... | ... | |
140 | 151 |
// Create a user who |
141 | 152 |
// - can access content overview |
142 | 153 |
// - cannot access drupal.org links |
143 |
// - cannot administer Contact module |
|
154 |
// - cannot administer Contact module.
|
|
144 | 155 |
$permissions = $this->basePermissions + array( |
145 | 156 |
'access content overview', |
146 | 157 |
); |
... | ... | |
156 | 167 |
// Create a user "reversed" to the above; i.e., who |
157 | 168 |
// - cannot access content overview |
158 | 169 |
// - can access drupal.org links |
159 |
// - can administer Contact module |
|
170 |
// - can administer Contact module.
|
|
160 | 171 |
$permissions = $this->basePermissions + array( |
161 | 172 |
'display drupal links', |
162 | 173 |
'administer contact forms', |
... | ... | |
172 | 183 |
/** |
173 | 184 |
* Tests handling of links pointing to category/overview pages. |
174 | 185 |
*/ |
175 |
function testCategories() { |
|
186 |
public function testCategories() {
|
|
176 | 187 |
// Create a user with minimum permissions. |
177 | 188 |
$admin_user = $this->drupalCreateUser($this->basePermissions); |
178 | 189 |
$this->drupalLogin($admin_user); |
... | ... | |
201 | 212 |
/** |
202 | 213 |
* Tests that user role and permission changes are properly taken up. |
203 | 214 |
*/ |
204 |
function testPermissionChanges() { |
|
215 |
public function testPermissionChanges() {
|
|
205 | 216 |
// Create a user who is able to change permissions. |
206 | 217 |
$permissions = $this->basePermissions + array( |
207 | 218 |
'administer permissions', |
... | ... | |
253 | 264 |
// Verify that Structure » Content types does not appear. |
254 | 265 |
$this->assertNoLinkTrailByTitle(array(t('Structure'), t('Content types'))); |
255 | 266 |
} |
267 |
|
|
256 | 268 |
} |
257 | 269 |
|
258 | 270 |
/** |
259 | 271 |
* Tests appearance, localization, and escaping of dynamic links. |
260 | 272 |
*/ |
261 | 273 |
class AdminMenuDynamicLinksTestCase extends AdminMenuWebTestCase { |
274 |
|
|
275 |
/** |
|
276 |
* |
|
277 |
*/ |
|
262 | 278 |
public static function getInfo() { |
263 | 279 |
return array( |
264 | 280 |
'name' => 'Dynamic links', |
... | ... | |
267 | 283 |
); |
268 | 284 |
} |
269 | 285 |
|
270 |
function setUp() { |
|
286 |
/** |
|
287 |
* |
|
288 |
*/ |
|
289 |
public function setUp() { |
|
271 | 290 |
parent::setUp(array('node')); |
272 | 291 |
} |
273 | 292 |
|
274 | 293 |
/** |
275 | 294 |
* Tests node type links. |
276 | 295 |
*/ |
277 |
function testNode() { |
|
296 |
public function testNode() {
|
|
278 | 297 |
$type = $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); |
279 | 298 |
// Create a content-type with special characters. |
280 | 299 |
$type = $this->drupalCreateContentType(array('type' => 'special', 'name' => 'Cool & Special')); |
... | ... | |
324 | 343 |
/** |
325 | 344 |
* Tests Add content links. |
326 | 345 |
*/ |
327 |
function testNodeAdd() { |
|
346 |
public function testNodeAdd() {
|
|
328 | 347 |
$type = $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); |
329 | 348 |
|
330 | 349 |
// Verify that "Add content" does not appear for unprivileged users. |
... | ... | |
359 | 378 |
t('Add content'), |
360 | 379 |
)); |
361 | 380 |
} |
381 |
|
|
362 | 382 |
} |
363 | 383 |
|
364 | 384 |
/** |
365 | 385 |
* Tests appearance of different types of links. |
366 | 386 |
*/ |
367 | 387 |
class AdminMenuLinkTypesTestCase extends AdminMenuWebTestCase { |
388 |
|
|
389 |
/** |
|
390 |
* |
|
391 |
*/ |
|
368 | 392 |
public static function getInfo() { |
369 | 393 |
return array( |
370 | 394 |
'name' => 'Link types', |
... | ... | |
373 | 397 |
); |
374 | 398 |
} |
375 | 399 |
|
376 |
function setUp() { |
|
400 |
/** |
|
401 |
* |
|
402 |
*/ |
|
403 |
public function setUp() { |
|
377 | 404 |
parent::setUp(array('help')); |
378 | 405 |
|
379 | 406 |
$permissions = module_invoke_all('permission'); |
... | ... | |
385 | 412 |
/** |
386 | 413 |
* Tests appearance of different router item link types. |
387 | 414 |
*/ |
388 |
function testLinkTypes() { |
|
415 |
public function testLinkTypes() {
|
|
389 | 416 |
// Verify that MENU_NORMAL_ITEMs appear. |
390 | 417 |
$this->assertLinkTrailByTitle(array( |
391 | 418 |
t('Configuration'), |
... | ... | |
420 | 447 |
':title' => t('Index'), |
421 | 448 |
), "Icon » Index link found."); |
422 | 449 |
} |
450 |
|
|
423 | 451 |
} |
424 | 452 |
|
425 | 453 |
/** |
426 | 454 |
* Tests customized menu links. |
427 | 455 |
*/ |
428 | 456 |
class AdminMenuCustomizedTestCase extends AdminMenuWebTestCase { |
457 |
|
|
458 |
/** |
|
459 |
* |
|
460 |
*/ |
|
429 | 461 |
public static function getInfo() { |
430 | 462 |
return array( |
431 | 463 |
'name' => 'Customized links', |
... | ... | |
434 | 466 |
); |
435 | 467 |
} |
436 | 468 |
|
437 |
function setUp() { |
|
469 |
/** |
|
470 |
* |
|
471 |
*/ |
|
472 |
public function setUp() { |
|
438 | 473 |
parent::setUp(array('menu')); |
439 | 474 |
|
440 | 475 |
$this->admin_user = $this->drupalCreateUser($this->basePermissions + array( |
... | ... | |
446 | 481 |
/** |
447 | 482 |
* Test disabled custom links. |
448 | 483 |
*/ |
449 |
function testCustomDisabled() { |
|
484 |
public function testCustomDisabled() {
|
|
450 | 485 |
$type = $this->drupalCreateContentType(); |
451 | 486 |
$node = $this->drupalCreateNode(array('type' => $type->type)); |
452 | 487 |
$text = $this->randomName(); |
... | ... | |
488 | 523 |
/** |
489 | 524 |
* Tests external links. |
490 | 525 |
*/ |
491 |
function testCustomExternal() { |
|
526 |
public function testCustomExternal() {
|
|
492 | 527 |
// Add a custom link to the node to the menu. |
493 | 528 |
$edit = array( |
494 | 529 |
'link_path' => 'http://example.com', |
... | ... | |
516 | 551 |
':path' => $path, |
517 | 552 |
))->fetchField(); |
518 | 553 |
} |
519 |
} |
|
520 | 554 |
|
555 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules