]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
theme 98: entry view
authorBanana <mail@bananas-playground.net>
Mon, 10 Apr 2023 09:22:30 +0000 (11:22 +0200)
committerBanana <mail@bananas-playground.net>
Mon, 10 Apr 2023 09:22:30 +0000 (11:22 +0200)
18 files changed:
TODO
webclient/view/98/entry/entry.html [new file with mode: 0644]
webclient/view/98/entry/field-date.html [new file with mode: 0644]
webclient/view/98/entry/field-lookupmultiple.html [new file with mode: 0644]
webclient/view/98/entry/field-number.html [new file with mode: 0644]
webclient/view/98/entry/field-selection.html [new file with mode: 0644]
webclient/view/98/entry/field-text-title.html [new file with mode: 0644]
webclient/view/98/entry/field-text.html [new file with mode: 0644]
webclient/view/98/entry/field-text3-description.html [new file with mode: 0644]
webclient/view/98/entry/field-text3.html [new file with mode: 0644]
webclient/view/98/entry/field-textarea-content.html [new file with mode: 0644]
webclient/view/98/entry/field-textarea.html [new file with mode: 0644]
webclient/view/98/entry/field-unknown.html [new file with mode: 0644]
webclient/view/98/entry/field-upload-coverimage.html [new file with mode: 0644]
webclient/view/98/entry/field-upload.html [new file with mode: 0644]
webclient/view/98/entry/field-upload_multiple-attachment.html [new file with mode: 0644]
webclient/view/98/entry/field-upload_multiple.html [new file with mode: 0644]
webclient/view/98/entry/field-year.html [new file with mode: 0644]

diff --git a/TODO b/TODO
index d678db8862abc1308297971673a69a4f875285ab..a1cabe7ea15078c4ec2a060c61cbb6e039067b0e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+* change multiple-attachment to a field which tells it is used for a image gallery
 * minimal theme
 ** https://watercss.kognise.dev/
 * create a real fallback theme, which does not depend on any styling/css
