-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<dotnetnuke type="Package" version="5.0"> | ||
<packages> | ||
<package name="Apollo_ModuleProperties" type="SkinObject" version="0.0.1"> | ||
<friendlyName>Apollo ModuleProperties</friendlyName> | ||
<description>This Container SkinObject can display attributes modules. First fully supported module is the HTML module</description> | ||
<license src="License.htm" /> | ||
<releaseNotes /> | ||
<owner> | ||
<name>Erik van Ballegoij</name> | ||
<organization></organization> | ||
<url><![CDATA[<a href="erikvanballegoij.com" target="_blank">erikvanballegoij.com</a>]]></url> | ||
<email><![CDATA[<a href="mailto:[email protected]">[email protected]</a>]]></email> | ||
</owner> | ||
<dependencies> | ||
<dependency type="CoreVersion">07.00.00</dependency> | ||
</dependencies> | ||
<components> | ||
<component type="SkinObject"> | ||
<moduleControl> | ||
<controlKey>MODULEPROPERTIES</controlKey> | ||
<controlSrc>DesktopModules/Apollo/ModuleProperties/ModuleProperties.ascx</controlSrc> | ||
<supportsPartialRendering>False</supportsPartialRendering> | ||
</moduleControl> | ||
</component> | ||
<component type="File"> | ||
<files> | ||
<basePath>DesktopModules\Apollo\ModuleProperties</basePath> | ||
<file> | ||
<name>ModuleProperties.ascx</name> | ||
</file> | ||
<file> | ||
<name>ModuleProperties.ascx.cs</name> | ||
</file> | ||
</files> | ||
</component> | ||
</components> | ||
</package> | ||
</packages> | ||
</dotnetnuke> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div style="width: 650px; height: 400px; overflow: auto"> | ||
<pre> | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2013, Erik van Ballegoij | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
</pre> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%@ Control Language="C#" AutoEventWireup="false" Inherits="DesktopModules.Apollo.ModuleProperties.ModuleProperties" CodeFile="ModuleProperties.ascx.cs" %> | ||
<asp:Label runat="server" ID="lblModuleProperties"></asp:Label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#region Copyright | ||
// | ||
// Copyright (c) 2013 | ||
// by Erik van Balleogij / [email protected] | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation | ||
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and | ||
// to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all copies or substantial portions | ||
// of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED | ||
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | ||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
// DEALINGS IN THE SOFTWARE. | ||
#endregion | ||
#region Usings | ||
|
||
using System; | ||
using System.Web.UI; | ||
|
||
using DotNetNuke.Common.Utilities; | ||
using DotNetNuke.Professional.HtmlPro; | ||
using DotNetNuke.UI.Skins; | ||
|
||
#endregion | ||
|
||
namespace DesktopModules.Apollo.ModuleProperties | ||
{ | ||
|
||
public partial class ModuleProperties : SkinObjectBase | ||
{ | ||
public string CssClass { get; set; } | ||
public string FormatString { get; set; } | ||
public string DateFormat { get; set; } | ||
|
||
protected override void OnLoad(EventArgs e) | ||
{ | ||
base.OnLoad(e); | ||
|
||
lblModuleProperties.CssClass = CssClass; | ||
if (ModuleControl != null && ModuleControl.ModuleContext.ModuleId > Null.NullInteger) | ||
{ | ||
switch (ModuleControl.ModuleContext.Configuration.DesktopModule.ModuleName) | ||
{ | ||
case "DNN_HTML": | ||
var workflowId = new HtmlTextController().GetWorkflow(ModuleControl.ModuleContext.ModuleId, ModuleControl.ModuleContext.TabId, ModuleControl.ModuleContext.PortalId).Value; | ||
|
||
var htmlTextInfo = new HtmlTextController().GetTopHtmlText(ModuleControl.ModuleContext.ModuleId, true, | ||
workflowId); | ||
string formatString = string.IsNullOrEmpty(FormatString) ? "{0}" : FormatString; | ||
string dateFormat = string.IsNullOrEmpty(DateFormat) ? "F" : DateFormat; | ||
|
||
lblModuleProperties.Text = string.Format(formatString, htmlTextInfo.LastModifiedOnDate.ToString(dateFormat)); | ||
break; | ||
default: | ||
// do nothing | ||
break; | ||
} | ||
} | ||
|
||
|
||
} | ||
} | ||
} |