Skip to content

Commit

Permalink
Merge pull request #175 from CodeForPhilly/development
Browse files Browse the repository at this point in the history
Release: laddr v2.3.8
  • Loading branch information
themightychris authored Aug 5, 2017
2 parents 7db9ca0 + f75c861 commit 1952c83
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 22 deletions.
17 changes: 9 additions & 8 deletions html-templates/pages/pages.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
{block content}
<div class="row">
<div class="col-md-8 col-md-offset-2">

<header class="page-header">
<form action="/pages/create" method="GET" class="pull-right">
{* field "Title" "Page Title" *}
<button type="submit" class="btn btn-success">Create New Page</button>
</form>
<h1>Pages Directory</h1>
</header>
{if Emergence\CMS\PagesRequestHandler::checkWriteAccess(\Emergence\CMS\Page::create())}
<header class="page-header">
<form action="/pages/create" method="GET" class="pull-right">
{* field "Title" "Page Title" *}
<button type="submit" class="btn btn-success">Create New Page</button>
</form>
<h1>Pages Directory</h1>
</header>
{/if}

<ul>
{foreach item=Page from=$data}
Expand Down
16 changes: 11 additions & 5 deletions html-templates/people/people.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
{/block}

{block content}
{load_templates "subtemplates/paging.tpl"}

<div class="page-header">
<h1>{_ "Registered Members"} <span class="badge">{$membersTotal|number_format}</span></h1>
</div>
Expand Down Expand Up @@ -39,13 +41,17 @@
</div>

<div class="col-sm-8 col-md-9">
<div class="row row-wrap">
{foreach item=Person from=$data}
{if $.foreach.default.index % 6 == 0}<div class="row">{/if}
<div class="col-sm-4 col-md-2">
{personLink $Person photo=yes photoSize=150 linkCls="thumbnail text-center"}
</div>
{if $.foreach.default.index % 6 == 5 || $.foreach.default.last}</div>{/if}
<div class="col-sm-4 col-md-2">
{personLink $Person photo=yes photoSize=150 linkCls="thumbnail text-center"}
</div>
{/foreach}
</div>

<footer class="page-footer">
{pagingLinks $total pageSize=$limit}
</footer>
</div>
</div>
{/block}
2 changes: 1 addition & 1 deletion html-templates/register/register.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div class="form-group">
<label class="control-label" for="Email">{_ "Email"}</label>
<input type="email" class="form-control" id="Email" name="Email" value="{refill field=Email}" placeholder="{_ '[email protected]'}" aria-describedby="email-help-block">
<p id="email-help-block" class="help-block">Email address <strong>will</strong> be visible to other signed-in memebers.</p>
<p id="email-help-block" class="help-block">Email address <strong>will</strong> be visible to other signed-in members.</p>
</div>

<div class="form-group">
Expand Down
28 changes: 28 additions & 0 deletions html-templates/subtemplates/paging.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{template pagingLinks total pageSize=12 showAll=false}
<nav aria-label="Page navigation">
<ul class="pagination">
{if $total > $pageSize}
{$previousOffset = tif($.get.offset && $.get.offset > $pageSize ? $.get.offset - $pageSize : 0)}
{$nextOffset = tif($.get.offset ? $.get.offset + $pageSize : $pageSize)}
<li class="{if $.get.offset == 0}disabled{/if}">
<a href="?{refill_query limit=$pageSize offset=$previousOffset}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>

{foreach item=page from=range(1,ceil($total/$pageSize))}
{math "($page-1)*$pageSize" assign=offset}
<li class="{if $.get.offset == $offset}active{/if}"><a href="?{refill_query limit=$pageSize offset=$offset}">{$page}</a></li>
{/foreach}

{if $.get.offset < $total - $pageSize}
<li>
<a href="?{refill_query limit=$pageSize offset=$nextOffset}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{/if}
{/if}
</ul>
</nav>
{/template}
3 changes: 2 additions & 1 deletion php-classes/Laddr/PeopleRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
class PeopleRequestHandler extends \PeopleRequestHandler
{
public static $accountLevelBrowse = false;
public static $browseOrder = array('ID' => 'DESC');
public static $browseOrder = ['ID' => 'DESC'];
public static $browseLimitDefault = 30;

public static function handleBrowseRequest($options = [], $conditions = [], $responseID = null, $responseData = [])
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

\Emergence\People\PeopleRequestHandler::$browseLimitDefault = 50;
16 changes: 16 additions & 0 deletions php-config/Git.config.d/emergence-github.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

Git::$repositories['emergence-github'] = [
'remote' => 'https://github.com/JarvusInnovations/emergence-github.git',
'originBranch' => 'master',
'workingBranch' => 'master',
'trees' => [
'html-templates/connectors/github',
'php-classes/Emergence/GitHub',
'php-config/Emergence/GitHub',
'php-config/Emergence/People/User.config.d/github-token.php',
'php-config/Git.config.d/emergence-github.php',
'php-migrations/Emergence/GitHub',
'site-root/connectors/github.php'
]
];
19 changes: 14 additions & 5 deletions php-config/Git.config.d/laddr.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,34 @@
'event-handlers',
'html-templates' => [
'exclude' => [
'#^/redirects/#' // exclude redirects library
'#^/redirects/#', // exclude redirects library
'#^/connectors/github/#'
]
],
'locales',
'php-classes' => [
'exclude' => [
'#^/ReCaptcha/#', // exclude ReCaptcha library pulled from google repo
'#^/Emergence/Redirects/#'
'#^/Emergence/Redirects/#',
'#^/Emergence/GitHub/#'
]
],
'php-config' => [
'exclude' => [
'#^/Site.config.d/redirects.php$#' // exclude redirects library
'#^/Site.config.d/redirects\.php$#', // exclude redirects library
'#^/Emergence/GitHub/#',
'#^/Emergence/People/User\.config\.d/github-token\.php$#'
]
],
'php-migrations' => [
'exclude' => [
'#^/Emergence/GitHub/#'
]
],
'php-migrations',
'site-root' => [
'exclude' => [
'#^/redirects.php$#' // exclude redirects library
'#^/redirects\.php$#', // exclude redirects library
'#^/connectors/github\.php#'
]
]
]
Expand Down
24 changes: 22 additions & 2 deletions site-root/css/laddr/bootstrap-tweaks.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ legend {
border: 0;
}

/* - Grids */

.row-wrap {
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}

.row-wrap [class*="col"] {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
float: none;
}


/*
* + Components
*/
Expand Down Expand Up @@ -105,6 +121,10 @@ h1 .badge {
}

/* - Menus - */
.dropdown:hover .dropdown-menu {
display: block;
@media (min-width: 1024px) {
/* Active submenu on hover, but only in desktop mode */
.dropdown-toggle:hover + .dropdown-menu,
.dropdown-menu:hover {
display: block;
}
}

0 comments on commit 1952c83

Please sign in to comment.