Initial project's source code check-in.

This commit is contained in:
ptsurbeleu 2011-07-13 16:07:32 -07:00
commit b03b0b373f
4573 changed files with 981205 additions and 0 deletions

View file

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ddlUSerFieldsItem.CompanyName" xml:space="preserve">
<value>Company Name</value>
</data>
<data name="ddlUserFieldsItem.Email" xml:space="preserve">
<value>E-Mail</value>
</data>
<data name="ddlUserFieldsItem.FullName" xml:space="preserve">
<value>Full Name</value>
</data>
<data name="ddlUserFieldsItem.Username" xml:space="preserve">
<value>Username</value>
</data>
<data name="Spaces.Text" xml:space="preserve">
<value>Spaces</value>
</data>
<data name="Users.Text" xml:space="preserve">
<value>Users</value>
</data>
</root>

View file

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="cmdSignOut.Text" xml:space="preserve">
<value>Sign Out</value>
</data>
<data name="lnkEditUserDetails.Text" xml:space="preserve">
<value>My Account</value>
</data>
<data name="lnkSignIn.Text" xml:space="preserve">
<value>Sign In</value>
</data>
<data name="locWelcome.Text" xml:space="preserve">
<value>Welcome</value>
</data>
</root>

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="locPoweredBy.Text" xml:space="preserve">
<value>Powered by &lt;a href="http://www.websitepanel.net" target="_blank"&gt;WebsitePanel&lt;/a&gt;. Copyright &amp;copy; 2011 Outercurve Foundation.</value>
</data>
<data name="locVersion.Text" xml:space="preserve">
<value>Version</value>
</data>
</root>

View file

@ -0,0 +1,54 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GlobalSearch.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.GlobalSearch" %>
<asp:UpdatePanel runat="server" ID="updatePanelUsers" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" align="right">
<tr>
<td align="left">
<asp:DataList ID="dlTabs" runat="server" RepeatDirection="Horizontal"
OnSelectedIndexChanged="dlTabs_SelectedIndexChanged" RepeatLayout="Table">
<ItemStyle Wrap="false" VerticalAlign="Top" />
<ItemTemplate>
<asp:LinkButton ID="lnkTab" runat="server" CommandName="select"
CausesValidation="false" CssClass="SearchMethod">
<%# Eval("Name") %>
</asp:LinkButton>
</ItemTemplate>
<SelectedItemStyle Wrap="false" />
<SelectedItemTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td class="SearchMethodSide" valign="top"></td>
<td class="SearchMethodSelected" valign="top"><%# Eval("Name")%></td>
<td class="SearchMethodSide" valign="top"></td>
</tr>
</table>
</SelectedItemTemplate>
</asp:DataList>
</td>
</tr>
<tr>
<td align="left" class="SearchQuery">
<asp:MultiView ID="tabs" runat="server" ActiveViewIndex="0">
<asp:View ID="tabSearchUsers" runat="server">
<asp:Panel ID="pnlSearchUsers" runat="server" DefaultButton="btnSearchUsers">
<asp:DropDownList ID="ddlUserFields" runat="server" resourcekey="ddlUserFields" CssClass="NormalTextBox" Width="150px" style="vertical-align: middle;">
<asp:ListItem Value="Username">Username</asp:ListItem>
<asp:ListItem Value="Email">Email</asp:ListItem>
<asp:ListItem Value="FullName">FullName</asp:ListItem>
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtUsersQuery" runat="server" CssClass="NormalTextBox" Width="120px" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="btnSearchUsers" runat="server" SkinID="SearchButton" OnClick="btnSearchUsers_Click" CausesValidation="false" style="vertical-align: middle;" />
</asp:Panel>
</asp:View>
<asp:View ID="tabSearchSpaces" runat="server">
<asp:Panel ID="pnlSearchSpaces" runat="server" DefaultButton="btnSearchSpaces">
<asp:DropDownList ID="ddlItemType" runat="server" Width="150px" CssClass="NormalTextBox" style="vertical-align: middle;">
</asp:DropDownList><asp:TextBox ID="txtSpacesQuery" runat="server" CssClass="NormalTextBox" Width="120px" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="btnSearchSpaces" runat="server" SkinID="SearchButton" OnClick="btnSearchSpaces_Click" CausesValidation="false" style="vertical-align: middle;" />
</asp:Panel>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>

