Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d6b538ef
Commit
d6b538ef
authored
Apr 30, 2006
by
drumm
Browse files
Forward port from 4.7
#60934
, The vocabulary list screen needs an 'add term' operation, patch by chx
parent
f0cd92dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy.module
View file @
d6b538ef
...
...
@@ -132,6 +132,7 @@ function taxonomy_overview_vocabularies() {
$form
[
$vocabulary
->
vid
][
'type'
]
=
array
(
'#value'
=>
implode
(
', '
,
$types
));
$form
[
$vocabulary
->
vid
][
'edit'
]
=
array
(
'#value'
=>
l
(
t
(
'edit vocabulary'
),
"admin/taxonomy/edit/vocabulary/
$vocabulary->vid
"
));
$form
[
$vocabulary
->
vid
][
'list'
]
=
array
(
'#value'
=>
l
(
t
(
'list terms'
),
"admin/taxonomy/
$vocabulary->vid
"
));
$form
[
$vocabulary
->
vid
][
'add'
]
=
array
(
'#value'
=>
l
(
t
(
'add terms'
),
"admin/taxonomy/
$vocabulary->vid
/add/term"
));
}
return
drupal_get_form
(
'taxonomy_overview_vocabularies'
,
$form
);
...
...
@@ -149,13 +150,14 @@ function theme_taxonomy_overview_vocabularies($form) {
$row
[]
=
form_render
(
$form
[
$key
][
'type'
]);
$row
[]
=
form_render
(
$form
[
$key
][
'edit'
]);
$row
[]
=
form_render
(
$form
[
$key
][
'list'
]);
$row
[]
=
form_render
(
$form
[
$key
][
'add'
]);
$rows
[]
=
$row
;
}
}
if
(
!
$rows
)
{
$rows
[]
=
array
(
array
(
'data'
=>
t
(
'No categories available.'
),
'colspan'
=>
'
4
'
,
'class'
=>
'message'
));
$rows
[]
=
array
(
array
(
'data'
=>
t
(
'No categories available.'
),
'colspan'
=>
'
5
'
,
'class'
=>
'message'
));
}
$header
=
array
(
t
(
'Name'
),
t
(
'Type'
),
array
(
'data'
=>
t
(
'Operations'
),
'colspan'
=>
'
2
'
));
$header
=
array
(
t
(
'Name'
),
t
(
'Type'
),
array
(
'data'
=>
t
(
'Operations'
),
'colspan'
=>
'
3
'
));
$output
=
theme
(
'table'
,
$header
,
$rows
,
array
(
'id'
=>
'taxonomy'
));
$output
.
=
form_render
(
$form
);
...
...
modules/taxonomy/taxonomy.module
View file @
d6b538ef
...
...
@@ -132,6 +132,7 @@ function taxonomy_overview_vocabularies() {
$form
[
$vocabulary
->
vid
][
'type'
]
=
array
(
'#value'
=>
implode
(
', '
,
$types
));
$form
[
$vocabulary
->
vid
][
'edit'
]
=
array
(
'#value'
=>
l
(
t
(
'edit vocabulary'
),
"admin/taxonomy/edit/vocabulary/
$vocabulary->vid
"
));
$form
[
$vocabulary
->
vid
][
'list'
]
=
array
(
'#value'
=>
l
(
t
(
'list terms'
),
"admin/taxonomy/
$vocabulary->vid
"
));
$form
[
$vocabulary
->
vid
][
'add'
]
=
array
(
'#value'
=>
l
(
t
(
'add terms'
),
"admin/taxonomy/
$vocabulary->vid
/add/term"
));
}
return
drupal_get_form
(
'taxonomy_overview_vocabularies'
,
$form
);
...
...
@@ -149,13 +150,14 @@ function theme_taxonomy_overview_vocabularies($form) {
$row
[]
=
form_render
(
$form
[
$key
][
'type'
]);
$row
[]
=
form_render
(
$form
[
$key
][
'edit'
]);
$row
[]
=
form_render
(
$form
[
$key
][
'list'
]);
$row
[]
=
form_render
(
$form
[
$key
][
'add'
]);
$rows
[]
=
$row
;
}
}
if
(
!
$rows
)
{
$rows
[]
=
array
(
array
(
'data'
=>
t
(
'No categories available.'
),
'colspan'
=>
'
4
'
,
'class'
=>
'message'
));
$rows
[]
=
array
(
array
(
'data'
=>
t
(
'No categories available.'
),
'colspan'
=>
'
5
'
,
'class'
=>
'message'
));
}
$header
=
array
(
t
(
'Name'
),
t
(
'Type'
),
array
(
'data'
=>
t
(
'Operations'
),
'colspan'
=>
'
2
'
));
$header
=
array
(
t
(
'Name'
),
t
(
'Type'
),
array
(
'data'
=>
t
(
'Operations'
),
'colspan'
=>
'
3
'
));
$output
=
theme
(
'table'
,
$header
,
$rows
,
array
(
'id'
=>
'taxonomy'
));
$output
.
=
form_render
(
$form
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment