Dan Brown

Made list default messages a little nicer

...@@ -112,7 +112,7 @@ $(function () { ...@@ -112,7 +112,7 @@ $(function () {
112 112
113 // Common jQuery actions 113 // Common jQuery actions
114 $('[data-action="expand-entity-list-details"]').click(function() { 114 $('[data-action="expand-entity-list-details"]').click(function() {
115 - $('.entity-list.compact').find('p').slideToggle(240); 115 + $('.entity-list.compact').find('p').not('.empty-text').slideToggle(240);
116 }); 116 });
117 117
118 118
......
...@@ -338,6 +338,10 @@ ul.pagination { ...@@ -338,6 +338,10 @@ ul.pagination {
338 padding-top: $-xs; 338 padding-top: $-xs;
339 margin: 0; 339 margin: 0;
340 } 340 }
341 + > p.empty-text {
342 + display: block;
343 + font-size: $fs-m;
344 + }
341 hr { 345 hr {
342 margin: 0; 346 margin: 0;
343 } 347 }
......
...@@ -34,18 +34,30 @@ ...@@ -34,18 +34,30 @@
34 @else 34 @else
35 <h3>Recent Books</h3> 35 <h3>Recent Books</h3>
36 @endif 36 @endif
37 - @include('partials/entity-list', ['entities' => $recents, 'style' => 'compact']) 37 + @include('partials/entity-list', [
38 + 'entities' => $recents,
39 + 'style' => 'compact',
40 + 'emptyText' => $signedIn ? 'You have not viewed any pages' : 'No books have been created'
41 + ])
38 </div> 42 </div>
39 43
40 <div class="col-sm-4"> 44 <div class="col-sm-4">
41 <h3><a class="no-color" href="/pages/recently-created">Recently Created Pages</a></h3> 45 <h3><a class="no-color" href="/pages/recently-created">Recently Created Pages</a></h3>
42 <div id="recently-created-pages"> 46 <div id="recently-created-pages">
43 - @include('partials/entity-list', ['entities' => $recentlyCreatedPages, 'style' => 'compact']) 47 + @include('partials/entity-list', [
48 + 'entities' => $recentlyCreatedPages,
49 + 'style' => 'compact',
50 + 'emptyText' => 'No pages have been recently created'
51 + ])
44 </div> 52 </div>
45 53
46 <h3><a class="no-color" href="/pages/recently-updated">Recently Updated Pages</a></h3> 54 <h3><a class="no-color" href="/pages/recently-updated">Recently Updated Pages</a></h3>
47 <div id="recently-updated-pages"> 55 <div id="recently-updated-pages">
48 - @include('partials/entity-list', ['entities' => $recentlyUpdatedPages, 'style' => 'compact']) 56 + @include('partials/entity-list', [
57 + 'entities' => $recentlyUpdatedPages,
58 + 'style' => 'compact',
59 + 'emptyText' => 'No pages have been recently updated'
60 + ])
49 </div> 61 </div>
50 </div> 62 </div>
51 63
......
1 1
2 -{{--Requires an entity to be passed with the name $entity--}}
3 -
4 @if(count($activity) > 0) 2 @if(count($activity) > 0)
5 <div class="activity-list"> 3 <div class="activity-list">
6 @foreach($activity as $activityItem) 4 @foreach($activity as $activityItem)
...@@ -10,5 +8,5 @@ ...@@ -10,5 +8,5 @@
10 @endforeach 8 @endforeach
11 </div> 9 </div>
12 @else 10 @else
13 - <p class="text-muted">New activity will show up here.</p> 11 + <p class="text-muted">No activity to show</p>
14 @endif 12 @endif
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
16 16
17 @endforeach 17 @endforeach
18 @else 18 @else
19 - <p class="text-muted"> 19 + <p class="text-muted empty-text">
20 - No items available 20 + {{ $emptyText or 'No items available' }}
21 </p> 21 </p>
22 @endif 22 @endif
23 </div> 23 </div>
...\ No newline at end of file ...\ No newline at end of file
......