View file

@ -0,0 +1,135 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.SkinControls
{
public partial class GlobalSearch : WebsitePanelControlBase
{
class Tab
{
int index;
string name;
public Tab(int index, string name)
{
this.index = index;
this.name = name;
}
public int Index
{
get { return this.index; }
set { this.index = value; }
}
public string Name
{
get { return this.name; }
set { this.name = value; }
}
}
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
BindTabs();
BindItemTypes();
}
}
private void BindTabs()
{
List<Tab> tabsList = new List<Tab>();
if (PanelSecurity.EffectiveUser.Role != UserRole.User)
tabsList.Add(new Tab(0, GetLocalizedString("Users.Text")));
tabsList.Add(new Tab(1, GetLocalizedString("Spaces.Text")));
if(dlTabs.SelectedIndex == -1)
dlTabs.SelectedIndex = 0;
dlTabs.DataSource = tabsList.ToArray();
dlTabs.DataBind();
tabs.ActiveViewIndex = tabsList[dlTabs.SelectedIndex].Index;
}
private void BindItemTypes()
{
// bind item types
DataTable dtItemTypes = ES.Services.Packages.GetSearchableServiceItemTypes().Tables[0];
foreach (DataRow dr in dtItemTypes.Rows)
{
// Trying a well-known workaround to distinguish different service item types with the same name
var localizedStr = PortalUtils.GetSharedLocalizedString(Utils.ModuleName, "ServiceItemType." + dr["DisplayName"].ToString() + "_" + dr["ItemTypeID"].ToString());
// Looking for localized text
if (String.IsNullOrWhiteSpace(localizedStr))
{
localizedStr = PortalUtils.GetSharedLocalizedString(Utils.ModuleName, "ServiceItemType." + dr["DisplayName"].ToString());
}
//
ddlItemType.Items.Add(new ListItem(localizedStr, dr["ItemTypeID"].ToString()));
}
}
protected void dlTabs_SelectedIndexChanged(object sender, EventArgs e)
{
BindTabs();
}
protected void btnSearchUsers_Click(object sender, EventArgs e)
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(txtUsersQuery.Text),
"Criteria=" + ddlUserFields.SelectedValue));
}
protected void btnSearchSpaces_Click(object sender, EventArgs e)
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(txtSpacesQuery.Text),
"ItemTypeID=" + ddlItemType.SelectedValue));
}
}
}

View file

@ -0,0 +1,132 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.SkinControls {
public partial class GlobalSearch {
/// <summary>
/// updatePanelUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel updatePanelUsers;
/// <summary>
/// dlTabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DataList dlTabs;
/// <summary>
/// tabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView tabs;
/// <summary>
/// tabSearchUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.View tabSearchUsers;
/// <summary>
/// pnlSearchUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlSearchUsers;
/// <summary>
/// ddlUserFields control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlUserFields;
/// <summary>
/// txtUsersQuery control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtUsersQuery;
/// <summary>
/// btnSearchUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton btnSearchUsers;
/// <summary>
/// tabSearchSpaces control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.View tabSearchSpaces;
/// <summary>
/// pnlSearchSpaces control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlSearchSpaces;
/// <summary>
/// ddlItemType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlItemType;
/// <summary>
/// txtSpacesQuery control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtSpacesQuery;
/// <summary>
/// btnSearchSpaces control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton btnSearchSpaces;
}
}

View file

@ -0,0 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Logo.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.Logo" %>
<a href="<%= Page.ResolveUrl("~/") %>"><asp:Image ID="imgLogo" runat="server" /></a>

View file

@ -0,0 +1,68 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.SkinControls
{
public partial class Logo : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
BindLogo();
}
private void BindLogo()
{
imgLogo.ImageUrl = PortalUtils.GetThemedImage("logo.png");
// load settings
if (Page.User.Identity.IsAuthenticated)
{
UserSettings settings = UsersHelper.GetCachedUserSettings(PanelSecurity.EffectiveUserId,
UserSettings.WEBSITEPANEL_POLICY);
if (settings != null)
{
string logoImageURL = settings["LogoImageURL"];
if (!String.IsNullOrEmpty(logoImageURL))
imgLogo.ImageUrl = logoImageURL;
}
}
}
}
}