diff --git a/webclient/view/98/entry/entry.html b/webclient/view/98/entry/entry.html
new file mode 100644 (file)
index 0000000..4586e57
--- /dev/null
@@ -0,0 +1,26 @@
+<h3><a href="index.php?p=collections&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>"><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></a></h3>
+<article>
+       <?php if($TemplateData['showEdit'] === true) { ?>
+       <p><a href="index.php?p=manageentry&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>&id=<?php echo $TemplateData['entry']['id']; ?>">EDIT</a></p>
+       <?php
+       }
+
+       if(isset($TemplateData['entry']['fields'])) {
+               foreach($TemplateData['entry']['fields'] as $field) {
+
+                       $_fieldViewSpecial = Summoner::themefile('entry/field-'.$field['type'].'-'.$field['identifier'].'.html', UI_THEME);
+                       $_fieldView = Summoner::themefile('entry/field-'.$field['type'].'.html', UI_THEME);
+                       if(file_exists($_fieldViewSpecial)) {
+                               require $_fieldViewSpecial;
+                       }
+                       elseif(file_exists($_fieldView)) {
+                               require $_fieldView;
+                       }
+                       else {
+                               require $TemplateData['fieldViewDefault'];
+                       }
+               }
+       }
+       ?>
+
+</article>
diff --git a/webclient/view/98/entry/field-date.html b/webclient/view/98/entry/field-date.html
new file mode 100644 (file)
index 0000000..7ebf58b
--- /dev/null
@@ -0,0 +1,4 @@
+<p data-field-name="date" data-field-id="<?php echo $field['identifier']; ?>">
+       <?php echo $field['displayname']; ?>:
+       <a href="index.php?p=collections&collection='.$TemplateData['loadedCollection']['id'].'&fid='.$field['identifier'].'&fv='.urlencode(Summoner::ifset($field, 'value')).'"><?php echo Summoner::ifset($field, 'value'); ?></a>
+</p>
diff --git a/webclient/view/98/entry/field-lookupmultiple.html b/webclient/view/98/entry/field-lookupmultiple.html
new file mode 100644 (file)
index 0000000..494456e
--- /dev/null
@@ -0,0 +1,8 @@
+<p data-field-name="lookupmultiple" data-field-id="<?php echo $field['identifier']; ?>">
+       <?php echo $field['displayname']; ?>:
+       <?php
+       foreach($field['value'] as $_fv) {
+               echo '<a href="index.php?p=collections&collection='.$TemplateData['loadedCollection']['id'].'&fid='.$field['identifier'].'&fv='.urlencode($_fv).'">'.$_fv.'</a>, ';
+       }
+       ?>
+</p>
diff --git a/webclient/view/98/entry/field-number.html b/webclient/view/98/entry/field-number.html
new file mode 100644 (file)
index 0000000..2afc484
--- /dev/null
@@ -0,0 +1,4 @@
+<p data-field-name="number" data-field-id="<?php echo $field['identifier']; ?>">
+       <?php echo $field['displayname']; ?>:
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+</p>
diff --git a/webclient/view/98/entry/field-selection.html b/webclient/view/98/entry/field-selection.html
new file mode 100644 (file)
index 0000000..1ab89ba
--- /dev/null
@@ -0,0 +1,4 @@
+<p data-field-name="selection" data-field-id="<?php echo $field['identifier']; ?>">
+       <?php echo $field['displayname']; ?>:
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+</p>
diff --git a/webclient/view/98/entry/field-text-title.html b/webclient/view/98/entry/field-text-title.html
new file mode 100644 (file)
index 0000000..fbfb079
--- /dev/null
@@ -0,0 +1 @@
+<h1 data-field-name="text-title" data-field-id="<?php echo $field['identifier']; ?>"><?php echo Summoner::ifset($field, 'value'); ?></h1>
diff --git a/webclient/view/98/entry/field-text.html b/webclient/view/98/entry/field-text.html
new file mode 100644 (file)
index 0000000..4c5c67a
--- /dev/null
@@ -0,0 +1,3 @@
+<p data-field-name="text" data-field-id="<?php echo $field['identifier']; ?>">
+       <?php echo $field['displayname']; ?>: <?php echo nl2br(Summoner::ifset($field, 'value')); ?>
+</p>
diff --git a/webclient/view/98/entry/field-text3-description.html b/webclient/view/98/entry/field-text3-description.html
new file mode 100644 (file)
index 0000000..18ba661
--- /dev/null
@@ -0,0 +1 @@
+<p data-field-name="text3-description" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
diff --git a/webclient/view/98/entry/field-text3.html b/webclient/view/98/entry/field-text3.html
new file mode 100644 (file)
index 0000000..1210cdf
--- /dev/null
@@ -0,0 +1,3 @@
+<p data-field-name="text3" data-field-id="<?php echo $field['identifier']; ?>">
+       <?php echo $field['displayname']; ?>: <?php echo nl2br(Summoner::ifset($field, 'value')); ?>
+</p>
diff --git a/webclient/view/98/entry/field-textarea-content.html b/webclient/view/98/entry/field-textarea-content.html
new file mode 100644 (file)
index 0000000..f739df2
--- /dev/null
@@ -0,0 +1 @@
+<p data-field-name="textarea-content" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
diff --git a/webclient/view/98/entry/field-textarea.html b/webclient/view/98/entry/field-textarea.html
new file mode 100644 (file)
index 0000000..3520a52
--- /dev/null
@@ -0,0 +1 @@
+<p data-field-name="textarea" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>: <?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
diff --git a/webclient/view/98/entry/field-unknown.html b/webclient/view/98/entry/field-unknown.html
new file mode 100644 (file)
index 0000000..fa3ba54
--- /dev/null
@@ -0,0 +1 @@
+<p>Missing template for: <?php echo $field['identifier']; ?></p>
diff --git a/webclient/view/98/entry/field-upload-coverimage.html b/webclient/view/98/entry/field-upload-coverimage.html
new file mode 100644 (file)
index 0000000..3ac58ee
--- /dev/null
@@ -0,0 +1,6 @@
+<div data-field-name="upload-coverimage">
+       <img src="<?php echo $TemplateData['storagePath'].'/'.Summoner::ifset($field, 'value'); ?>"
+                title="<?php echo Summoner::ifset($field, 'value'); ?>"
+                width="500px"
+       />
+</div>
diff --git a/webclient/view/98/entry/field-upload.html b/webclient/view/98/entry/field-upload.html
new file mode 100644 (file)
index 0000000..6232e6d
--- /dev/null
@@ -0,0 +1,3 @@
+<p data-field-name="upload" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>:
+       <a href="<?php echo $TemplateData['storagePath'].'/'.Summoner::ifset($field, 'value'); ?>" target="_blank"><?php echo Summoner::ifset($field, 'value'); ?></a>
+</p>
diff --git a/webclient/view/98/entry/field-upload_multiple-attachment.html b/webclient/view/98/entry/field-upload_multiple-attachment.html
new file mode 100644 (file)
index 0000000..5fc32f3
--- /dev/null
@@ -0,0 +1,7 @@
+<p data-field-name="upload_multiple-attachment" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>:
+<ul>
+       <?php foreach ($field['value'] as $_uEntry) { ?>
+       <li><a href="<?php echo $TemplateData['storagePath'].'/'.$_uEntry; ?>" target="_blank"><?php echo $_uEntry; ?></a></li>
+       <?php } ?>
+</ul>
+</p>
diff --git a/webclient/view/98/entry/field-upload_multiple.html b/webclient/view/98/entry/field-upload_multiple.html
new file mode 100644 (file)
index 0000000..a0c7936
--- /dev/null
@@ -0,0 +1,7 @@
+<p data-field-name="upload_multiple" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>:
+       <ul>
+               <?php foreach ($field['value'] as $_uEntry) { ?>
+               <li><a href="<?php echo $TemplateData['storagePath'].'/'.$_uEntry; ?>" target="_blank"><?php echo $_uEntry; ?></a></li>
+               <?php } ?>
+       </ul>
+</p>
diff --git a/webclient/view/98/entry/field-year.html b/webclient/view/98/entry/field-year.html
new file mode 100644 (file)
index 0000000..a5dd7b8
--- /dev/null
@@ -0,0 +1,4 @@
+<p data-field-name="year" data-field-id="<?php echo $field['identifier']; ?>">
+       <?php echo $field['displayname']; ?>:
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+</p>