Comments

artofeclipse’s picture

vlad.dancer’s picture

Status: Needs review » Reviewed & tested by the community

Works fine! Thx!

podarok’s picture

Status: Reviewed & tested by the community » Fixed

#1 commited / pushed to front-end

Thanks!

c4rl’s picture

Status: Fixed » Needs work

Don't we need to remove theme_filter_admin_overview from filter.admin.inc?

c4rl’s picture

Status: Needs work » Fixed

Nevermind, I didn't realize that Drupal breaks if we remove these since only one theme is using Twig as of now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

artofeclipse’s picture

Component: Twig templates » Twig templates conversion (front-end branch)
Status: Closed (fixed) » Needs review
StatusFileSize
new5.76 KB

re-implements to reflect the new changes on table theme.

joelpittet’s picture

@artofeclipse the table stuff I did shouldn't have broke this, it should work with and without twig just the same as before. I like the intent to help out the Attribute stuff but the way you had it before was closer to what it should be, IMO.

You should be able to call theme('table', $variables['table']) from this preprocess function or from twig itself instead of having to directly call the preprocess and include in the twig file. Someone was telling me they prefer to have theme() in a twig file vs the include.

I will see why this is breaking in the mean time but just wanted to get you on a slightly better path in the meantime:)

joelpittet’s picture

Formats doesn't seem to be getting 'configure' and 'disable' anymore as separate elements & columns due to that little popdown operations thing from views. It's just a 'operations' key now.

        drupal_render($form['formats'][$id]['configure']),
        drupal_render($form['formats'][$id]['disable']),

becomes

        drupal_render($form['formats'][$id]['operations']),

and remove , 'colspan' => 2 from the Operations header.

artofeclipse’s picture

Thanks for this, but as I recall jenlampton said it should be something like this #1830192: Convert theme_taxonomy_overview_terms to twig. and I didn't have the time to catch up with the new changes and the discussion that happens on the this initiative. anyway thanks for directing me :)

joelpittet’s picture

Ah yeah so your splitting out the variables for the template is good way to go. Just the operations thing and no more {% include %}

The reference I was to lazy to find the first post...
http://drupal.org/node/1848116

artofeclipse’s picture

fixed in this patch :)

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Looks good! thanks artofeclipse.

steveoliver’s picture

Assigned: artofeclipse » steveoliver
Status: Reviewed & tested by the community » Needs work

I'll finish this up.

steveoliver’s picture

I'll commit this if someone else wants to give it another look.

steveoliver’s picture

+++ b/core/modules/filter/filter.admin.inc
@@ -111,23 +111,21 @@ function theme_filter_admin_overview($variables) {
 function template_preprocess_filter_admin_overview(&$variables) {
   $form = $variables['form'];
 
+  // Format the form as a table.
+  // @todo Maybe let templates decide format?
+  // @see http://drupal.org/node/1777532
   $rows = array();

This issue link may not be appropriate. I'm not sure I understand what issue we want to reference, but it seemed to me we were talking about calling theme() from within templates, so thise template could call theme('table').

+++ b/core/modules/filter/filter.admin.inc
@@ -148,10 +146,8 @@ function template_preprocess_filter_admin_overview(&$variables) {
+  // We call the rest of the form 'children'.
   $variables['children'] = drupal_render_children($form);
-  //@todo remove this once http://drupal.org/node/1777532 is resolved.
-  $variables['pager'] = theme('pager');
-  $variables['form'] = drupal_render_children($form);

form...children...same diff. I don't think there was supposed to be a 'pager', though. See theme_filter_admin_overview().

EDIT: s/this/the template/

joelpittet’s picture

Cleaner, looks good. A bit arbitrary what things we pass to the twig templates and what we don't.

themetable! ftw:) ... well probably not but it sounds like a word. Oh man it's late.

steveoliver’s picture

Title: converting theme_filter_admin_overview to twig » Convert theme('filter_admin_overview') to Twig
Status: Needs review » Fixed

Looks good -- tested to make sure we didn't break anything for non-Stark themes. Seven looks great.

Committed in 6d65b6b6b.

steveoliver’s picture

@todo: Make this table responsive?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1750250)