View file

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3074
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.SkinControls {
public partial class Logo {
/// <summary>
/// imgLogo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgLogo;
}
}

View file

@ -0,0 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductVersion.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.ProductVersion" %>
<asp:Literal ID="litVersion" runat="server"></asp:Literal>

View file

@ -0,0 +1,74 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Reflection;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace WebsitePanel.Portal.SkinControls
{
public partial class ProductVersion : System.Web.UI.UserControl
{
private string assemblyName;
public string AssemblyName
{
get { return assemblyName; }
set { assemblyName = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!String.IsNullOrEmpty(assemblyName))
{
object[] attrs = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), true);
//
if (attrs.Length > 0)
{
var asmInfoVerAttrib = (AssemblyInformationalVersionAttribute)attrs[0];
litVersion.Text = asmInfoVerAttrib.InformationalVersion;
#if DEBUG
var fileVersionAttr = ((AssemblyFileVersionAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true)[0]);
litVersion.Text = String.Format("{0} ({1})", asmInfoVerAttrib.InformationalVersion, fileVersionAttr.Version);
#endif
}
}
}
catch { /* skip */ }
}
}
}

View file

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.SkinControls {
public partial class ProductVersion {
/// <summary>
/// litVersion control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litVersion;
}
}

View file

@ -0,0 +1,10 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SignedInUser.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.SignedInUser" %>
<asp:Panel ID="AnonymousPanel" runat="server">
<asp:HyperLink ID="lnkSignIn" runat="server" meta:resourcekey="lnkSignIn">Sign In</asp:HyperLink>
</asp:Panel>
<asp:Panel ID="LoggedPanel" runat="server">
<asp:Localize runat="server" meta:resourcekey="locWelcome"/> <strong><asp:Literal ID="litUsername" runat="server"></asp:Literal></strong>&nbsp;&nbsp;&nbsp;
<asp:HyperLink ID="lnkEditUserDetails" runat="server" meta:resourcekey="lnkEditUserDetails">My Account</asp:HyperLink>
| <asp:LinkButton ID="cmdSignOut" runat="server" Text="Sign Out" meta:resourcekey="cmdSignOut"
CausesValidation="false" OnClick="cmdSignOut_Click"></asp:LinkButton>
</asp:Panel>

View file

@ -0,0 +1,74 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.SkinControls
{
public partial class SignedInUser : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindUser();
}
}
private void BindUser()
{
UserInfo user = PanelSecurity.LoggedUser;
if (user != null)
{
litUsername.Text = PanelSecurity.LoggedUser.Username;
lnkEditUserDetails.NavigateUrl = PortalUtils.GetLoggedUserAccountPageUrl();
}
AnonymousPanel.Visible = !Request.IsAuthenticated;
LoggedPanel.Visible = Request.IsAuthenticated;
lnkSignIn.NavigateUrl = PortalUtils.LoginRedirectUrl;
}
protected void cmdSignOut_Click(object sender, EventArgs e)
{
PortalUtils.UserSignOut();
}
}
}

View file

@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.SkinControls {
public partial class SignedInUser {
protected System.Web.UI.WebControls.Panel AnonymousPanel;
protected System.Web.UI.WebControls.HyperLink lnkSignIn;
protected System.Web.UI.WebControls.Panel LoggedPanel;
protected System.Web.UI.WebControls.Literal litUsername;
protected System.Web.UI.WebControls.HyperLink lnkEditUserDetails;
protected System.Web.UI.WebControls.LinkButton cmdSignOut;
}
}

View file

@ -0,0 +1,12 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SiteFooter.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.SiteFooter" %>
<%@ Register TagPrefix="wsp" TagName="ProductVersion" Src="ProductVersion.ascx" %>
<table class="Container" cellpadding="0" cellspacing="0">
<tr>
<td class="Copyright">
<asp:Localize ID="locPoweredBy" runat="server" meta:resourcekey="locPoweredBy" />
</td>
<td class="Version">
<asp:Localize ID="locVersion" runat="server" meta:resourcekey="locVersion" /> <wsp:ProductVersion id="wspVersion" runat="server" AssemblyName="WebsitePanel.Portal.Modules"/>
</td>
</tr>
</table>

