aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-08-25 12:15:34 -0300
committerSilvio <silvio@devlet.com.br>2010-08-25 12:15:34 -0300
commit0107682b50647e65c4b8561a3a4cd9478e46170d (patch)
treeb68e9245b8c1e9bb1095f33586e04a859de055b3
parentf29befe3b6f94962a19fd554cd66488db6ccc5fc (diff)
downloadcinisis-0107682b50647e65c4b8561a3a4cd9478e46170d.tar.gz
cinisis-0107682b50647e65c4b8561a3a4cd9478e46170d.tar.bz2
Apps layout enhancements
-rw-r--r--apps/field.php5
-rw-r--r--apps/repetition.php5
-rw-r--r--apps/subfield.php5
-rw-r--r--classes/helpers/CinisisDisplayHelper.php7
4 files changed, 14 insertions, 8 deletions
diff --git a/apps/field.php b/apps/field.php
index 7f1f3ec..2206388 100644
--- a/apps/field.php
+++ b/apps/field.php
@@ -19,6 +19,7 @@ if ($isis) {
$form = $display->formInputText('entry', $entry);
$form .= $display->radios('fid', $isis->getFieldNames(), $fid);
$script = basename(__FILE__);
+ $display->openTable();
$display->form($form, $script);
// Query database.
@@ -34,6 +35,6 @@ if ($isis) {
$display->pre("Repetitions found: ". count($result[$field['name']]) .".");
$display->pre($display->repetitionLink($entry, $fid));
$display->dump($result[$field['name']]);
+ $display->closeTable();
+ $display->footer();
}
-
-$display->footer();
diff --git a/apps/repetition.php b/apps/repetition.php
index 0f0288e..bd91aae 100644
--- a/apps/repetition.php
+++ b/apps/repetition.php
@@ -19,6 +19,7 @@ if ($isis) {
$form = $display->formInputText('entry', $entry);
$form .= $display->radios('fid', $isis->getFieldNames(), $fid);
$script = basename(__FILE__);
+ $display->openTable();
$display->form($form, $script);
// Query database.
@@ -34,6 +35,6 @@ if ($isis) {
$display->pre("Repetitions found: ". count($result[$field['name']]) .".");
$display->pre($display->fieldLink($entry, $fid));
$display->dump($result[$field['name']]);
+ $display->closeTable();
+ $display->footer();
}
-
-$display->footer();
diff --git a/apps/subfield.php b/apps/subfield.php
index 4943cda..5752875 100644
--- a/apps/subfield.php
+++ b/apps/subfield.php
@@ -21,6 +21,7 @@ if ($isis) {
$form .= $display->radios('fid', $isis->getFieldNames(), $fid);
$form .= $display->radios('sid', $isis->getSubFieldNames($fid), $sid);
$script = basename(__FILE__);
+ $display->openTable();
$display->form($form, $script);
// Query database.
@@ -37,6 +38,6 @@ if ($isis) {
$display->pre("Showing entry ". $display->entryLink($entry) ." from ". $isis->entries ." total entries.");
$display->pre("Repetitions found: ". count($result[$field['name']]) .".");
$display->dump($result[$field['name']]);
+ $display->closeTable();
+ $display->footer();
}
-
-$display->footer();
diff --git a/classes/helpers/CinisisDisplayHelper.php b/classes/helpers/CinisisDisplayHelper.php
index 7802f42..e8caec0 100644
--- a/classes/helpers/CinisisDisplayHelper.php
+++ b/classes/helpers/CinisisDisplayHelper.php
@@ -136,11 +136,13 @@ class CinisisDisplayHelper {
* Form method.
*/
protected static function webForm($content, $action = 'index.php', $method = 'get') {
+ echo '<td>';
echo '<form action="'. $action .'" method="'. $method .'">';
echo $content;
echo '<input type="submit" />';
echo '</form>';
echo '<br />';
+ echo '</td><td>';
}
/**
@@ -269,7 +271,7 @@ class CinisisDisplayHelper {
* Draws tags for closing a table.
*/
protected static function webCloseTable() {
- echo '</tr></table>';
+ echo '</td></tr></table>';
}
/**
@@ -483,11 +485,12 @@ class CinisisDisplayHelper {
* Index of the selected option.
*/
protected static function webRadios($name, $data, $checked = NULL) {
+ sort($data);
$radios = '<table><tr><td>';
$count = 0;
foreach ($data as $key => $value) {
- if ($count++ > 5) {
+ if ($count++ > 25) {
$count = 0;
$radios .= '</td><td>';
}