Skip to content

Commit

Permalink
NEW: Add CostControl Compatibility
Browse files Browse the repository at this point in the history
- disable routes and show badge if CostControl is installed
- fixes #4
  • Loading branch information
aljawaid committed Apr 2, 2023
1 parent c101ba3 commit d8cb752
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Assets/css/url-cleaner.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,15 @@
font-weight: 600;
margin-top: 2px;
}

span.plugin-override {
float: right;
font-size: .7em;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
background-color: #FFA500;
border-radius: var(--border-radius-url-cleaner);
padding: 1px 4px;
color: #444;
font-weight: 700;
cursor: default;
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Compatibility
- Requires [Kanboard](https://github.com/fguillot/kanboard "Kanboard - Kanban Project Management Software")`1.2.20`

#### Other Plugins & Action Plugins
- _No known issues_
- Compatible with [CostControl](https://github.com/aljawaid/CostControl)
#### Core Files & Templates
- _No template overrides_
- _No database changes_
Expand Down
11 changes: 9 additions & 2 deletions Template/config/url-cleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,15 @@
<tbody>
<?php foreach ($routesCore as $route): ?>
<tr>
<td class="route-table-row route-before table-corner-bl"><?= $this->helper->text->e($route['before_route']) ?></td>
<td class="route-table-row route-after table-corner-br"><?= $this->helper->text->e($route['after_route']) ?></td>
<td class="route-table-row route-before table-corner-bl">
<?= $this->helper->text->e($route['before_route']) ?>
</td>
<td class="route-table-row route-after table-corner-br">
<?php if (file_exists('plugins/CostControl') && (isset($route['moved_to']))): ?>
<span class="plugin-override" title="<?= $this->helper->text->e($route['moved_to']) ?> <?= t('plugin overrides this clean URL setting') ?>"><?= t('Plugin Override') ?></span>
<?php endif ?>
<?= $this->helper->text->e($route['after_route']) ?>
</td>
</tr>
<?php endforeach ?>
</tbody>
Expand Down

0 comments on commit d8cb752

Please sign in to comment.