commit fd575e07dac79ede5266f6f5ce525a009f62600e Author: Joel Pittet Date: Sat Jul 13 22:26:27 2013 -0700 32 diff --git a/core/modules/node/node.module b/core/modules/node/node.module index d7c8009..434229d 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1444,19 +1444,15 @@ function template_preprocess_node_recent_block(&$variables) { function template_preprocess_node_recent_content(&$variables) { $node = $variables['node']; - $variables['link'] = l($node->label(), 'node/' . $node->nid); + $variables['link'] = l($node->label(), 'node/' . $node->id()); $variables['mark'] = array( '#theme' => 'mark', - '#type' => node_mark($node->nid, $node->changed), + '#type' => node_mark($node->id(), $node->changed), ); $variables['username'] = array( '#theme' => 'username', - '#account' => user_load($node->uid), + '#account' => $node->getAuthor(), ); - $output .= drupal_render($username); - $output .= ''; - - return $output; } /** @@ -1628,7 +1624,7 @@ function node_feed($nids = FALSE, $channel = array()) { 'title' => config('system.site')->get('name'), 'link' => $base_url, 'description' => $rss_config->get('channel.description'), - 'language' => $language_content->langcode + 'language' => $language_content->id ); $channel_extras = array_diff_key($channel, $channel_defaults); $channel = array_merge($channel_defaults, $channel); @@ -1749,21 +1745,21 @@ function _node_index_node(EntityInterface $node) { foreach ($languages as $language) { // Render the node. - $build = node_view($node, 'search_index', $language->langcode); + $build = node_view($node, 'search_index', $language->id); unset($build['#theme']); $node->rendered = drupal_render($build); - $text = '

' . check_plain($node->label($language->langcode)) . '

' . $node->rendered; + $text = '

' . check_plain($node->label($language->id)) . '

' . $node->rendered; // Fetch extra data normally not visible. - $extra = module_invoke_all('node_update_index', $node, $language->langcode); + $extra = module_invoke_all('node_update_index', $node, $language->id); foreach ($extra as $t) { $text .= $t; } // Update index. - search_index($node->id(), 'node', $text, $language->langcode); + search_index($node->nid, 'node', $text, $language->id); } } @@ -2045,7 +2041,7 @@ function node_access($op, $node, $account = NULL, $langcode = NULL) { // Load languages the node exists in. $node_translations = $node->getTranslationLanguages(); // Load the language from content negotiation. - $content_negotiation_langcode = language(Language::TYPE_CONTENT)->langcode; + $content_negotiation_langcode = language(Language::TYPE_CONTENT)->id; // If there is a translation available, use it. if (isset($node_translations[$content_negotiation_langcode])) { $langcode = $content_negotiation_langcode; @@ -2549,7 +2545,7 @@ function node_language_delete($language) { // On nodes with this language, unset the language. db_update('node') ->fields(array('langcode' => '')) - ->condition('langcode', $language->langcode) + ->condition('langcode', $language->id) ->execute(); } diff --git a/core/modules/node/templates/node-add-list.html.twig b/core/modules/node/templates/node-add-list.html.twig index 1ec56cb..e98a8c1 100644 --- a/core/modules/node/templates/node-add-list.html.twig +++ b/core/modules/node/templates/node-add-list.html.twig @@ -10,7 +10,6 @@ * - add_link: Link to create a piece of content of this type. * - description: Description of this type of content. * - * @see template_preprocess() * @see template_preprocess_node_add_list() * * @ingroup themeable diff --git a/core/modules/node/templates/node-admin-overview.html.twig b/core/modules/node/templates/node-admin-overview.html.twig index 7438945..729fdc5 100644 --- a/core/modules/node/templates/node-admin-overview.html.twig +++ b/core/modules/node/templates/node-admin-overview.html.twig @@ -10,7 +10,6 @@ * - machine_name: Machine readable name of the content type. * - description: Description of the content type. * - * @see template_preprocess() * @see template_preprocess_node_admin_overview() * * @ingroup themeable diff --git a/core/modules/node/templates/node-preview.html.twig b/core/modules/node/templates/node-preview.html.twig index aa8ec0e..1bc3441 100644 --- a/core/modules/node/templates/node-preview.html.twig +++ b/core/modules/node/templates/node-preview.html.twig @@ -10,7 +10,6 @@ * - teaser: Trimmed teaser version of the node. * - full: Full version of the node. * - * @see template_preprocess() * @see template_preprocess_node_preview() * * @ingroup themeable diff --git a/core/modules/node/templates/node-recent-block.html.twig b/core/modules/node/templates/node-recent-block.html.twig index 092326d..0c0c21b 100644 --- a/core/modules/node/templates/node-recent-block.html.twig +++ b/core/modules/node/templates/node-recent-block.html.twig @@ -7,7 +7,6 @@ * - table: A rendered HTML table of recent content. * - more_link: A rendered link to show more content. * - * @see template_preprocess() * @see template_preprocess_node_recent_block() * * @ingroup themeable diff --git a/core/modules/node/templates/node-recent-content.html.twig b/core/modules/node/templates/node-recent-content.html.twig index f1a6d34..0299d8c 100644 --- a/core/modules/node/templates/node-recent-content.html.twig +++ b/core/modules/node/templates/node-recent-content.html.twig @@ -8,7 +8,6 @@ * - mark: HTML marker for new or updated content. * - username: The author of the content. * - * @see template_preprocess() * @see template_preprocess_node_recent_content() * * @ingroup themeable diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 9787be4..9928ddd 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -37,6 +37,30 @@ function seven_preprocess_page(&$variables) { } /** + * Displays the list of available node types for node creation. + */ +function seven_node_add_list($variables) { + $content = $variables['content']; + $output = ''; + if ($content) { + $output = ''; + } + else { + $output = '

' . t('You have not created any content types yet. Go to the content type creation page to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) . '

'; + } + return $output; +} + +/** * Overrides theme_custom_block_add_list(). * * Displays the list of available custom block types for creation. diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css index 80c2e83..3e66ac7 100644 --- a/core/themes/seven/style.css +++ b/core/themes/seven/style.css @@ -439,12 +439,11 @@ ul.inline li { ul.inline li { display: inline; } -.node-type-list { +.admin-list { margin: 0; padding: 0; } -.admin-list li, -.admin-list dt { +.admin-list li { position: relative; border-top: 1px solid #ccc; margin: 0; @@ -452,12 +451,10 @@ ul.inline li { list-style-image: none; padding: 0; } -.admin-list.compact li, -.admin-list.compact dt { +.admin-list.compact li { border: none; } -.admin-list li a, -.admin-list dt a{ +.admin-list li a { background: url(images/list-item.png) no-repeat 9px 11px; /* LTR */ display: block; padding: 9px 9px 9px 39px; /* LTR */ @@ -467,25 +464,18 @@ ul.inline li { background: url(images/list-item-rtl.png) no-repeat right 11px; padding: 9px 39px 9px 9px; } -.admin-list.compact li a, -.admin-list.compact dt a { +.admin-list.compact li a { background-image: none; padding: 2px 19px; } .admin-list li a:hover, .admin-list li a:focus, -.admin-list li a:active, -.admin-list dt a:hover, -.admin-list dt a:focus, -.admin-list dt a:active { +.admin-list li a:active { text-decoration: none; } .admin-list li a:hover .label, .admin-list li a:focus .label, -.admin-list li a:active .label, -.admin-list dt a:hover .label, -.admin-list dt a:focus .label, -.admin-list dt a:active .label { +.admin-list li a:active .label { text-decoration: underline; } div.submitted {