mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-17 09:12:45 +08:00
Merge branch 'v21.05.x'
This commit is contained in:
commit
c429cf7818
12
.github/workflows/phpunit.yml
vendored
12
.github/workflows/phpunit.yml
vendored
|
@ -2,15 +2,11 @@ name: phpunit
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release
|
||||
- gh_actions_update
|
||||
branches-ignore:
|
||||
- l10n_master
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
- '*/*'
|
||||
- '!l10n_master'
|
||||
branches-ignore:
|
||||
- l10n_master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
12
.github/workflows/test-migrations.yml
vendored
12
.github/workflows/test-migrations.yml
vendored
|
@ -2,15 +2,11 @@ name: test-migrations
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release
|
||||
- gh_actions_update
|
||||
branches-ignore:
|
||||
- l10n_master
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
- '*/*'
|
||||
- '!l10n_master'
|
||||
branches-ignore:
|
||||
- l10n_master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
525
composer.lock
generated
525
composer.lock
generated
File diff suppressed because it is too large
Load Diff
|
@ -27,6 +27,7 @@ class DropdownSearch {
|
|||
this.runLocalSearch(input);
|
||||
} else {
|
||||
this.toggleLoading(true);
|
||||
this.listContainerElem.innerHTML = '';
|
||||
this.runAjaxSearch(input);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,14 @@
|
|||
class SubmitOnChange {
|
||||
|
||||
setup() {
|
||||
this.$el.addEventListener('change', () => {
|
||||
this.filter = this.$opts.filter;
|
||||
|
||||
this.$el.addEventListener('change', (event) => {
|
||||
|
||||
if (this.filter && !event.target.matches(this.filter)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const form = this.$el.closest('form');
|
||||
if (form) {
|
||||
form.submit();
|
||||
|
|
|
@ -3,7 +3,6 @@ import {onChildEvent} from "../services/dom";
|
|||
class UserSelect {
|
||||
|
||||
setup() {
|
||||
|
||||
this.input = this.$refs.input;
|
||||
this.userInfoContainer = this.$refs.userInfo;
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import 'codemirror/mode/rust/rust';
|
|||
import 'codemirror/mode/shell/shell';
|
||||
import 'codemirror/mode/sql/sql';
|
||||
import 'codemirror/mode/toml/toml';
|
||||
import 'codemirror/mode/vb/vb';
|
||||
import 'codemirror/mode/vbscript/vbscript';
|
||||
import 'codemirror/mode/xml/xml';
|
||||
import 'codemirror/mode/yaml/yaml';
|
||||
|
@ -87,6 +88,8 @@ const modeMap = {
|
|||
sql: 'text/x-sql',
|
||||
vbs: 'vbscript',
|
||||
vbscript: 'vbscript',
|
||||
'vb.net': 'text/x-vb',
|
||||
vbnet: 'text/x-vb',
|
||||
xml: 'xml',
|
||||
yaml: 'yaml',
|
||||
yml: 'yaml',
|
||||
|
|
|
@ -629,7 +629,7 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group {
|
|||
}
|
||||
|
||||
.code-editor .lang-options {
|
||||
max-width: 480px;
|
||||
max-width: 540px;
|
||||
margin-bottom: $-s;
|
||||
a {
|
||||
margin-inline-end: $-xs;
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
<a refs="code-editor@languageLink" data-lang="shell">Shell/Bash</a>
|
||||
<a refs="code-editor@languageLink" data-lang="SQL">SQL</a>
|
||||
<a refs="code-editor@languageLink" data-lang="VBScript">VBScript</a>
|
||||
<a refs="code-editor@languageLink" data-lang="VB.NET">VB.NET</a>
|
||||
<a refs="code-editor@languageLink" data-lang="XML">XML</a>
|
||||
<a refs="code-editor@languageLink" data-lang="YAML">YAML</a>
|
||||
</small>
|
||||
|
|
|
@ -41,7 +41,9 @@
|
|||
</div>
|
||||
@endforeach
|
||||
|
||||
<div class="form-group ml-auto" component="submit-on-change">
|
||||
<div class="form-group ml-auto"
|
||||
component="submit-on-change"
|
||||
option:submit-on-change:filter='[name="user"]'>
|
||||
<label for="owner">{{ trans('settings.audit_table_user') }}</label>
|
||||
@include('components.user-select', ['user' => $listDetails['user'] ? \BookStack\Auth\User::query()->find($listDetails['user']) : null, 'name' => 'user', 'compact' => true])
|
||||
</div>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<h2 id="recent-pages" class="list-heading">
|
||||
{{ trans('entities.recently_created_pages') }}
|
||||
@if (count($recentlyCreated['pages']) > 0)
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:page}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:page}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
@endif
|
||||
</h2>
|
||||
@if (count($recentlyCreated['pages']) > 0)
|
||||
|
@ -74,7 +74,7 @@
|
|||
<h2 id="recent-chapters" class="list-heading">
|
||||
{{ trans('entities.recently_created_chapters') }}
|
||||
@if (count($recentlyCreated['chapters']) > 0)
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:chapter}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:chapter}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
@endif
|
||||
</h2>
|
||||
@if (count($recentlyCreated['chapters']) > 0)
|
||||
|
@ -88,7 +88,7 @@
|
|||
<h2 id="recent-books" class="list-heading">
|
||||
{{ trans('entities.recently_created_books') }}
|
||||
@if (count($recentlyCreated['books']) > 0)
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:book}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:book}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
@endif
|
||||
</h2>
|
||||
@if (count($recentlyCreated['books']) > 0)
|
||||
|
@ -102,7 +102,7 @@
|
|||
<h2 id="recent-shelves" class="list-heading">
|
||||
{{ trans('entities.recently_created_shelves') }}
|
||||
@if (count($recentlyCreated['shelves']) > 0)
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:bookshelf}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:bookshelf}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
|
||||
@endif
|
||||
</h2>
|
||||
@if (count($recentlyCreated['shelves']) > 0)
|
||||
|
|
|
@ -85,6 +85,23 @@ class UserProfileTest extends BrowserKitTest
|
|||
->see($newUser->name);
|
||||
}
|
||||
|
||||
public function test_profile_has_search_links_in_created_entity_lists()
|
||||
{
|
||||
$user = $this->getEditor();
|
||||
$resp = $this->actingAs($this->getAdmin())->visit('/user/' . $user->slug);
|
||||
|
||||
$expectedLinks = [
|
||||
'/search?term=%7Bcreated_by%3A' . $user->slug . '%7D+%7Btype%3Apage%7D',
|
||||
'/search?term=%7Bcreated_by%3A' . $user->slug . '%7D+%7Btype%3Achapter%7D',
|
||||
'/search?term=%7Bcreated_by%3A' . $user->slug . '%7D+%7Btype%3Abook%7D',
|
||||
'/search?term=%7Bcreated_by%3A' . $user->slug . '%7D+%7Btype%3Abookshelf%7D',
|
||||
];
|
||||
|
||||
foreach ($expectedLinks as $link) {
|
||||
$resp->seeInElement('[href$="' . $link . '"]', 'View All');
|
||||
}
|
||||
}
|
||||
|
||||
public function test_guest_profile_shows_limited_form()
|
||||
{
|
||||
$this->asAdmin()
|
||||
|
|
Loading…
Reference in New Issue
Block a user