Skip to content

Commit

Permalink
Split DisablePageInfo skin option into 3 parts,
Browse files Browse the repository at this point in the history
enable permalinks (but not page tags and audit info) for Edit skin
GH-218
  • Loading branch information
roman-yagodin committed Oct 16, 2020
1 parent e463831 commit 145a08f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 42 deletions.
2 changes: 1 addition & 1 deletion R7.Epsilon/R7.Epsilon.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ search-engines:

permalink-formats:

- "/tabid/{tabid}{?language}"
- "/tabid/{tabid}{?ctl}{?mid}{?entryid}"
- "/default.aspx?tabid={tabid}{?forumid}{?threadid}{?scope}"
- "/linkclick.aspx?link={tabid}&portalid={portalid}"

Expand Down
3 changes: 2 additions & 1 deletion R7.Epsilon/Skins/Edit.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<%@ Register TagPrefix="skin" TagName="END" Src="~/Portals/_default/Skins/R7.Epsilon/Blocks/End.ascx" %>
<%
Options.DisableSocialShare = true;
Options.DisablePageInfo = true;
Options.DisablePageTags = true;
Options.DisablePageAudit = true;
%>
<skin:START runat="server" />
<div class="skin skin-edit">
Expand Down
28 changes: 8 additions & 20 deletions R7.Epsilon/Skins/EpsilonSkinOptions.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
//
// File: EpsilonSkinOptions.cs
// Project: R7.Epsilon
//
// Author: Roman M. Yagodin <roman.yagodin@gmail.com>
//
// Copyright (c) 2019 Roman M. Yagodin, R7.Labs
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;

namespace R7.Epsilon.Skins
{
Expand All @@ -29,8 +10,15 @@ public class EpsilonSkinOptions

public bool DisableLogin { get; set; }

[Obsolete]
public bool DisablePageInfo { get; set; }

public bool DisablePageTags { get; set; }

public bool DisablePageAudit { get; set; }

public bool DisablePermalinks { get; set; }

public bool DisableLazyAds { get; set; }

public bool DisableRangy { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion R7.Epsilon/Skins/ErrorSkin.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
Options.DisableSocialShare = true;
Options.DisableBreadCrumb = true;
Options.DisableLogin = true;
Options.DisablePageInfo = true;
Options.DisablePageTags = true;
Options.DisablePageAudit = true;
Options.DisablePermalinks = true;
%>
<skin:START runat="server" />
<div class="skin skin-error">
Expand Down
4 changes: 3 additions & 1 deletion R7.Epsilon/Skins/Home.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<%@ Register TagPrefix="skin" TagName="END" Src="~/Portals/_default/Skins/R7.Epsilon/Blocks/End.ascx" %>
<%
Options.DisableBreadCrumb = true;
Options.DisablePageInfo = true;
Options.DisablePageTags = true;
Options.DisablePageAudit = true;
Options.DisablePermalinks = true;
%>
<skin:START runat="server" />
<div class="skin skin-home">
Expand Down
40 changes: 22 additions & 18 deletions R7.Epsilon/Skins/SkinObjects/PageInfo.ascx
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
<%@ Control Language="C#" AutoEventWireup="false" EnableViewState="false" Inherits="R7.Epsilon.Skins.SkinObjects.PageInfo" %>
<%@ Register TagPrefix="dnn" TagName="TAGS" Src="~/Admin/Skins/Tags.ascx" %>
<% if (!Skin.Options.DisablePageInfo) { %>
<% if (!Skin.Options.DisablePageTags || !Skin.Options.DisablePageAudit || !Skin.Options.DisablePermalinks) { %>
<div class="skin-page-info text-muted">
<% if (ActiveTab.Terms != null && ActiveTab.Terms.Count > 0) { %>
<% if (!Skin.Options.DisablePageTags && ActiveTab.Terms != null && ActiveTab.Terms.Count > 0) { %>
<div class="skin-tags">
<dnn:TAGS runat="server" CssClass="test" ShowCategories="true" ShowTags="false" AllowTagging="false" Separator=" " />
</div>
<hr />
<% } %>
<ul class="list-inline">
<li class="list-inline-item skin-page-info-item" title='<%: T.GetString ("PublishedDate_Tooltip.Text") %>'>
<span class="fas fa-calendar-alt"></span> <%: T.GetString ("PublishedDate.Text") %> <%: PublishedOnDateString %>
</li>
<li class="list-inline-item skin-page-info-item" title='<%: T.GetString ("LastModifiedDate_Tooltip.Text") %>'>
<span class="fas fa-calendar-alt"></span> <%: T.GetString ("LastModifiedDate.Text") %> <%: LastModifiedOnDateString %>
</li>
<li class="list-inline-item skin-page-info-item" title='<%: T.GetString ("LastModifiedByUser_Tooltip.Text") %>'>
<span class="fas fa-user"></span> <%: LastContentModifiedByUserName %>
</li>
<li class="list-inline-item">
<button type="button" id="btnPermalinks" class="btn skin-btn-unstyled text-muted skin-btn-permalinks"
title='<%: T.GetString ("Permalinks_Tooltip.Text") %>'
data-toggle="modal" data-target="#skinPermalinksModal">
<i class="fas fa-globe"></i> <%: T.GetString ("Permalinks.Text") %>
</button>
</li>
<% if (!Skin.Options.DisablePageAudit) { %>
<li class="list-inline-item skin-page-info-item" title='<%: T.GetString ("PublishedDate_Tooltip.Text") %>'>
<span class="fas fa-calendar-alt"></span> <%: T.GetString ("PublishedDate.Text") %> <%: PublishedOnDateString %>
</li>
<li class="list-inline-item skin-page-info-item" title='<%: T.GetString ("LastModifiedDate_Tooltip.Text") %>'>
<span class="fas fa-calendar-alt"></span> <%: T.GetString ("LastModifiedDate.Text") %> <%: LastModifiedOnDateString %>
</li>
<li class="list-inline-item skin-page-info-item" title='<%: T.GetString ("LastModifiedByUser_Tooltip.Text") %>'>
<span class="fas fa-user"></span> <%: LastContentModifiedByUserName %>
</li>
<% } %>
<% if (!Skin.Options.DisablePermalinks) { %>
<li class="list-inline-item">
<button type="button" id="btnPermalinks" class="btn skin-btn-unstyled text-muted skin-btn-permalinks"
title='<%: T.GetString ("Permalinks_Tooltip.Text") %>'
data-toggle="modal" data-target="#skinPermalinksModal">
<i class="fas fa-globe"></i> <%: T.GetString ("Permalinks.Text") %>
</button>
</li>
<% } %>
</ul>
</div>
<% } %>

0 comments on commit 145a08f

Please sign in to comment.