Skip to content

Commit

Permalink
Add wrapper elements on plugin field output in the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
fevangelou committed Jun 25, 2024
1 parent 67f195e commit 5bb47b2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<div class="itemPlugins">
<?php foreach ($this->K2Plugins as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset class="adminform">
<fieldset class="adminform k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
Expand Down
56 changes: 35 additions & 21 deletions administrator/components/com_k2/views/item/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,11 @@
<div class="itemPlugins itemPluginsContent">
<?php foreach($this->K2PluginsItemContent as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
<div class="itemPlugin k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down Expand Up @@ -309,9 +311,11 @@
<div class="itemPlugins itemPluginsImage">
<?php foreach($this->K2PluginsItemImage as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
<div class="itemPlugin k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down Expand Up @@ -396,9 +400,11 @@
<div class="itemPlugins itemPluginsImageGallery">
<?php foreach($this->K2PluginsItemGallery as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
<div class="itemPlugin k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down Expand Up @@ -577,9 +583,11 @@
<div class="itemPlugins itemPluginsMedia">
<?php foreach($this->K2PluginsItemVideo as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
<div class="itemPlugin k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down Expand Up @@ -620,9 +628,11 @@
<div class="itemPlugins itemPluginsExtraFields">
<?php foreach($this->K2PluginsItemExtraFields as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
<div class="itemPlugin k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down Expand Up @@ -675,9 +685,11 @@
<div class="itemPlugins itemPluginsAttachments">
<?php foreach($this->K2PluginsItemAttachments as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
<div class="itemPlugin k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand All @@ -692,9 +704,11 @@
<div class="itemPlugins itemPluginsPlugins">
<?php foreach($this->K2PluginsItemOther as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
<div class="itemPlugin k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="itemAdditionalData">
<?php echo $K2Plugin->fields; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<?php foreach ($this->K2Plugins as $K2Plugin): ?>
<?php if (!is_null($K2Plugin)): ?>
<li>
<div class="userPlugins pluginIs<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<div class="userPlugins k2Plugin-<?php echo preg_replace('/[^\p{L}\p{N}_]/u', '', ucwords(strtolower($K2Plugin->name))); ?>">
<h3><?php echo $K2Plugin->name; ?></h3>
<div class="userPluginFields">
<?php echo $K2Plugin->fields; ?>
Expand Down

0 comments on commit 5bb47b2

Please sign in to comment.