View file

@ -0,0 +1,49 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace WebsitePanel.Portal.SkinControls
{
public partial class SiteFooter : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View file

@ -0,0 +1,18 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.SkinControls {
public partial class SiteFooter {
protected System.Web.UI.WebControls.Localize locPoweredBy;
protected System.Web.UI.WebControls.Localize locVersion;
protected WebsitePanel.Portal.SkinControls.ProductVersion wspVersion;
}
}

View file

@ -0,0 +1,7 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TopMenu.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.TopMenu" %>
<asp:SiteMapDataSource ID="siteMapSource" runat="server" ShowStartingNode="False" />
<asp:Menu ID="topMenu" runat="server" DataSourceID="siteMapSource"
CssSelectorClass="TopMenu" Orientation="Horizontal"
EnableViewState="False" onmenuitemdatabound="topMenu_MenuItemDataBound">
</asp:Menu>

View file

@ -0,0 +1,57 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace WebsitePanel.Portal.SkinControls
{
public partial class TopMenu : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void topMenu_MenuItemDataBound(object sender, MenuEventArgs e)
{
string target = ((SiteMapNode)e.Item.DataItem)["target"];
if(!String.IsNullOrEmpty(target))
e.Item.Target = target;
}
}
}

View file

@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3074
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.SkinControls {
public partial class TopMenu {
/// <summary>
/// siteMapSource control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.SiteMapDataSource siteMapSource;
/// <summary>
/// topMenu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Menu topMenu;
}
}

View file

@ -0,0 +1,47 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserSpaceBreadcrumb.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.UserSpaceBreadcrumb" %>
<div id="Breadcrumb">
<div class="Path">
<asp:Repeater ID="repUsersPath" runat="server" OnItemDataBound="repUsersPath_ItemDataBound"
EnableViewState="false">
<ItemTemplate>
<asp:HyperLink ID="lnkUser" runat="server"></asp:HyperLink>
</ItemTemplate>
<SeparatorTemplate><asp:Image ID="imgSep" runat="server" SkinID="PathSeparatorWhite" /></SeparatorTemplate>
</asp:Repeater>
<span id="spanSpace" runat="server">
<asp:Image ID="imgSep" runat="server" SkinID="PathSeparatorWhite" />
<asp:Image ID="Image1" runat="server" SkinID="Space16" />
<asp:HyperLink ID="lnkSpace" runat="server" Text="SpaceName" NavigateUrl="#"></asp:HyperLink>
</span>
<asp:Image ID="imgSep2" runat="server" SkinID="PathSeparatorWhite" /> <asp:HyperLink ID="lnkCurrentPage" runat="server"></asp:HyperLink>
</div>
<div class="CurrentNode" runat="server" id="CurrentNode">
<asp:Panel ID="pnlViewUser" runat="server">
<asp:Label ID="lblUsername" runat="server" CssClass="Huge"></asp:Label>
</asp:Panel>
<asp:UpdatePanel runat="server" ID="updatePanelUsers" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:Panel ID="pnlViewSpace" runat="server">
<asp:LinkButton ID="cmdSpaceName" runat="server" Text="Change Name" OnClick="cmdChangeName_Click" CssClass="Huge" CausesValidation="false" />
<asp:Label ID="lblSpaceDescription" runat="server" Visible="false"></asp:Label>
</asp:Panel>
<asp:Panel ID="pnlEditSpace" runat="server" DefaultButton="cmdSave" Visible="false">
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:TextBox ID="txtName" runat="server" CssClass="Huge" Width="300px"></asp:TextBox>
</td>
<td rowspan="2" valign="top">
&nbsp;&nbsp;<asp:LinkButton ID="cmdSave" runat="server" Text="Save" CssClass="Button" OnClick="cmdSave_Click" ValidationGroup="SpaceName" />
<asp:LinkButton ID="cmdCancel" runat="server" Text="Cancel" CssClass="Button" OnClick="cmdCancel_Click" CausesValidation="false" />
</td>
</tr>
</table>
</asp:Panel><asp:RequiredFieldValidator ID="valRequireName" runat="server" ControlToValidate="txtName"
ErrorMessage="*" Display="Dynamic" ValidationGroup="SpaceName"></asp:RequiredFieldValidator></ContentTemplate>
</asp:UpdatePanel>
</div>
</div>

