release 1.14 (#2498)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Currently only used in batch-update form for timesheets, to highlight sections of combined fields */
|
||||
form fieldset {
|
||||
form .box-body fieldset {
|
||||
border-radius: $box-border-radius;
|
||||
padding: 10px;
|
||||
&:hover {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
||||
"build/app.cc583d15.js"
|
||||
],
|
||||
"css": [
|
||||
"build/app.b22111d1.css"
|
||||
"build/app.bffbc2eb.css"
|
||||
]
|
||||
},
|
||||
"invoice": {
|
||||
@@ -54,7 +54,7 @@
|
||||
"build/0.79dbdbb9.js": "sha384-U2Ao0ORAZ8PCeDmyRsqQFET3hc7pfUBimq0PrqFdG4/s0Bdi+qBj4TJK3o70bCd5",
|
||||
"build/1.32489d92.js": "sha384-wVkjh5FzjFhMV4S4uNP23E/OLBOf+Zi7t3lpm9eWzoMr/tm2pydT+q0Op1XHuoUP",
|
||||
"build/app.cc583d15.js": "sha384-Hotpowsx1ghAlRDochFNc750cMjhD3nx/GnA/lYYjE6KKU1OesPXhbkQMrqfoUUF",
|
||||
"build/app.b22111d1.css": "sha384-ZMJkA2sXnH7J/uMTKDBf8+bLNHulT+yZiz1h5fxzxJshqw9Ccs3brjAJPqb+0/6S",
|
||||
"build/app.bffbc2eb.css": "sha384-Wt0GyrHU40HyNqgnwmxa18+VreRdfpgpOcHFB3DSCHLdGpH5sM5jCTjsYSrtrdgj",
|
||||
"build/invoice.74279541.js": "sha384-2BXic5Sgorf2tXai6zSAN4wLY2dbg06L03/xMKW6itMcszvtnRArKzfBh6DNcF3f",
|
||||
"build/invoice.13d8ef4e.css": "sha384-B6RN/wZJToSBCZk2JeLokIqWEhbh+Eb9arYbt9dM+YoC2Z6PnCeTwTqSGyexWWJh",
|
||||
"build/invoice-pdf.0efd7a97.js": "sha384-bSdIeRCtEJiYYuc2reb0e5CpJ1Kbd1lQNEkElMTiq1SX0IINzdwJJYf6WnCcHrNC",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"build/0.79dbdbb9.js": "build/0.79dbdbb9.js",
|
||||
"build/1.32489d92.js": "build/1.32489d92.js",
|
||||
"build/2.7ab75d0a.js": "build/2.7ab75d0a.js",
|
||||
"build/app.css": "build/app.b22111d1.css",
|
||||
"build/app.css": "build/app.bffbc2eb.css",
|
||||
"build/app.js": "build/app.cc583d15.js",
|
||||
"build/calendar.css": "build/calendar.1408f57e.css",
|
||||
"build/calendar.js": "build/calendar.070aab88.js",
|
||||
|
||||
@@ -12,9 +12,11 @@ namespace App\Entity;
|
||||
use App\Constants;
|
||||
use App\Export\Annotation as Exporter;
|
||||
use App\Utils\StringHelper;
|
||||
use DateTime;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Exception;
|
||||
use FOS\UserBundle\Model\User as BaseUser;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
@@ -67,7 +69,6 @@ class User extends BaseUser implements UserInterface
|
||||
public const ROLE_USER = 'ROLE_USER';
|
||||
public const ROLE_TEAMLEAD = 'ROLE_TEAMLEAD';
|
||||
public const ROLE_ADMIN = 'ROLE_ADMIN';
|
||||
public const ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN';
|
||||
|
||||
public const DEFAULT_ROLE = self::ROLE_USER;
|
||||
public const DEFAULT_LANGUAGE = Constants::DEFAULT_LOCALE;
|
||||
@@ -110,7 +111,7 @@ class User extends BaseUser implements UserInterface
|
||||
/**
|
||||
* Registration date for the user
|
||||
*
|
||||
* @var \DateTime
|
||||
* @var DateTime
|
||||
*
|
||||
* @Exporter\Expose(label="profile.registration_date", type="datetime")
|
||||
*
|
||||
@@ -207,7 +208,7 @@ class User extends BaseUser implements UserInterface
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->registeredAt = new \DateTime();
|
||||
$this->registeredAt = new DateTime();
|
||||
$this->preferences = new ArrayCollection();
|
||||
$this->teams = new ArrayCollection();
|
||||
}
|
||||
@@ -217,12 +218,12 @@ class User extends BaseUser implements UserInterface
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getRegisteredAt(): ?\DateTime
|
||||
public function getRegisteredAt(): ?DateTime
|
||||
{
|
||||
return $this->registeredAt;
|
||||
}
|
||||
|
||||
public function setRegisteredAt(\DateTime $registeredAt): User
|
||||
public function setRegisteredAt(DateTime $registeredAt): User
|
||||
{
|
||||
$this->registeredAt = $registeredAt;
|
||||
|
||||
@@ -374,6 +375,11 @@ class User extends BaseUser implements UserInterface
|
||||
return $this->getPreferenceValue(UserPreference::FIRST_WEEKDAY, User::DEFAULT_FIRST_WEEKDAY);
|
||||
}
|
||||
|
||||
public function isSmallLayout(): bool
|
||||
{
|
||||
return $this->getPreferenceValue('theme.layout', 'fixed') === 'boxed';
|
||||
}
|
||||
|
||||
public function setTimezone(?string $timezone)
|
||||
{
|
||||
if ($timezone === null) {
|
||||
@@ -387,7 +393,7 @@ class User extends BaseUser implements UserInterface
|
||||
* @param mixed $default
|
||||
* @return bool|int|null|string
|
||||
*/
|
||||
public function getPreferenceValue($name, $default = null)
|
||||
public function getPreferenceValue(string $name, $default = null)
|
||||
{
|
||||
$preference = $this->getPreference($name);
|
||||
if (null === $preference) {
|
||||
@@ -480,7 +486,7 @@ class User extends BaseUser implements UserInterface
|
||||
* @internal immutable property that cannot be set by plugins
|
||||
* @param bool $canSeeAllData
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
public function initCanSeeAllData(bool $canSeeAllData): bool
|
||||
{
|
||||
|
||||
@@ -39,6 +39,7 @@ class CalendarViewType extends AbstractType
|
||||
$resolver->setDefaults([
|
||||
'required' => true,
|
||||
'choices' => $choices,
|
||||
'search' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ class FirstWeekDayType extends AbstractType
|
||||
'multiple' => false,
|
||||
'choices' => $choices,
|
||||
'label' => 'first_weekday',
|
||||
'translation_domain' => 'system-configuration'
|
||||
'translation_domain' => 'system-configuration',
|
||||
'search' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ class ThemeLayoutType extends AbstractType
|
||||
'choices' => [
|
||||
'fixed' => 'fixed',
|
||||
'boxed' => 'boxed',
|
||||
]
|
||||
],
|
||||
'search' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ final class MarkdownExtension implements RuntimeExtensionInterface
|
||||
* @param bool $fullLength
|
||||
* @return string
|
||||
*/
|
||||
public function commentOneLiner(?string $content, bool $fullLength = false): string
|
||||
public function commentOneLiner(?string $content, bool $fullLength = true): string
|
||||
{
|
||||
if (empty($content)) {
|
||||
return '';
|
||||
|
||||
@@ -37,8 +37,14 @@
|
||||
{% for project in projects %}
|
||||
<tr class="{{ widgets.class_project_row(project, now) }}">
|
||||
<td>{{ widgets.label_project(project) }}</td>
|
||||
<td class="hidden-xs">{{ project.comment|comment1line(false) }}</td>
|
||||
<td class="w-min text-center">{% if project.end is not null %}{{ project.end|date_short }}{% endif %}</td>
|
||||
<td class="hidden-xs">{{ project.comment|comment1line(not app.user.smallLayout) }}</td>
|
||||
<td class="w-min text-center">
|
||||
{% if project.end is not null %}
|
||||
{{ project.end|date_short }}
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="w-min text-center">{{ widgets.label_visible(project.visible) }}</td>
|
||||
<td class="w-min text-center">{{ widgets.badge_team_access(project.teams) }}</td>
|
||||
<td class="actions">{{ actions.project(project, 'custom') }}</td>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{% for activity in activities %}
|
||||
<tr class="{{ widgets.class_activity_row(activity, now) }}">
|
||||
<td>{{ widgets.label_activity(activity) }}</td>
|
||||
<td class="hidden-xs">{{ activity.comment|comment1line(false) }}</td>
|
||||
<td class="hidden-xs">{{ activity.comment|comment1line(not app.user.smallLayout) }}</td>
|
||||
<td class="w-min text-center">{{ widgets.label_visible(activity.visible) }}</td>
|
||||
<td class="w-min text-center">{{ widgets.badge_team_access(activity.teams) }}</td>
|
||||
<td class="actions">{{ actions.activity(activity, 'custom') }}</td>
|
||||
|
||||
@@ -37,6 +37,7 @@ class UserTest extends TestCase
|
||||
self::assertEquals(User::DEFAULT_LANGUAGE, $user->getLocale());
|
||||
self::assertFalse($user->hasTeamAssignment());
|
||||
self::assertFalse($user->canSeeAllData());
|
||||
self::assertFalse($user->isSmallLayout());
|
||||
|
||||
$user->setAvatar('https://www.gravatar.com/avatar/00000000000000000000000000000000?d=retro&f=y');
|
||||
self::assertEquals('https://www.gravatar.com/avatar/00000000000000000000000000000000?d=retro&f=y', $user->getAvatar());
|
||||
@@ -108,6 +109,11 @@ class UserTest extends TestCase
|
||||
self::assertNull($user->getPreferenceValue('test2'));
|
||||
$user->setPreferenceValue('test2', 'I like rain');
|
||||
self::assertEquals('I like rain', $user->getPreferenceValue('test2'));
|
||||
|
||||
$user->setPreferenceValue('theme.layout', 'boxed');
|
||||
self::assertTrue($user->isSmallLayout());
|
||||
$user->setPreferenceValue('theme.layout', '12345');
|
||||
self::assertFalse($user->isSmallLayout());
|
||||
}
|
||||
|
||||
public function testDisplayName()
|
||||
|
||||
@@ -110,9 +110,20 @@ class MarkdownExtensionTest extends TestCase
|
||||
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt',
|
||||
$sut->commentOneLiner(implode(PHP_EOL, ['Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt']), true)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt …',
|
||||
$sut->commentOneLiner(implode(PHP_EOL, ['Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt', 'ssdf']), true)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt',
|
||||
$sut->commentOneLiner(implode(PHP_EOL, ['Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt']))
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt …',
|
||||
$sut->commentOneLiner(implode(PHP_EOL, ['Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt', 'ssdf']))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user