Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3174996
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3174996
Commits
05420fde
Commit
05420fde
authored
16 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#302120
by dmitrig01: usability improvement - make the content type admin screen prettier.
parent
a6a58c16
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
modules/node/content_types.inc
+11
-8
11 additions, 8 deletions
modules/node/content_types.inc
modules/node/node.module
+3
-0
3 additions, 0 deletions
modules/node/node.module
with
15 additions
and
8 deletions
CHANGELOG.txt
+
1
−
0
View file @
05420fde
...
...
@@ -29,6 +29,7 @@ Drupal 7.0, xxxx-xx-xx (development version)
file copy to the includes directory).
* Added an edit tab to taxonomy term pages.
* Redesigned password strength validator.
* Redesigned the add content type screen.
- News aggregator:
* Added OPML import functionality for RSS feeds.
* Optionally, RSS feeds may be configured to not automatically generate feed blocks.
...
...
This diff is collapsed.
Click to expand it.
modules/node/content_types.inc
+
11
−
8
View file @
05420fde
...
...
@@ -12,18 +12,14 @@
function
node_overview_types
()
{
$types
=
node_get_types
();
$names
=
node_get_types
(
'names'
);
$header
=
array
(
t
(
'Name'
),
t
(
'Type'
),
t
(
'Description'
),
array
(
'data'
=>
t
(
'Operations'
),
'colspan'
=>
'2'
));
$header
=
array
(
t
(
'Name'
),
array
(
'data'
=>
t
(
'Operations'
),
'colspan'
=>
'2'
));
$rows
=
array
();
foreach
(
$names
as
$key
=>
$name
)
{
$type
=
$types
[
$key
];
if
(
node_hook
(
$type
,
'form'
))
{
$type_url_str
=
str_replace
(
'_'
,
'-'
,
$type
->
type
);
$row
=
array
(
check_plain
(
$name
),
check_plain
(
$type
->
type
),
filter_xss_admin
(
$type
->
description
),
);
$row
=
array
(
theme
(
'node_admin_overview'
,
$name
,
$type
));
// Set the edit column.
$row
[]
=
array
(
'data'
=>
l
(
t
(
'edit'
),
'admin/build/node-type/'
.
$type_url_str
));
...
...
@@ -45,6 +41,13 @@ function node_overview_types() {
return
theme
(
'table'
,
$header
,
$rows
);
}
function
theme_node_admin_overview
(
$name
,
$type
)
{
$output
=
check_plain
(
$name
);
$output
.
=
' <small> (Machine name: '
.
check_plain
(
$type
->
type
)
.
')</small>'
;
$output
.
=
'<div class="description">'
.
filter_xss_admin
(
$type
->
description
)
.
'</div>'
;
return
$output
;
}
/**
* Generates the node type editing form.
*/
...
...
@@ -71,7 +74,7 @@ function node_type_form(&$form_state, $type = NULL) {
if
(
!
$type
->
locked
)
{
$form
[
'identity'
][
'type'
]
=
array
(
'#title'
=>
t
(
'
Typ
e'
),
'#title'
=>
t
(
'
Machine nam
e'
),
'#type'
=>
'textfield'
,
'#default_value'
=>
$type
->
type
,
'#maxlength'
=>
32
,
...
...
@@ -85,7 +88,7 @@ function node_type_form(&$form_state, $type = NULL) {
'#value'
=>
$type
->
type
,
);
$form
[
'identity'
][
'type_display'
]
=
array
(
'#title'
=>
t
(
'
Typ
e'
),
'#title'
=>
t
(
'
Machine nam
e'
),
'#type'
=>
'item'
,
'#markup'
=>
theme
(
'placeholder'
,
$type
->
type
),
'#description'
=>
t
(
'The machine-readable name of this content type. This field cannot be modified for system-defined content types.'
),
...
...
This diff is collapsed.
Click to expand it.
modules/node/node.module
+
3
−
0
View file @
05420fde
...
...
@@ -135,6 +135,9 @@ function node_theme() {
'node_submitted'
=>
array
(
'arguments'
=>
array
(
'node'
=>
NULL
),
),
'node_admin_overview'
=>
array
(
'arguments'
=>
array
(
'name'
=>
NULL
,
'type'
=>
NULL
),
),
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment