Skip to content

Instantly share code, notes, and snippets.

@jaspertandy
Created October 3, 2011 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaspertandy/1258884 to your computer and use it in GitHub Desktop.
Save jaspertandy/1258884 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mozzarella>
<menu>
<links>
<link default="projects" label="Projects">
<menu>
<links>
<link node="projects" label="Projects"/>
<link node="specialisations" label="Specialisations"/>
</links>
</menu>
</link>
<link node="places" label="Places"/>
<link default="clients" label="Clients">
<menu>
<links>
<link node="clients" label="Clients"/>
<link node="praise" label="Praise"/>
</links>
</menu>
</link>
</links>
</menu>
<paths>
<path>../../builtbybuffalo.com/html/application</path>
</paths>
<nodes>
<node id="places">
<meta>
<title>Places</title>
<table>places</table>
</meta>
<external class="_CustomView">
<options>
<option name="css"><array><var>/media/css/style.css</var></array></option>
<option name="js"><array><var>/media/js/style.js</var></array></option>
</options>
</external>
</node>
<node id="projects">
<meta>
<title>Projects</title>
<table>projects</table>
</meta>
<sections>
<section>
<meta>
<title>Main</title>
</meta>
<fields>
<field type="readonly" label="id" column="id" browse="1" primarykey="1"/>
<field label="Name" type="text" column="name" browse="1">
<options>
<option name="comment"><![CDATA[Type "<em>Trendy Golf1</em>" in this field]]></option>
</options>
</field>
<field label="URL" type="text" column="url" browse="1">
<validation>
<rule fail="You must enter a URL">required</rule>
</validation>
<hide-until>
<field>name</field>
<event>keyup</event>
<value>Trendy Golf1</value>
</hide-until>
</field>
<field label="Image" type="string" column="name_img"/>
<field label="Date Added" type="mysqldate" column="date_added">
<options>
<option name="format"><![CDATA[Y-m-d]]></option>
</options>
</field>
</fields>
</section>
<section>
<meta>
<title>Images</title>
</meta>
<hide-until>
<field>name</field>
<event>keyup</event>
<value>Trendy Golf1</value>
</hide-until>
<fields>
<field label="Hero BG" type="text" column="hero_bg"/>
<field label="Image 1" type="file" column="image_1">
<options>
<option name="path">projects</option>
<option name="prefix">image-1-</option>
<option name="comment">PNG, JPG, GIF</option>
</options>
<validation>
<rule fail="You must upload a file">File_Field::required</rule>
</validation>
</field>
<field label="Thumb 1" type="file" column="t_image_1">
<options>
<option name="path">projects</option>
<option name="prefix">thumb_1</option>
</options>
</field>
<field label="Image 2" type="file" column="image_2">
<options>
<option name="path">projects</option>
<option name="prefix">image-2-</option>
<option name="comment">PNG, JPG, GIF</option>
</options>
<validation>
<rule fail="You must upload a file">File_Field::required</rule>
<rule fail="You must upload an image">File_Field::image</rule>
</validation>
</field>
<field label="Thumb 2" type="file" column="t_image_2">
<options>
<option name="path">projects</option>
<option name="prefix">thumb-2-</option>
<option name="comment">PNG, JPG, GIF</option>
</options>
<validation>
<rule fail="You must upload a file">File_Field::required</rule>
<rule fail="You must upload an image">File_Field::image</rule>
</validation>
</field>
<field label="Image 3" type="file" column="image_3">
<options>
<option name="path">projects</option>
<option name="prefix">image-3-</option>
<option name="comment">PNG, JPG, GIF</option>
</options>
<validation>
<rule fail="You must upload a file">File_Field::required</rule>
<rule fail="You must upload an image">File_Field::image</rule>
</validation>
</field>
<field label="Thumb 3" type="text" column="t_image_3"/>
<field label="Image 4" type="text" column="image_4"/>
<field label="Thumb 4" type="text" column="t_image_4"/>
</fields>
</section>
<section>
<meta>
<title>Specialisations</title>
<table>projects_specialisations</table>
<relate>inner join projects on (projects_specialisations.project_id = projects.id)</relate>
<foreign>project_id</foreign>
<references>id</references>
</meta>
<fields>
<field label="id" type="readonly" column="id" primarykey="1"/>
<field type="dropdown" label="Specialisation" column="specialisation_id">
<options>
<option name="datasource">db</option>
<option name="table">specialisations</option>
<option name="value">id</option>
<option name="string">name</option>
</options>
</field>
</fields>
</section>
</sections>
</node>
<node id="specialisations">
<meta>
<title>Specialisations</title>
<table>specialisations</table>
</meta>
<sections>
<section>
<fields>
<field label="id" type="readonly" column="id" primarykey="1" browse="1"/>
<field label="Name" type="text" column="name" browse="1">
<validation>
<rule fail="Enter a name">required</rule>
</validation>
</field>
</fields>
</section>
</sections>
</node>
<node id="clients">
<meta>
<title>Clients</title>
<table>clients</table>
</meta>
<sections>
<section>
<fields>
<field label="id" type="readonly" column="id" primarykey="1" browse="1"/>
<field label="Name" type="text" column="name" browse="1"/>
<field label="URL" type="text" column="url" browse="1"/>
</fields>
</section>
</sections>
</node>
<node id="praise">
<meta>
<title>Praise</title>
<table>praise</table>
</meta>
<sections>
<section>
<fields>
<field label="id" type="readonly" column="id" primarykey="1" browse="1"/>
<field label="Person" type="text" column="person" browse="1"/>
<field label="Position" type="text" column="position" browse="1"/>
<field label="Praise" type="textarea" column="praise"/>
<field type="dropdown" label="Company" column="client_id" browse="1">
<options>
<option name="datasource">db</option>
<option name="table">clients</option>
<option name="value">id</option>
<option name="string">name</option>
<option name="allow_null">1</option>
</options>
</field>
</fields>
</section>
</sections>
</node>
</nodes>
</mozzarella>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment