theme templates

Pasqualle - September 6, 2008 - 20:04
Project:Context
Version:6.x-2.0-alpha2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

version: 6.x

The forms should use theme templates.

#1

Pasqualle - September 7, 2008 - 14:00
Version:5.x-1.x-dev» 6.x-1.x-dev

#2

dmitrig01 - February 3, 2009 - 05:37
Status:active» by design

I'm going to have to disagree with you here - the markup actually isn't complicated at all.

#3

Pasqualle - April 17, 2009 - 21:35
Version:6.x-1.x-dev» 6.x-2.0-alpha2
Status:by design» needs review

theme template file for the admin landing page

additional new files:
context_ui/theme/context-ui-list-contexts.tpl.php
context_ui/help/getting-started.html
context_ui/css/contexts-list.css

AttachmentSize
304886-contexts_list.png 28.73 KB
304886-contexts_list.patch 14.69 KB
304886-context-ui-list-contexts.tpl_.php_.txt 1.59 KB
304886-getting-started.html_.txt 40 bytes

#4

Pasqualle - April 17, 2009 - 21:34

the missing one

AttachmentSize
304886-contexts-list.css_.txt 1.69 KB

#5

yhahn - May 4, 2009 - 06:31
Status:needs review» needs work

FYI, this is very interesting, I like some of the ideas (showing the summaries of the conditions/reactions for each context) while I miss some pieces of the old layout (tree indenting made for easy quick scanning).

I'd like to work on this more post 2.0 release -- for 2.1 perhaps?

#6

Pasqualle - May 4, 2009 - 12:43

Do you have a good layout idea (mockup) for tree indenting? I would like to implement filters and sort also (like in views), so that could be problematic for the tree layout. But if someone knows a good layout, then please help me here..

#7

Pasqualle - May 31, 2009 - 00:48
Status:needs work» needs review

improved layout
2 new files moved to the main context_ui directory, to be able to generate one patch file..

AttachmentSize
304886-7-contexts_list.patch 17.7 KB
3044886-7-contexts_list.png 11.98 KB

#8

dmitrig01 - May 31, 2009 - 02:31

Looks good (visually).

+
+

<?php
/*print $widgets;*/
?>

no thanks

<?php
// list contexts (admin landing page)
?>

capitalize comment and adda period at the end

+<?php if (isset($close_div)): ?>
+  </div>
+<?php endif; ?>

when's that used? it doesn't look like it's used anywhere

#9

Pasqualle - May 31, 2009 - 14:02

$widgets should be the next patch which adds sort and filter

you are right about the comment

that $close_div part is closing the last "namespace>attribute" box. If the contexts array would be in a tree presentation, that template would be much readable with two foreach loops (div starting at foreach, div closing at foreach end).

foreach namespace-attribute
  <div>
  foreach contexts in that namespace-atribute
    //
  endforeach
  </div>
endforeach

It is possible to create the tree presentation of contexts in the template, but it would require going through the list twice.

#10

dmitrig01 - May 31, 2009 - 15:51

I like that, and you don't need to go through twice, just change

<?php
+    $vars['contexts'][] = $item;
?>

to
<?php
+    $vars['contexts']["$item->namespace-$item->attribute"][] = $item;
?>

#11

Pasqualle - May 31, 2009 - 17:23

used:

$vars['contexts_tree'][$item->namespace][$item->attribute][$item->name] = $item;

so it is now possible to easily create a bounding box for the namespace also..

and fixed all the problems from #8

AttachmentSize
304886-11-contexts_list.patch 17.68 KB
 
 

Drupal is a registered trademark of Dries Buytaert.