Release 1.18.3 (#3204)
* fix truncated comments for customer, project and activity * fix export button label for non-translated renderer * fixed avatar size if image or SVG is used * filter timesheets by billable state in API
This commit is contained in:
@@ -42,15 +42,6 @@ td {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.box-profile {
|
||||
img.img-circle {
|
||||
width: 100px;
|
||||
}
|
||||
.profile-username {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.label-gray {
|
||||
background-color: $gray-lte;
|
||||
color: #666;
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
table.dataTable.table > tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
.img-circle {
|
||||
max-width: 30px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-right: 0;
|
||||
&.teamlead {
|
||||
box-shadow: 0 0 5px 3px $gray-lte;
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
img.img-circle {
|
||||
max-height: 26px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
.avatar {
|
||||
max-height: 30px;
|
||||
max-width: 30px;
|
||||
|
||||
@@ -5,28 +5,6 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/* UserPanel is deactivated right now */
|
||||
/*
|
||||
.user-panel>.info {
|
||||
left: 80px;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Right sidebar with additional tabs for personal settings and "About Kimai" section */
|
||||
/*
|
||||
.control-sidebar {
|
||||
select {
|
||||
color: $input-color;
|
||||
background-color: $input-bg;
|
||||
}
|
||||
div.image {
|
||||
img.img-circle {
|
||||
max-width: 34px;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
.sidebar-mini.sidebar-collapse .sidebar-menu li.header {
|
||||
border-top-width: 1px;
|
||||
@@ -39,13 +17,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Simplify focus detection, when using keyboard tab navigation
|
||||
Deactivated, as it looks weird when the link is clicked
|
||||
*/
|
||||
/*
|
||||
.sidebar-menu > li > a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
"build/app.7d469ea7.js"
|
||||
],
|
||||
"css": [
|
||||
"build/app.7efa8299.css"
|
||||
"build/app.7beab68a.css"
|
||||
]
|
||||
},
|
||||
"invoice": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"build/app.css": "build/app.7efa8299.css",
|
||||
"build/app.css": "build/app.7beab68a.css",
|
||||
"build/app.js": "build/app.7d469ea7.js",
|
||||
"build/invoice.css": "build/invoice.ccdecd42.css",
|
||||
"build/invoice.js": "build/invoice.19f36eca.js",
|
||||
|
||||
@@ -123,6 +123,7 @@ class TimesheetController extends BaseApiController
|
||||
* @Rest\QueryParam(name="end", requirements=@Constraints\DateTime(format="Y-m-d\TH:i:s"), strict=true, nullable=true, description="Only records before this date will be included (format: HTML5)")
|
||||
* @Rest\QueryParam(name="exported", requirements="0|1", strict=true, nullable=true, description="Use this flag if you want to filter for export state. Allowed values: 0=not exported, 1=exported (default: all)")
|
||||
* @Rest\QueryParam(name="active", requirements="0|1", strict=true, nullable=true, description="Filter for running/active records. Allowed values: 0=stopped, 1=active (default: all)")
|
||||
* @Rest\QueryParam(name="billable", requirements="0|1", strict=true, nullable=true, description="Filter for non-/billable records. Allowed values: 0=non-billable, 1=billable (default: all)")
|
||||
* @Rest\QueryParam(name="full", requirements="true", strict=true, nullable=true, description="Allows to fetch fully serialized objects including subresources. Allowed values: true (default: false)")
|
||||
* @Rest\QueryParam(name="term", description="Free search term")
|
||||
* @Rest\QueryParam(name="modified_after", requirements=@Constraints\DateTime(format="Y-m-d\TH:i:s"), strict=true, nullable=true, description="Only records changed after this date will be included (format: HTML5). Available since Kimai 1.10 and works only for records that were created/updated since then.")
|
||||
@@ -219,6 +220,15 @@ class TimesheetController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
if (null !== ($billable = $paramFetcher->get('billable'))) {
|
||||
$billable = (int) $billable;
|
||||
if ($billable === 1) {
|
||||
$query->setBillable(true);
|
||||
} elseif ($billable === 0) {
|
||||
$query->setBillable(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (null !== ($exported = $paramFetcher->get('exported'))) {
|
||||
$exported = (int) $exported;
|
||||
if ($exported === 1) {
|
||||
|
||||
@@ -17,11 +17,11 @@ class Constants
|
||||
/**
|
||||
* The current release version
|
||||
*/
|
||||
public const VERSION = '1.18.2';
|
||||
public const VERSION = '1.18.3';
|
||||
/**
|
||||
* The current release: major * 10000 + minor * 100 + patch
|
||||
*/
|
||||
public const VERSION_ID = 11802;
|
||||
public const VERSION_ID = 11803;
|
||||
/**
|
||||
* The current release status, either "stable" or "dev"
|
||||
*/
|
||||
|
||||
@@ -44,13 +44,13 @@ final class MarkdownExtension implements RuntimeExtensionInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms the entities comment (customer, project, activity ...) into HTML.
|
||||
* Transforms entity and user comments (customer, project, activity ...) into HTML.
|
||||
*
|
||||
* @param string|null $content
|
||||
* @param bool $fullLength
|
||||
* @return string
|
||||
*/
|
||||
public function commentContent(?string $content, bool $fullLength = false): string
|
||||
public function commentContent(?string $content, bool $fullLength = true): string
|
||||
{
|
||||
if (empty($content)) {
|
||||
return '';
|
||||
|
||||
@@ -84,14 +84,18 @@
|
||||
<div class="btn-group" id="export-buttons" role="group">
|
||||
{% for group in buttons %}
|
||||
{% set button = group.0 %}
|
||||
{% set btnTitle = ('button.' ~ button.title)|trans %}
|
||||
{% if btnTitle == ('button.' ~ button.title) %}
|
||||
{% set btnTitle = button.title %}
|
||||
{% endif %}
|
||||
{% if group|length == 1 %}
|
||||
<button type="button" id="export-{{ button.id }}-button" class="btn btn-success startExportBtn" data-type="{{ button.id }}">
|
||||
{{ ('button.' ~ button.title)|trans }}
|
||||
{{ btnTitle }}
|
||||
</button>
|
||||
{% elseif group|length > 1 %}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ ('button.' ~ button.title)|trans }} <span class="caret"></span>
|
||||
{{ btnTitle }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for button in group %}
|
||||
|
||||
@@ -74,9 +74,9 @@
|
||||
{% if user.avatar is not empty and kimai_config.themeAllowAvatarUrls %}
|
||||
{% set avatar = asset(user.avatar, 'avatars') %}
|
||||
{% if tooltip is same as (false) %}
|
||||
<img src="{{ avatar }}" class="img-circle{% if class is not empty %} {{ class }}{% endif %}" alt="{{ user.displayName }}" />
|
||||
<img src="{{ avatar }}" class="img-circle avatar{% if class is not empty %} {{ class }}{% endif %}" alt="{{ user.displayName }}" />
|
||||
{% else %}
|
||||
<img src="{{ avatar }}" class="img-circle{% if class is not empty %} {{ class }}{% endif %}" data-toggle="tooltip" data-placement="top" alt="{{ user.displayName }}" title="{{ tooltip|default(user.displayName) }}" />
|
||||
<img src="{{ avatar }}" class="img-circle avatar{% if class is not empty %} {{ class }}{% endif %}" alt="{{ user.displayName }}" data-toggle="tooltip" data-placement="top" title="{{ tooltip|default(user.displayName) }}" />
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set color = user.color|colorize(user.displayName) %}
|
||||
|
||||
@@ -117,44 +117,6 @@
|
||||
{% endembed %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_box_vertical(user, stats) %}
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_body_class %}box-profile box-user-profile{% endblock %}
|
||||
{% block box_body %}
|
||||
<div class="text-center">
|
||||
{{ widgets.user_avatar(user) }}
|
||||
<h3 class="profile-username">{{ widgets.username(user) }}</h3>
|
||||
<p class="text-muted">{{ user.title }}</p>
|
||||
</div>
|
||||
{% set seeOwnRate = is_granted('view_rate_own_timesheet') %}
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{ 'stats.durationMonth'|trans }}</th>
|
||||
<td class="text-nowrap pull-right">{{ stats.durationThisMonth|duration }}</td>
|
||||
</tr>
|
||||
{% if seeOwnRate %}
|
||||
<tr>
|
||||
<th>{{ 'stats.amountMonth'|trans }}</th>
|
||||
<td class="text-nowrap pull-right">{{ stats.rateThisMonthBillable|money }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>{{ 'stats.durationTotal'|trans }}</th>
|
||||
<td class="text-nowrap pull-right">{{ stats.durationTotal|duration }}</td>
|
||||
</tr>
|
||||
{% if seeOwnRate %}
|
||||
<tr>
|
||||
<th>{{ 'stats.amountTotal'|trans }}</th>
|
||||
<td class="text-nowrap pull-right">{{ stats.rateTotalBillable|money }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_box_horizontal(user, stats) %}
|
||||
{% import "@AdminLTE/Macros/default.html.twig" as macro %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
|
||||
@@ -74,15 +74,19 @@ class MarkdownExtensionTest extends TestCase
|
||||
$sut->commentContent("- test\n- foo", false)
|
||||
);
|
||||
|
||||
$loremIpsum = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.';
|
||||
$loremIpsum = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.';
|
||||
$loremIpsumShort = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l …';
|
||||
|
||||
$this->assertEquals('', $sut->commentContent(null));
|
||||
$this->assertEquals('', $sut->commentContent(''));
|
||||
$this->assertEquals('# foobar', $sut->commentContent('# foobar'));
|
||||
$this->assertEquals('## foobar', $sut->commentContent('## foobar'));
|
||||
$this->assertEquals('### foobar', $sut->commentContent('### foobar'));
|
||||
$this->assertEquals('# foobar', $sut->commentContent('# foobar', false));
|
||||
$this->assertEquals('<p># foobar</p>', $sut->commentContent('# foobar', true));
|
||||
$this->assertEquals('<p># foobar</p>', $sut->commentContent('# foobar'));
|
||||
$this->assertEquals('## foobar', $sut->commentContent('## foobar', false));
|
||||
$this->assertEquals('### foobar', $sut->commentContent('### foobar', false));
|
||||
$this->assertEquals('<p>' . $loremIpsum . '</p>', $sut->commentContent($loremIpsum, true));
|
||||
$this->assertEquals('Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l …', $sut->commentContent($loremIpsum));
|
||||
$this->assertEquals('<p>' . $loremIpsum . '</p>', $sut->commentContent($loremIpsum));
|
||||
$this->assertEquals($loremIpsumShort, $sut->commentContent($loremIpsum, false));
|
||||
|
||||
$config = new SystemConfiguration($loader, ['timesheet' => ['markdown_content' => true]]);
|
||||
$sut = new MarkdownExtension(new Markdown(), $config);
|
||||
|
||||
@@ -345,9 +345,9 @@
|
||||
<source>label.skin</source>
|
||||
<target>Display: colors</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="O40d_3K" resname="theme.layout" approved="yes">
|
||||
<source>Display: layout</source>
|
||||
<target state="final">Display: layout</target>
|
||||
<trans-unit id="O40d_3K" resname="label.theme.layout">
|
||||
<source>label.theme.layout</source>
|
||||
<target>Display: layout</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="w8T34A6" resname="label.hours">
|
||||
<source>label.hours</source>
|
||||
@@ -1193,9 +1193,9 @@
|
||||
<source>export.mark_all</source>
|
||||
<target>Mark all shown records as cleared?</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="keE.KO." resname="Only global" approved="yes">
|
||||
<source>Only global</source>
|
||||
<target state="final">Only global</target>
|
||||
<trans-unit id="S0vT92U" resname="label.globalsOnly">
|
||||
<source>label.globalsOnly</source>
|
||||
<target>Only global</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="2Ek7sXu" resname="label.batch_meta_fields">
|
||||
<source>label.batch_meta_fields</source>
|
||||
|
||||
@@ -996,7 +996,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="42BRM3Q" resname="label.theme.layout">
|
||||
<source>label.theme.layout</source>
|
||||
<target>Tema: disposição</target>
|
||||
<target>Visualização: layout</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="hlu4iX5" resname="error.no_comments_found">
|
||||
<source>error.no_comments_found</source>
|
||||
@@ -1270,6 +1270,10 @@
|
||||
<source>Display of entries in selection lists</source>
|
||||
<target>Aparência das entradas nas listas de seleção</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="U_D.NIy" resname="automatic">
|
||||
<source>automatic</source>
|
||||
<target>Automático</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
||||
@@ -815,7 +815,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="S0vT92U" resname="label.globalsOnly">
|
||||
<source>label.globalsOnly</source>
|
||||
<target>Somente global</target>
|
||||
<target>Apenas global</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="0M_Gylq" resname="rates.empty">
|
||||
<source>rates.empty</source>
|
||||
@@ -1047,7 +1047,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="42BRM3Q" resname="label.theme.layout">
|
||||
<source>label.theme.layout</source>
|
||||
<target>Exibição: layout</target>
|
||||
<target>Visualização: layout</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="zFfl7jw" resname="sum.total">
|
||||
<source>sum.total</source>
|
||||
@@ -1273,6 +1273,10 @@
|
||||
<source>Display of entries in selection lists</source>
|
||||
<target>Exibe as entradas nas listas de seleção</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="U_D.NIy" resname="automatic">
|
||||
<source>automatic</source>
|
||||
<target>Automático</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
||||
Reference in New Issue
Block a user