Skip to content

Commit 1952c83

Browse files
Merge pull request #175 from CodeForPhilly/development
Release: laddr v2.3.8
2 parents 7db9ca0 + f75c861 commit 1952c83

File tree

9 files changed

+106
-22
lines changed

9 files changed

+106
-22
lines changed

html-templates/pages/pages.tpl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
{block content}
66
<div class="row">
77
<div class="col-md-8 col-md-offset-2">
8-
9-
<header class="page-header">
10-
<form action="/pages/create" method="GET" class="pull-right">
11-
{* field "Title" "Page Title" *}
12-
<button type="submit" class="btn btn-success">Create New Page</button>
13-
</form>
14-
<h1>Pages Directory</h1>
15-
</header>
8+
{if Emergence\CMS\PagesRequestHandler::checkWriteAccess(\Emergence\CMS\Page::create())}
9+
<header class="page-header">
10+
<form action="/pages/create" method="GET" class="pull-right">
11+
{* field "Title" "Page Title" *}
12+
<button type="submit" class="btn btn-success">Create New Page</button>
13+
</form>
14+
<h1>Pages Directory</h1>
15+
</header>
16+
{/if}
1617

1718
<ul>
1819
{foreach item=Page from=$data}

html-templates/people/people.tpl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
{/block}
99

1010
{block content}
11+
{load_templates "subtemplates/paging.tpl"}
12+
1113
<div class="page-header">
1214
<h1>{_ "Registered Members"} <span class="badge">{$membersTotal|number_format}</span></h1>
1315
</div>
@@ -39,13 +41,17 @@
3941
</div>
4042

4143
<div class="col-sm-8 col-md-9">
44+
<div class="row row-wrap">
4245
{foreach item=Person from=$data}
43-
{if $.foreach.default.index % 6 == 0}<div class="row">{/if}
44-
<div class="col-sm-4 col-md-2">
45-
{personLink $Person photo=yes photoSize=150 linkCls="thumbnail text-center"}
46-
</div>
47-
{if $.foreach.default.index % 6 == 5 || $.foreach.default.last}</div>{/if}
46+
<div class="col-sm-4 col-md-2">
47+
{personLink $Person photo=yes photoSize=150 linkCls="thumbnail text-center"}
48+
</div>
4849
{/foreach}
50+
</div>
51+
52+
<footer class="page-footer">
53+
{pagingLinks $total pageSize=$limit}
54+
</footer>
4955
</div>
5056
</div>
5157
{/block}

html-templates/register/register.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<div class="form-group">
4747
<label class="control-label" for="Email">{_ "Email"}</label>
4848
<input type="email" class="form-control" id="Email" name="Email" value="{refill field=Email}" placeholder="{_ 'civichacker@example.com'}" aria-describedby="email-help-block">
49-
<p id="email-help-block" class="help-block">Email address <strong>will</strong> be visible to other signed-in memebers.</p>
49+
<p id="email-help-block" class="help-block">Email address <strong>will</strong> be visible to other signed-in members.</p>
5050
</div>
5151

5252
<div class="form-group">
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{template pagingLinks total pageSize=12 showAll=false}
2+
<nav aria-label="Page navigation">
3+
<ul class="pagination">
4+
{if $total > $pageSize}
5+
{$previousOffset = tif($.get.offset && $.get.offset > $pageSize ? $.get.offset - $pageSize : 0)}
6+
{$nextOffset = tif($.get.offset ? $.get.offset + $pageSize : $pageSize)}
7+
<li class="{if $.get.offset == 0}disabled{/if}">
8+
<a href="?{refill_query limit=$pageSize offset=$previousOffset}" aria-label="Previous">
9+
<span aria-hidden="true">&laquo;</span>
10+
</a>
11+
</li>
12+
13+
{foreach item=page from=range(1,ceil($total/$pageSize))}
14+
{math "($page-1)*$pageSize" assign=offset}
15+
<li class="{if $.get.offset == $offset}active{/if}"><a href="?{refill_query limit=$pageSize offset=$offset}">{$page}</a></li>
16+
{/foreach}
17+
18+
{if $.get.offset < $total - $pageSize}
19+
<li>
20+
<a href="?{refill_query limit=$pageSize offset=$nextOffset}" aria-label="Next">
21+
<span aria-hidden="true">&raquo;</span>
22+
</a>
23+
</li>
24+
{/if}
25+
{/if}
26+
</ul>
27+
</nav>
28+
{/template}