View file

@ -0,0 +1,148 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.SkinControls
{
public partial class UserSpaceBreadcrumb : System.Web.UI.UserControl
{
public bool CurrentNodeVisible
{
get { return CurrentNode.Visible; }
set { CurrentNode.Visible = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
BindUsersPath();
BindUserSpace();
}
private void BindUsersPath()
{
repUsersPath.DataSource = ES.Services.Users.GetUserParents(PanelSecurity.SelectedUserId);
repUsersPath.DataBind();
}
private void BindUserSpace()
{
spanSpace.Visible = false;
pnlViewSpace.Visible = false;
pnlEditSpace.Visible = false;
lnkCurrentPage.Text = PortalUtils.GetLocalizedPageName(PortalUtils.GetCurrentPageId());
if (PanelSecurity.PackageId > 0)
{
// space
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
if (package != null)
{
spanSpace.Visible = true;
pnlViewSpace.Visible = true;
lnkSpace.Text = package.PackageName;
lnkSpace.NavigateUrl = PortalUtils.GetSpaceHomePageUrl(package.PackageId);
cmdSpaceName.Text = package.PackageName;
lblSpaceDescription.Text = package.PackageComments;
lnkCurrentPage.NavigateUrl = PortalUtils.NavigatePageURL(
PortalUtils.GetCurrentPageId(), "SpaceID", PanelSecurity.PackageId.ToString());
}
}
else
{
pnlViewUser.Visible = true;
// user
UserInfo user = UsersHelper.GetUser(PanelSecurity.SelectedUserId);
if (user != null)
{
lblUsername.Text = user.Username;
lnkCurrentPage.NavigateUrl = PortalUtils.NavigatePageURL(
PortalUtils.GetCurrentPageId(), "UserID", PanelSecurity.SelectedUserId.ToString());
}
}
}
protected void repUsersPath_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
UserInfo user = (UserInfo)e.Item.DataItem;
HyperLink lnkUser = (HyperLink)e.Item.FindControl("lnkUser");
if (lnkUser != null)
{
lnkUser.Text = user.Username;
lnkUser.NavigateUrl = PortalUtils.GetUserHomePageUrl(user.UserId);
}
}
protected void cmdChangeName_Click(object sender, EventArgs e)
{
pnlEditSpace.Visible = true;
pnlViewSpace.Visible = false;
txtName.Text = Server.HtmlDecode(cmdSpaceName.Text);
}
protected void cmdCancel_Click(object sender, EventArgs e)
{
pnlEditSpace.Visible = false;
pnlViewSpace.Visible = true;
}
protected void cmdSave_Click(object sender, EventArgs e)
{
// update space
int result = ES.Services.Packages.UpdatePackageName(PanelSecurity.PackageId,
Server.HtmlEncode(txtName.Text), lblSpaceDescription.Text);
if (result < 0)
{
return;
}
// refresh page
Response.Redirect(Request.Url.ToString());
}
}
}

View file

@ -0,0 +1,187 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3074
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.SkinControls {
public partial class UserSpaceBreadcrumb {
/// <summary>
/// repUsersPath control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater repUsersPath;
/// <summary>
/// spanSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanSpace;
/// <summary>
/// imgSep control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgSep;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// lnkSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkSpace;
/// <summary>
/// imgSep2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgSep2;
/// <summary>
/// lnkCurrentPage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkCurrentPage;
/// <summary>
/// CurrentNode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl CurrentNode;
/// <summary>
/// pnlViewUser control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlViewUser;
/// <summary>
/// lblUsername control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblUsername;
/// <summary>
/// updatePanelUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel updatePanelUsers;
/// <summary>
/// pnlViewSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlViewSpace;
/// <summary>
/// cmdSpaceName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton cmdSpaceName;
/// <summary>
/// lblSpaceDescription control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSpaceDescription;
/// <summary>
/// pnlEditSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlEditSpace;
/// <summary>
/// txtName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtName;
/// <summary>
/// cmdSave control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton cmdSave;
/// <summary>
/// cmdCancel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton cmdCancel;
/// <summary>
/// valRequireName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireName;
}
}