17 Commits

Author SHA1 Message Date
Shannon d5b0abd1ae fixing search 2017-06-27 10:42:37 +10:00
Niels Hartvig 81ba5bd022 Merge pull request #118 from bjarnef/dev-OUR-451-update
Update Fancybox to latest v3
2017-06-26 14:57:38 +02:00
Bjarne Fyrstenborg 96a3ca71a7 Update Fancybox to latest v3 2017-06-23 17:30:45 +02:00
Niels Hartvig a8e253553a Removes people with 0 contributions from list 2017-06-23 13:16:59 +02:00
Niels Hartvig 91280b18f6 Fix from Pull Request #84 2017-06-23 12:59:02 +02:00
Niels Hartvig fbb8ef1ba0 Merge pull request #100 from stvnhrlnd/OUR-441
Our 441
2017-06-23 12:03:02 +02:00
Niels Hartvig 3f46d94a93 Merge branch 'naepalm-feature-icon-size-tweaks' 2017-06-23 11:50:56 +02:00
Niels Hartvig 161fcc7f01 Updates PR with bjarnef's review comments 2017-06-23 11:50:34 +02:00
Niels Hartvig 5e2cb68299 Merge branch 'feature-icon-size-tweaks' of https://github.com/naepalm/OurUmbraco into naepalm-feature-icon-size-tweaks 2017-06-23 11:28:29 +02:00
Niels Hartvig e6a5b59ac6 Merge pull request #117 from umbraco/temp-OUR-456
Removes RTs from twitter feed
2017-06-23 11:26:43 +02:00
Niels Hartvig a1d48afeca Merge pull request #106 from bjarnef/dev-OUR-451
Update to FancyBox v3
2017-06-23 10:55:13 +02:00
Bjarne Fyrstenborg e3c52baf3a Update to FancyBox v3 2017-05-15 19:12:35 +02:00
Janae Cram 0cef4124db Fixes issue #OUR-449. 2017-05-05 13:13:43 -07:00
Steven 87847769ce Update forum partial
Show next page link when current page is less than the total number of pages. Keeps pagination consistent with projects list.
2017-03-04 15:43:46 +00:00
Steven 49c50046c9 Update search JavaScript
Reset page number to 1 when search filters are changed.
2017-03-04 15:11:22 +00:00
Steven c93e4d1e2d Update topic service and forum partial to fix pagination issue
Add new parameters to count method for unsolved and no reply filters. Update view to pass in these parameters.
2017-03-04 14:50:46 +00:00
Steven 686e3deb6c Update forum pagination links
Preserve query string parameters in pagination links so that topic filters do not get reset when switching between pages.
2017-03-04 14:23:19 +00:00
10 changed files with 220 additions and 190 deletions
+3 -2
View File
@@ -62,7 +62,7 @@ function GetSearchFilters(cssClass) {
}
var forumId = $('#selectCategory').val();
if(forumId !== undefined) {
if(forumId) {
forumId = forumId.replace(/([A-Za-z])\w+/g, "");
}
@@ -365,7 +365,8 @@ $('#search-options input[type=checkbox]').click(function () {
newUri = updateQueryString("order", orderValue, window.location.href);
}
} else {
newUri = updateQueryString(this.name, this.checked, window.location.href);
newUri = updateQueryString(this.name, this.checked, window.location.href);
newUri = updateQueryString("page", 1, newUri);
}
console.log(newUri);
window.location = newUri;
+171 -171
View File
@@ -1,174 +1,174 @@
body.packages {
nav {
h3 {
&:hover {
opacity: .8;
}
}
h4 {
opacity: .7;
margin: .5rem 0 .5rem;
}
}
li {
h3 {
opacity: .5;
}
&.open, &.active {
h3, a {
opacity: 1;
color: #000 !important;
}
}
&.active > ul {
max-height: 100%;
}
}
}
.packages-content {
.search-big {
margin-bottom: 0;
margin-top: 20px;
}
h1 {
margin: 1em 0 10px;
font-size: 2.1rem;
}
.package {
margin-bottom: 15px;
padding: 20px;
transition: all .1s linear;
cursor: pointer;
position: relative;
overflow: hidden;
border-radius: 3px;
border: 1px solid #e9e9e9;
&:hover {
@include box-shadow(2);
.icon {
transform: scale(1.1);
}
}
}
.box {
border: none;
border-bottom: 1px solid whitesmoke;
width: 100%;
body.packages {
nav {
h3 {
&:hover {
opacity: .8;
}
}
h4 {
opacity: .7;
margin: .5rem 0 .5rem;
}
}
li {
h3 {
opacity: .5;
}
&.open, &.active {
h3, a {
opacity: 1;
color: #000 !important;
}
}
&.active > ul {
max-height: 100%;
}
}
}
.packages-content {
.search-big {
margin-bottom: 0;
margin-top: 20px;
}
h1 {
margin: 1em 0 10px;
font-size: 2.1rem;
}
.package {
margin-bottom: 15px;
padding: 20px;
transition: all .1s linear;
cursor: pointer;
position: relative;
overflow: hidden;
border-radius: 3px;
border: 1px solid #e9e9e9;
&:hover {
@include box-shadow(2);
.icon {
transform: scale(1.1);
}
}
}
.box {
border: none;
border-bottom: 1px solid whitesmoke;
width: 100%;
.row{
width:100%;
}
h3 {
font-size: 1.1rem;
margin-bottom: .5rem;
font-weight: 600;
a {
color: $color-headline;
&:hover {
color: $color-our;
}
}
}
img {
max-width: 100%;
height: auto;
display: block;
vertical-align: middle;
@media (min-width: $md) {
}
}
.col-xs-2 {
vertical-align: middle !important;
padding: 0 !important;
}
.other {
margin-top: 30px;
}
.stats {
left: calc(16.666666666666664% + 15px);
font-family: Consolas, "Liberation Mono", Menlo, Monaco, Courier, monospace;
font-size: .75rem;
i {
margin-left: 3px;
font-size: .9rem;
}
span {
&:first-child {
margin-right: 0px;
}
}
}
p {
font-size: .9rem;
color: $color-text;
opacity: 1;
}
.package-badge {
position: absolute;
right: 15px;
bottom: -3px;
@media (min-width: $md) {
position: absolute;
right: 0;
bottom: 25px;
}
}
.karma , .downloads {
color: #000;
span {
transform: translate(0, 2px);
display: inline-block;
}
}
&.liked {
.karma {
i {
color: $color-red;
}
}
}
}
.name {
font-size: 1rem;
line-height: 1.3;
font-weight: bold;
}
.description {
font-size: .8rem;
margin-top: 3px;
max-height: 28px;
overflow: hidden;
}
}
h3 {
font-size: 1.1rem;
margin-bottom: .5rem;
font-weight: 600;
a {
color: $color-headline;
&:hover {
color: $color-our;
}
}
}
img {
max-width: 100%;
height: auto;
display: block;
vertical-align: middle;
@media (min-width: $md) {
}
}
.col-xs-2 {
vertical-align: middle !important;
padding: 0 !important;
}
.other {
margin-top: 30px;
}
.stats {
left: calc(16.666666666666664% + 15px);
font-family: Consolas, "Liberation Mono", Menlo, Monaco, Courier, monospace;
font-size: .75rem;
i {
margin-left: 3px;
font-size: .9rem;
}
span {
&:first-child {
margin-right: 0px;
}
}
}
p {
font-size: .9rem;
color: $color-text;
opacity: 1;
}
.package-badge {
position: absolute;
right: 15px;
bottom: -3px;
@media (min-width: $md) {
position: absolute;
right: 0;
bottom: 25px;
}
}
.karma , .downloads {
color: #000;
span {
transform: translate(0, 2px);
display: inline-block;
}
}
&.liked {
.karma {
i {
color: $color-red;
}
}
}
}
.name {
font-size: 1rem;
line-height: 1.3;
font-weight: bold;
}
.description {
font-size: .8rem;
margin-top: 3px;
max-height: 28px;
overflow: hidden;
}
}
@@ -157,6 +157,10 @@ section.forum {
max-width: 112px;
height: auto;
.package-forum-activity & {
border-radius: 0;
}
@media (min-width: $md) {
width: 58px;
}
+3 -3
View File
@@ -14,7 +14,7 @@
Html.RequiresCss("~/assets/css/style.min.css", 0);
Html.RequiresCss("https://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic", 0);
Html.RequiresCss("https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css", 0);
Html.RequiresCss("https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.css", 0);
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.13.1/jquery.validate.min.js");
@@ -23,7 +23,7 @@
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Editor.js");
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Sanitizer.js");
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.8.1/mustache.min.js");
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js");
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.js");
Html.RequiresJs("~/assets/js/jquery.ajaxfileupload.js");
@@ -90,7 +90,7 @@
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
<![endif]-->
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
@Html.Partial("~/Views/Partials/Community/JsValues.cshtml")
@@ -5,6 +5,9 @@
@inherits OurUmbraco.Our.Models.OurUmbracoTemplatePage
@{
// Save query string for use in pagination links
var queryString = HttpUtility.ParseQueryString(Request.QueryString.ToString());
const int pagesToShowLeft = 4;
int page;
if (!int.TryParse(Request["page"], out page))
@@ -40,9 +43,9 @@
TimeSpan.FromSeconds(4));
}
var totalCountKey = "OurForumForumThreadCount[" + cat + "]";
var totalCountKey = "OurForumForumThreadCount[" + cat + unsolved + noreplies + "]";
var totalTopics = (int)cache.GetCacheItem(totalCountKey,
() => topicService.GetAllTopicsCount(cat),
() => topicService.GetAllTopicsCount(cat, unsolved, noreplies),
TimeSpan.FromMinutes(1));
var pages = (totalTopics / pageSize) + 1;
@@ -168,19 +171,22 @@
<nav class="pagination" role="navigation">
@if (page > 1)
{
<a class="prev" href="?page=@(page - 1)">Prev</a>
queryString["page"] = (page - 1).ToString();
<a class="prev" href="?@queryString">Prev</a>
<span>&hellip;</span>
}
@for (var i = (page - 1 > 0 ? page - 1 : 1); i < (page + (pagesToShowLeft - (page - 1 > 0 ? 1 : 0))) && i <= pages; i++)
{
<a class="@Umbraco.If(i == page, "active")" href="?page=@i">@i</a>
queryString["page"] = i.ToString();
<a class="@Umbraco.If(i == page, "active")" href="?@queryString">@i</a>
}
@if (page < (pages - 3))
@if (page < pages)
{
queryString["page"] = (page + 1).ToString();
<span>&hellip;</span>
<a class="next" href="?page=@(page + 1)">Next</a>
<a class="next" href="?@queryString">Next</a>
}
</nav>
@@ -185,7 +185,9 @@
defaultScreenshot = childContent.GetPropertyValue("defaultScreenshotPath", false, "/css/img/package2.png");
}
}
<img src="@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=50&height=50&format=png" />
<img src="@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=50&height=50&format=png"
srcset="@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=100&height=100&format=png 2x,
@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=150&height=150&format=png 3x" />
</div>
<div class="col-xs-10 col-md-6">
<div class="forum-thread-text">
@@ -81,7 +81,7 @@
@foreach (var image in screenshots)
{
<a class="fancybox" rel="gallery1" href="@Utils.GetScreenshotPath(image.Path)" title="">
<a class="fancybox" data-fancybox="package-gallery" href="@Utils.GetScreenshotPath(image.Path)" title="">
<img src="@Utils.GetScreenshotPath(image.Path)?bgcolor=fff&height=154&width=281&format=png" alt=""/>
</a>
}
@@ -236,7 +236,7 @@
<a href="@forum.Url" class="forum-thread">
<div class="row">
<div class="col-xs-10 col-md-0">
<div class="col-xs-12 col-md-12">
<div class="forum-thread-text">
<h3>@forum.Name</h3>
<p>@forum.forumDescription</p>
+4 -3
View File
@@ -18,9 +18,10 @@
(function () {
$(".fancybox")
.fancybox({
openEffect: 'none',
closeEffect: 'none',
padding: 0
// options
loop: true,
arrows: true,
infobar: false
});
})();
</script>
@@ -157,7 +157,11 @@ namespace OurUmbraco.Community.Controllers
foreach (var group in filteredContributors)
{
temp.Add(new GitHubGlobalContributorModel(group));
var contributor = new GitHubGlobalContributorModel(group);
if (contributor.TotalCommits > 0)
{
temp.Add(contributor);
}
}
return temp;
+13 -1
View File
@@ -123,7 +123,7 @@ FETCH NEXT @count ROWS ONLY";
/// </summary>
/// <param name="category"></param>
/// <returns></returns>
public int GetAllTopicsCount(int category = -1)
public int GetAllTopicsCount(int category = -1, bool unsolved = false, bool noreplies = false)
{
const string sql1 = @"SELECT COUNT(*) as forumTopicCount
FROM forumTopics
@@ -135,6 +135,18 @@ LEFT OUTER JOIN umbracoNode u2 ON (forumTopics.memberId = u2.id AND u2.nodeObjec
var sql = (category > 0 ? sqlic : sqlix);
if (unsolved)
if (sql.Contains("WHERE"))
sql = sql + " AND answer = 0";
else
sql = sql + " WHERE answer = 0";
if (noreplies)
if (sql.Contains("WHERE"))
sql = sql + " AND replies = 0";
else
sql = sql + " WHERE replies = 0";
return _databaseContext.Database.ExecuteScalar<int>(sql, new { category = category });
}