diff --git a/core/modules/node/node.css b/core/modules/node/node.css index 07540fa..43c2625 100644 --- a/core/modules/node/node.css +++ b/core/modules/node/node.css @@ -8,3 +8,7 @@ td.revision-current { background: #ffc; } +.node-type-edit { + font-size: .8em; + margin-left: .5em; +} diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index cd1eb6d..fcbd3df 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -38,6 +38,12 @@ function node_add_page() { $item = array_shift($content); drupal_goto($item['href']); } + else if (user_access('administer content types')) { + //Generate links to edit content type if user has proper permissions + foreach ($content as $key => $item) { + $content[$key]['edit_href'] = str_replace('node/add', 'admin/structure/types/manage', $item['href']); + } + } return theme('node_add_list', array('content' => $content)); } @@ -58,7 +64,13 @@ function theme_node_add_list($variables) { if ($content) { $output = '
'; foreach ($content as $item) { - $output .= '
' . l($item['title'], $item['href'], $item['localized_options']) . '
'; + $output .= '
' . l($item['title'], $item['href'], + $item['localized_options']); + if (isset($item['edit_href'])) { + $output .= $item['edit_href'] ? '[' + . l(t('Edit content type'), $item['edit_href']) . ']' : ''; + } + $output .= '
'; $output .= '
' . filter_xss_admin($item['description']) . '
'; } $output .= '
';