Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2016-07-03 10:12:12 +0100
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
c25ef1890003e49469a2fb1b50f30b3d272fff61
c25ef189
1 parent
b0a63ba0
Made list default messages a little nicer
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
9 deletions
resources/assets/js/global.js
resources/assets/sass/_lists.scss
resources/views/home.blade.php
resources/views/partials/activity-list.blade.php
resources/views/partials/entity-list.blade.php
resources/assets/js/global.js
View file @
c25ef18
...
...
@@ -112,7 +112,7 @@ $(function () {
// Common jQuery actions
$
(
'[data-action="expand-entity-list-details"]'
).
click
(
function
()
{
$
(
'.entity-list.compact'
).
find
(
'p'
).
slideToggle
(
240
);
$
(
'.entity-list.compact'
).
find
(
'p'
).
not
(
'.empty-text'
).
slideToggle
(
240
);
});
...
...
resources/assets/sass/_lists.scss
View file @
c25ef18
...
...
@@ -338,6 +338,10 @@ ul.pagination {
padding-top
:
$-xs
;
margin
:
0
;
}
>
p
.empty-text
{
display
:
block
;
font-size
:
$fs-m
;
}
hr
{
margin
:
0
;
}
...
...
resources/views/home.blade.php
View file @
c25ef18
...
...
@@ -34,18 +34,30 @@
@else
<h3>
Recent Books
</h3>
@endif
@include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
@include('partials/entity-list', [
'entities' => $recents,
'style' => 'compact',
'emptyText' => $signedIn ? 'You have not viewed any pages' : 'No books have been created'
])
</div>
<div
class=
"col-sm-4"
>
<h3><a
class=
"no-color"
href=
"/pages/recently-created"
>
Recently Created Pages
</a></h3>
<div
id=
"recently-created-pages"
>
@include('partials/entity-list', ['entities' => $recentlyCreatedPages, 'style' => 'compact'])
@include('partials/entity-list', [
'entities' => $recentlyCreatedPages,
'style' => 'compact',
'emptyText' => 'No pages have been recently created'
])
</div>
<h3><a
class=
"no-color"
href=
"/pages/recently-updated"
>
Recently Updated Pages
</a></h3>
<div
id=
"recently-updated-pages"
>
@include('partials/entity-list', ['entities' => $recentlyUpdatedPages, 'style' => 'compact'])
@include('partials/entity-list', [
'entities' => $recentlyUpdatedPages,
'style' => 'compact',
'emptyText' => 'No pages have been recently updated'
])
</div>
</div>
...
...
resources/views/partials/activity-list.blade.php
View file @
c25ef18
{{--Requires an entity to be passed with the name $entity--}}
@if(count($activity) > 0)
<div
class=
"activity-list"
>
@foreach($activity as $activityItem)
...
...
@@ -10,5 +8,5 @@
@endforeach
</div>
@else
<p
class=
"text-muted"
>
N
ew activity will show up here.
</p>
<p
class=
"text-muted"
>
N
o activity to show
</p>
@endif
\ No newline at end of file
...
...
resources/views/partials/entity-list.blade.php
View file @
c25ef18
...
...
@@ -16,8 +16,8 @@
@endforeach
@else
<p
class=
"text-muted"
>
No items available
<p
class=
"text-muted
empty-text
"
>
{{ $emptyText or 'No items available' }}
</p>
@endif
</div>
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment