Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jun 3, 2024
2 parents 5d7bb4b + bdc0ea2 commit 809c337
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
10 changes: 8 additions & 2 deletions RockMigrations.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,9 @@ public function basename($file)
/**
* Get data from cache that is automatically recreated on Modules::refresh
*
* Note: The ->cache() call must happen on every request so that the
* Modules::refresh knows about all the caches it has to delete!
*
* For development/debugging you can set $debug = true to always get the
* non-cached value from the callback.
*
Expand All @@ -625,7 +628,7 @@ public function cache(
// data so that we don't get missing dependency errors in autoloadClasses()
if ($this->isCLI()) $debug = true;
if ($debug) $this->wire->cache->delete($name);
$val = $this->wire->cache->get($name, $create);
$val = $this->wire->cache->get($name, WireCache::expireNever, $create);
$this->cacheDelete .= ",$name";
if ($deleteOnSave) $this->cacheDeleteOnSave .= ",$name";
return $val;
Expand Down Expand Up @@ -3541,7 +3544,10 @@ public function renderTable($values, $options = [])

// prepare label
$label = $k;
if (array_key_exists($k, $labels)) $label = $labels[$k];
if (array_key_exists($k, $labels)) {
$l = trim($labels[$k]);
if ($l) $label = $l;
}

$t = $opt->tooltips ? "title='$k' uk-tooltip" : "";
$val = $opt->nl2br ? nl2br($v) : $v;
Expand Down
6 changes: 6 additions & 0 deletions snippets/RockMigrations/rmf-money.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Add a RockMoney field via RockMigrations
$1 => [
'type' => 'RockMoney',
'label' => '$2',
'icon' => 'money',
],
7 changes: 7 additions & 0 deletions snippets/RockMigrations/rmf-rockgrid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Add a RockGrid field via RockMigrations
$1 => [
'type' => 'RockGrid',
'label' => '$3',
'grid' => '$4',
'icon' => '${5:table}',
],
2 changes: 1 addition & 1 deletion tweaks/PageListShowIds.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function addStyle(HookEvent $event)
"</head>",
"<style>
.PageListId{
color:#afafaf;
opacity:0.8;
margin-left:5px;
font-size:0.7rem;
}
Expand Down
2 changes: 1 addition & 1 deletion tweaks/PageListShowTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function addStyle(HookEvent $event)
"</head>",
"<style>
.PageListTemplate{
color:#afafaf;
opacity:0.8;
margin-left:5px;
font-size:0.7rem;
}
Expand Down

0 comments on commit 809c337

Please sign in to comment.