aboutsummaryrefslogtreecommitdiff
path: root/mod/ecml/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/ecml/views')
-rw-r--r--mod/ecml/views/default/ecml/admin/css.php17
-rw-r--r--mod/ecml/views/default/ecml/admin/ecml_admin.php80
-rw-r--r--mod/ecml/views/default/ecml/keywords/googlemaps.php8
3 files changed, 98 insertions, 7 deletions
diff --git a/mod/ecml/views/default/ecml/admin/css.php b/mod/ecml/views/default/ecml/admin/css.php
new file mode 100644
index 000000000..4a9cd8e4d
--- /dev/null
+++ b/mod/ecml/views/default/ecml/admin/css.php
@@ -0,0 +1,17 @@
+.ecml_admin_table {
+ width:100%;
+}
+.ecml_admin_table td, th {
+ border: 1px solid gray;
+ text-align: center;
+ padding: 5px;
+}
+.ecml_admin_table th, .ecml_view_desc {
+ font-weight: bold;
+}
+.ecml_row_odd {
+ background-color: #EEE;
+}
+.ecml_row_even {
+
+} \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/admin/ecml_admin.php b/mod/ecml/views/default/ecml/admin/ecml_admin.php
new file mode 100644
index 000000000..b91807510
--- /dev/null
+++ b/mod/ecml/views/default/ecml/admin/ecml_admin.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Configs granular access
+ *
+ * @package ECML
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+
+$views = $vars['config']->ecml_parse_views;
+$keywords = $vars['config']->ecml_keywords;
+$perms = $vars['config']->ecml_permissions;
+
+ksort($views);
+ksort($keywords);
+
+echo elgg_view_title(elgg_echo('ecml:admin:admin'));
+echo '<p>' . elgg_echo('ecml:admin:instruction') . '</p>';
+
+// yes I'm using a table because this is table.
+$form_body = <<<___END
+<table class="ecml_admin_table">
+ <tr>
+ <th>&nbsp</th>
+___END;
+
+foreach ($keywords as $keyword => $info) {
+ $desc = $info['description'];
+
+ $form_body .= "<th><acronym title=\"$desc\">$keyword</acronym></th>";
+}
+$form_body .= '</tr>';
+
+$odd = 'odd';
+foreach ($views as $view => $desc) {
+ $form_body .= "
+ <tr class=\"ecml_row_$odd\">
+ <td class=\"ecml_view_desc\">$desc</td>
+";
+ foreach ($keywords as $keyword => $info) {
+ $checked = (in_array($keyword, $perms[$view])) ? 'checked="checked"' : '';
+
+ // ooook. input/checkboxes isn't overly useful.
+ // do it ourself.
+ $form_body .= "<td><input type=\"checkbox\" name=\"perms[$view][]\" value=\"$keyword\" $checked /></td>";
+ }
+ $form_body .= '</tr>';
+
+ $odd = ($odd == 'odd') ? 'even' : 'odd';
+}
+
+$form_body .= '</table>';
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo('submit')));
+$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset')));
+
+echo elgg_view('input/form', array(
+ 'body' => $form_body,
+ 'action' => $vars['url'] . 'action/ecml/save_permissions'
+));
+
+//foreach ($views as $view => $desc) {
+// echo elgg_view_title($desc);
+// echo '<ul>';
+// foreach ($keywords as $keyword => $info) {
+// $description = $info['description'];
+//
+// echo "<li>$keyword</li>";
+// }
+// echo '</ul>';
+//
+//echo <<<___END
+// <br />
+// </li>
+//
+//___END;
+//}
+//
+//echo '</ul>'; \ No newline at end of file
diff --git a/mod/ecml/views/default/ecml/keywords/googlemaps.php b/mod/ecml/views/default/ecml/keywords/googlemaps.php
index c75023045..4f31a4531 100644
--- a/mod/ecml/views/default/ecml/keywords/googlemaps.php
+++ b/mod/ecml/views/default/ecml/keywords/googlemaps.php
@@ -18,14 +18,8 @@ if ($src) {
$link_href = elgg_http_add_url_query_elements($src, array('source' => 'embed'));
echo "
-
<iframe width=\"$width\" height=\"$height\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"$embed_src\"></iframe>
<br />
-<small>
- <a href=\"$link_href\" style=\"color:#0000FF;text-align:left\">
- " . elgg_echo('ecml:googlemaps:view_larger_map') . "
- </a>
-</small>
-
+<small><a href=\"$link_href\" style=\"color:#0000FF;text-align:left\">" . elgg_echo('ecml:googlemaps:view_larger_map') . "</a></small>
";
} \ No newline at end of file