Permalink
Browse files

backend cms fixes

  • Loading branch information...
1 parent 37a194f commit 5606836088f850708144daa9414ef5265e2423f9 @quincykwende quincykwende committed Mar 27, 2013
@@ -1,3 +1,3 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
-abstract class Cms_Associator extends Lattice_Cms_Associator { }
+class Cms_Associator extends Lattice_Cms_Associator { }
@@ -110,7 +110,7 @@ public function action_get_list($list_object_id_or_parent_id, $family = NULL)
foreach ($list_members as $object)
{
- $html_chunks = latticecms::buildUIHtml_chunks_for_object($object);
+ $html_chunks = Cms_Core::buildUIHtml_chunks_for_object($object);
$custom_item_view = 'lattice/object_types/' . $object->objecttype->objecttypename;
$item_view = NULL;
@@ -203,7 +203,7 @@ public function action_add_object($list_object_id, $object_type_id=NULL)
// $item->email = NULL;
/*End cludge*/
- $html_chunks = latticecms::buildUIHtml_chunks_for_object($object);
+ $html_chunks = Cms_Core::buildUIHtml_chunks_for_object($object);
$custom_item_view = 'lattice/object_types/' . $object->objecttype->objecttypename;
$item_view = NULL;
@@ -117,7 +117,7 @@ public static function buildUIHtml_chunks($elements, $object = NULL)
break;
case 'associator':
- $associator = new Associator($object->id, $element['lattice'],$element['filters']);
+ $associator = new Cms_Associator($object->id, $element['lattice'],$element['filters']);
$associator->set_label($element['label']);
$associator->set_pool_label($element['pool_label']);
$associator->set_page_length(Kohana::config('cms.associator_page_length'));
@@ -265,7 +265,7 @@ public static function convert_xml_element_to_array($object, $element)
case 'associator':
// need to load filters here
- $entry['filters'] = Associator::get_filters_from_dom_node($element);
+ $entry['filters'] = Cms_Associator::get_filters_from_dom_node($element);
$entry['pool_label'] = $element->getAttribute('pool_label');
$entry['associator_type'] = $element->getAttribute('associator_type');
$entry['page_length'] = Kohana::config('cms.associator_page_length');;
@@ -10,7 +10,7 @@
*
* @author deepwinter1
*/
-class Model_List_container extends Model_Object {
+class Model_listcontainer extends Model_Object {
protected $_has_one = array(
'objecttype' => array('foreign_key'=>'objecttype_id')
View
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE configuration SYSTEM "clusters.dtd">
+
+<configuration>
+ <clusters>
+<!--
+ page meta bits need to expand frontend side to offer more than just opengraph stuff maybe foaf and rdf
+-->
+ <objectType name="pagemeta">
+ <elements>
+ <text name="slug" label="Page Slug" />
+ <text name="windowTitle" label="Browser Window Title" />
+ <text name="description" label="Meta Description" />
+ <text name="socialDescription" label="Share Description" />
+ <text name="keywords" label="Page Keywords" />
+ <image name="img" label="Page Thumb">
+ <resize name="uithumb" width="90" height="90" forceDimension="height" />
+ </image>
+ </elements>
+ </objectType>
+<!-- link cluster -->
+ <objectType name="link">
+ <elements>
+ <text name="label" label="Label" isMultiline="false" />
+ <text name="url" label="URL" isMultiline="false" />
+ <checkbox name="external" label="external" />
+ </elements>
+ </objectType>
+
+<!-- @Todo, create an image cluster so that it's not necessary to define it via the ojbecttype, although that gives you more control over the markup, still some defaults are nice -->
+ </clusters>
+
+</configuration>
+
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ LatticeCMS Frontend Data File DTD
+ Revision: 0.1
+ Date: 2010/09/30
+-->
+
+<!ELEMENT configuration (module*) >
+
+<!ELEMENT module EMPTY >
+<!ATTLIST module
+ controller CDATA #REQUIRED
+ parent CDATA "Lattice_NOTHING"
+ label CDATA #REQUIRED
+>
+
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE configuration SYSTEM "cms_modules.dtd">
+
+<configuration>
+
+ <module controller="usermanagement" label="Add &amp; modify users" />
+
+</configuration>
View
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ LatticeCMS Data Configuration File DTD
+ Revision: 0.1
+ Date: 2010/09/18
+-->
+
+<!ELEMENT data (nodes,relationships) >
+
+<!ELEMENT nodes (item*) >
+
+<!ELEMENT item (item|field|list|object)* >
+<!ATTLIST item
+ objectTypeName CDATA #REQUIRED
+>
+
+<!ELEMENT field (#PCDATA|field)* >
+<!ATTLIST field
+ name CDATA #REQUIRED
+>
+
+<!ELEMENT list (item*) >
+<!ATTLIST list
+ family CDATA #REQUIRED
+>
+
+<!ELEMENT object (field*) >
+<!ATTLIST object
+ name CDATA #REQUIRED
+>
+
+<!ELEMENT relationships (lattice*) >
+
+<!ELEMENT lattice (relationship*)>
+<!ATTLIST lattice
+ name CDATA #REQUIRED
+>
+
+<!ELEMENT relationship EMPTY >
+<!ATTLIST relationship
+ parent CDATA #REQUIRED
+ child CDATA #REQUIRED
+>
View
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE data SYSTEM "data.dtd">
+<data>
+ <nodes>
+
+ <item objectTypeName="tagsObjectType">
+ <field name="title">Tags</field>
+ </item>
+
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 1</field>
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 2</field>
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 3 A</field>
+ </item>
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 3 B</field>
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 4 A</field>
+ </item>
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 4 B</field>
+ </item>
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 4 C</field>
+ </item>
+ </item>
+ <item objectTypeName="basicCategory">
+ <field name="title">Category 3 C</field>
+ </item>
+ </item>
+ </item>
+
+ <item objectTypeName="singleIPE">
+ <field name="title">Single IPE</field>
+ <item objectTypeName="multilineIPE">
+ <field name="title">Multiline as Component</field>
+ </item>
+ </item>
+
+ <item objectTypeName="multilineIPE">
+ <field name="title">Multiline IPE</field>
+ </item>
+
+ <item objectTypeName="singleRadioGroup">
+ <field name="title">Single Radio Group</field>
+ </item>
+
+ <item objectTypeName="singleCheckbox">
+ <field name="title">Single checkbox</field>
+ </item>
+
+ <item objectTypeName="singleDate">
+ <field name="title">Single Date</field>
+ </item>
+
+ <item objectTypeName="singleTime">
+ <field name="title">Single Time</field>
+ </item>
+
+ <item objectTypeName="singleFile">
+ <field name="title">Single File</field>
+ <field name="file">lattice/latticetests/testdata/ctoolsAllCases.csv</field>
+ </item>
+
+ <item objectTypeName="singleImage">
+ <field name="title">Single Image</field>
+ <field name="file">lattice/latticetests/testdata/29305_390907843268_707068268_4114906_7182725_n.jpg</field>
+ <item objectTypeName="singleImage">
+ <field name="title">Image Build Test</field>
+ <field name="file">lattice/latticetests/testdata/29305_390907843268_707068268_4114906_7182725_n.jpg</field>
+ </item>
+ </item>
+
+ <item objectTypeName="simpleListModule">
+ <field name="title">Simple List Module</field>
+ <list family="simplelist">
+ <item objectTypeName="simpleListModuleItem">
+ <field name="title">THIS IS THE TITLE</field>
+ </item>
+ </list>
+ </item>
+ <item objectTypeName="complexListModule">
+ <field name="title">Complex List Module</field>
+ </item>
+
+ <item objectTypeName="imageListModule">
+ <field name="title">Image List</field>
+ </item>
+
+ <item objectTypeName="fileListModule">
+ <field name="title">File List</field>
+ </item>
+
+ <item objectTypeName="singleAssociator">
+ <field name="title">Associator</field>
+ </item>
+ <item objectTypeName="linkTest">
+ <field name="title">Link Test</field>
+ <object name="theLink">
+ <field name="url">lasdf</field>
+ <field name="label">nas as s</field>
+ </object>
+ </item>
+</nodes>
+<relationships></relationships>
+
+</data>
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE data SYSTEM "data.dtd">
+<data>
+
+ <item objectTypeName="objectTypeName">
+ <field name="name">Label</field>
+ </item>
+
+</data>
View
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ LatticeCMS Frontend Data File DTD
+ Revision: 0.1
+ Date: 2010/09/30
+-->
+
+<!ELEMENT configuration (view*) >
+
+<!ELEMENT view (includeData|subView)* >
+<!ATTLIST view
+ name CDATA #REQUIRED
+ loadPage (true|false) "true"
+>
+
+<!ELEMENT includeData ANY >
+<!ATTLIST includeData
+ from CDATA "parent"
+ label CDATA #REQUIRED
+ objectTypeFilter CDATA "all"
+ where CDATA #IMPLIED
+ tagged CDATA #IMPLIED
+ slug CDATA #IMPLIED
+ sortBy CDATA #IMPLIED
+ sortDirection CDATA #IMPLIED
+>
+
+<!ELEMENT subView EMPTY >
+<!ATTLIST subView
+ view CDATA #IMPLIED
+ slug CDATA #IMPLIED
+ label CDATA #REQUIRED
+>
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE configuration SYSTEM "frontend.dtd">
+
+<configuration>
+ <view name="singleIPE">
+ <includeData from="parent" label="something"/>
+ </view>
+
+ <view name="whatever">
+ <includeData from="single-ipe" label="something"/>
+ </view>
+</configuration>
+
@@ -0,0 +1,5 @@
+<menu>
+ <books /> <!-- the idea i had was for these to map to the 'names' in the frontend.xml, or be specific slugs -->
+ <contact /> <!-- each item could also have the frontend sub-items in it -->
+ <wheretofind /> <!-- somehow this will generate the default code for the menu -->
+</menu>
Oops, something went wrong.

0 comments on commit 5606836

Please sign in to comment.