aboutsummaryrefslogtreecommitdiff
path: root/mod/guidbrowser/views
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 13:52:16 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 13:52:16 +0000
commita210d4401a00ab875bf29aa189735525551ab7eb (patch)
treebaec0df92793f3369c028ce6a6d466f601fa976d /mod/guidbrowser/views
parent7bd568ce9ab0754df711f7b5b6fc3281e14cdfeb (diff)
downloadelgg-a210d4401a00ab875bf29aa189735525551ab7eb.tar.gz
elgg-a210d4401a00ab875bf29aa189735525551ab7eb.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Basic guid browser git-svn-id: https://code.elgg.org/elgg/trunk@391 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/guidbrowser/views')
-rw-r--r--mod/guidbrowser/views/default/guidbrowser/browser.php25
-rw-r--r--mod/guidbrowser/views/default/guidbrowser/entity.php21
-rw-r--r--mod/guidbrowser/views/default/guidbrowser/entity_full.php82
-rw-r--r--mod/guidbrowser/views/default/guidbrowser/navbar.php3
-rw-r--r--mod/guidbrowser/views/default/guidbrowser/prevnext.php20
5 files changed, 146 insertions, 5 deletions
diff --git a/mod/guidbrowser/views/default/guidbrowser/browser.php b/mod/guidbrowser/views/default/guidbrowser/browser.php
new file mode 100644
index 000000000..d947698e4
--- /dev/null
+++ b/mod/guidbrowser/views/default/guidbrowser/browser.php
@@ -0,0 +1,25 @@
+<?php
+ $navbar = $vars['prevnext'];
+ $entities = $vars['entities'];
+?>
+<script type="text/javascript" language="javascript">
+<!--
+function showhide(oid)
+{
+ var e = document.getElementById(oid);
+ if(e.style.display == 'none') {
+ e.style.display = 'block';
+ } else {
+ e.style.display = 'none';
+ }
+}
+// -->
+</script>
+
+<div id="browser">
+ <div id="entities">
+ <?php echo $entities; ?>
+ </div>
+
+ <?php echo $navbar; ?>
+</div> \ No newline at end of file
diff --git a/mod/guidbrowser/views/default/guidbrowser/entity.php b/mod/guidbrowser/views/default/guidbrowser/entity.php
index 15c5adc7f..75e2ad025 100644
--- a/mod/guidbrowser/views/default/guidbrowser/entity.php
+++ b/mod/guidbrowser/views/default/guidbrowser/entity.php
@@ -1,3 +1,22 @@
<?php
+ $guid = $vars['entity_guid'];
+ $type = $vars['type'];
+ $subtype = $vars['subtype'];
+ $full = $vars['full'];
+
+?>
-?> \ No newline at end of file
+<div id="guid-<?php echo $guid; ?>">
+ <span onClick="showhide('guid-<?php echo $guid; ?>-full')">
+ <table width="100%">
+ <tr>
+ <td width="50"><b><?php echo $guid; ?></b></td>
+ <td><?php echo "$type / $subtype"; ?></td>
+
+ </tr>
+ </table>
+ </span>
+ <div id="guid-<?php echo $guid; ?>-full" style="display:none">
+ <?php echo $full; ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/mod/guidbrowser/views/default/guidbrowser/entity_full.php b/mod/guidbrowser/views/default/guidbrowser/entity_full.php
index 15c5adc7f..4514a3644 100644
--- a/mod/guidbrowser/views/default/guidbrowser/entity_full.php
+++ b/mod/guidbrowser/views/default/guidbrowser/entity_full.php
@@ -1,3 +1,83 @@
<?php
+ $entity = $vars['entity'];
+ $metadata = $vars['metadata'];
+ $annotations = $vars['annotations'];
+
+?>
+<div>
+ <?php
+ foreach ($entity as $k => $v)
+ {
+?>
+ <div>
+ <table>
+ <tr>
+ <td><b><?php echo $k; ?></b></td>
+ <td><?php echo $v; ?></td>
+ </tr>
+ </table>
+ </div>
+<?php
+ }
+ ?>
+</div>
+<div id="metadata">
+<h2>Metadata</h2>
+ <?php
+ foreach ($metadata as $m)
+ {
+?>
+ <div>
+ <table>
+ <tr>
+ <td><b><?php echo $m->name; ?></b></td>
+ <td><?php echo $m->value; ?></td>
+ </tr>
+ </table>
+ </div>
+<?php
+ }
+ ?>
+
+ <div>
+ <form method="post">
+ <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" />
+ <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" />
+ <input name="callaction" type="hidden" value="metadata" />
+ Key : <input name="key" type="text" />
+ Value : <input name="value" type="text" />
+ <input name="submit" type="submit" value="submit" />
+ </form>
+ </div>
+
+</div>
-?> \ No newline at end of file
+<div id="annotations">
+<h2>Annotations</h2>
+ <?php
+ foreach ($annotations as $a)
+ {
+?>
+ <div>
+ <table>
+ <tr>
+ <td><b><?php echo $a->name; ?></b></td>
+ <td><?php echo $a->value; ?></td>
+ </tr>
+ </table>
+ </div>
+<?php
+ }
+ ?>
+
+ <div>
+ <form method="post">
+ <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" />
+ <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" />
+ <input name="callaction" type="hidden" value="annotations" />
+ Key : <input name="key" type="text" />
+ Value : <input name="value" type="text" />
+ <input name="submit" type="submit" value="submit" />
+ </form>
+ </div>
+</div> \ No newline at end of file
diff --git a/mod/guidbrowser/views/default/guidbrowser/navbar.php b/mod/guidbrowser/views/default/guidbrowser/navbar.php
deleted file mode 100644
index 15c5adc7f..000000000
--- a/mod/guidbrowser/views/default/guidbrowser/navbar.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?> \ No newline at end of file
diff --git a/mod/guidbrowser/views/default/guidbrowser/prevnext.php b/mod/guidbrowser/views/default/guidbrowser/prevnext.php
new file mode 100644
index 000000000..c8e599f80
--- /dev/null
+++ b/mod/guidbrowser/views/default/guidbrowser/prevnext.php
@@ -0,0 +1,20 @@
+<?php
+ global $CONFIG;
+
+ $limit = $vars['limit'];
+ $offset = $vars['offset'];
+ $type = $vars['type'];
+ $subtype = $vars['subtype'];
+
+
+ $common = "&type=$type&subtype=$subtype";
+?>
+
+<div id="guidbrowser_navbar">
+ <table width="100%">
+ <tr>
+ <td align="left"><?php if ($offset>0){?><a href="<?php echo $CONFIG->wwwroot . "mod/guidbrowser/?offset=" . ($offset-$limit) . $common ?>">Previous</a><?php } ?></td>
+ <td align="right"><a href="<?php echo $CONFIG->wwwroot . "mod/guidbrowser/?offset=" . ($offset+$limit) . $common ?>">Next</a></td>
+ </tr>
+ </table>
+</div> \ No newline at end of file