php-classes/Laddr/PeopleRequestHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
class PeopleRequestHandler extends \PeopleRequestHandler
1010
{
1111
public static $accountLevelBrowse = false;
12-
public static $browseOrder = array('ID' => 'DESC');
12+
public static $browseOrder = ['ID' => 'DESC'];
13+
public static $browseLimitDefault = 30;
1314

1415
public static function handleBrowseRequest($options = [], $conditions = [], $responseID = null, $responseData = [])
1516
{
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
\Emergence\People\PeopleRequestHandler::$browseLimitDefault = 50;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
Git::$repositories['emergence-github'] = [
4+
'remote' => 'https://github.com/JarvusInnovations/emergence-github.git',
5+
'originBranch' => 'master',
6+
'workingBranch' => 'master',
7+
'trees' => [
8+
'html-templates/connectors/github',
9+
'php-classes/Emergence/GitHub',
10+
'php-config/Emergence/GitHub',
11+
'php-config/Emergence/People/User.config.d/github-token.php',
12+
'php-config/Git.config.d/emergence-github.php',
13+
'php-migrations/Emergence/GitHub',
14+
'site-root/connectors/github.php'
15+
]
16+
];

php-config/Git.config.d/laddr.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,34 @@
99
'event-handlers',
1010
'html-templates' => [
1111
'exclude' => [
12-
'#^/redirects/#' // exclude redirects library
12+
'#^/redirects/#', // exclude redirects library
13+
'#^/connectors/github/#'
1314
]
1415
],
1516
'locales',
1617
'php-classes' => [
1718
'exclude' => [
1819
'#^/ReCaptcha/#', // exclude ReCaptcha library pulled from google repo
19-
'#^/Emergence/Redirects/#'
20+
'#^/Emergence/Redirects/#',
21+
'#^/Emergence/GitHub/#'
2022
]
2123
],
2224
'php-config' => [
2325
'exclude' => [
24-
'#^/Site.config.d/redirects.php$#' // exclude redirects library
26+
'#^/Site.config.d/redirects\.php$#', // exclude redirects library
27+
'#^/Emergence/GitHub/#',
28+
'#^/Emergence/People/User\.config\.d/github-token\.php$#'
29+
]
30+
],
31+
'php-migrations' => [
32+
'exclude' => [
33+
'#^/Emergence/GitHub/#'
2534
]
2635
],
27-
'php-migrations',
2836
'site-root' => [
2937
'exclude' => [
30-
'#^/redirects.php$#' // exclude redirects library
38+
'#^/redirects\.php$#', // exclude redirects library
39+
'#^/connectors/github\.php#'
3140
]
3241
]
3342
]

site-root/css/laddr/bootstrap-tweaks.css

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ legend {
2727
border: 0;
2828
}
2929

30+
/* - Grids */
31+
32+
.row-wrap {
33+
display: -webkit-flex;
34+
display: flex;
35+
-webkit-flex-wrap: wrap;
36+
flex-wrap: wrap;
37+
}
38+
39+
.row-wrap [class*="col"] {
40+
-webkit-flex: 0 0 auto;
41+
flex: 0 0 auto;
42+
float: none;
43+
}
44+
45+
3046
/*
3147
* + Components
3248
*/
@@ -105,6 +121,10 @@ h1 .badge {
105121
}
106122

107123
/* - Menus - */
108-
.dropdown:hover .dropdown-menu {
109-
display: block;
124+
@media (min-width: 1024px) {
125+
/* Active submenu on hover, but only in desktop mode */
126+
.dropdown-toggle:hover + .dropdown-menu,
127+
.dropdown-menu:hover {
128+
display: block;
129+
}
110130
}

0 commit comments

Comments
 (0)