Skip to content

Commit 073a46f

Browse files
committed
Initial import of WBF from Islington Council. This version still has a few places where it is Islington specific and so is not really ready for a broader release.
0 parents  commit 073a46f

File tree

487 files changed

+63009
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

487 files changed

+63009
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
3+
<PropertyGroup>
4+
<!-- The configuration and platform will be used to determine which
5+
assemblies to include from solution and project documentation
6+
sources -->
7+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9+
<SchemaVersion>2.0</SchemaVersion>
10+
<ProjectGuid>{a646268e-5ee8-4550-9e1a-86f44dc9b1f3}</ProjectGuid>
11+
<SHFBSchemaVersion>1.9.3.0</SHFBSchemaVersion>
12+
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual
13+
Studio adds them anyway -->
14+
<AssemblyName>WBF_Documentation</AssemblyName>
15+
<RootNamespace>WBF_Documentation</RootNamespace>
16+
<Name>WBF_Documentation</Name>
17+
<!-- SHFB properties -->
18+
<OutputPath>.\Help\</OutputPath>
19+
<HtmlHelpName>WBF_Documentation</HtmlHelpName>
20+
<Language>en-US</Language>
21+
<DocumentationSources>
22+
<DocumentationSource sourceFile="..\WorkBoxFramework\bin\Release\WorkBoxFramework.xml" xmlns="" />
23+
<DocumentationSource sourceFile="..\WorkBoxFramework\bin\Release\WorkBoxFramework.dll" xmlns="" />
24+
</DocumentationSources>
25+
<HelpFileFormat>Website</HelpFileFormat>
26+
<IndentHtml>False</IndentHtml>
27+
<FrameworkVersion>.NET 3.5</FrameworkVersion>
28+
<KeepLogFile>True</KeepLogFile>
29+
<DisableCodeBlockComponent>False</DisableCodeBlockComponent>
30+
<CppCommentsFixup>False</CppCommentsFixup>
31+
<CleanIntermediates>True</CleanIntermediates>
32+
<SccProjectName>SAK</SccProjectName>
33+
<SccProvider>SAK</SccProvider>
34+
<SccAuxPath>SAK</SccAuxPath>
35+
<SccLocalPath>SAK</SccLocalPath>
36+
</PropertyGroup>
37+
<!-- There are no properties for these groups. AnyCPU needs to appear in
38+
order for Visual Studio to perform the build. The others are optional
39+
common platform types that may appear. -->
40+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
41+
</PropertyGroup>
42+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43+
</PropertyGroup>
44+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
45+
</PropertyGroup>
46+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
47+
</PropertyGroup>
48+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
49+
</PropertyGroup>
50+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
51+
</PropertyGroup>
52+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Win32' ">
53+
</PropertyGroup>
54+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
55+
</PropertyGroup>
56+
<PropertyGroup Condition=" '$(Configuration)' == 'Documentation' ">
57+
<OutputPath>bin\Documentation\</OutputPath>
58+
</PropertyGroup>
59+
<!-- Import the SHFB build targets -->
60+
<Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" />
61+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
""
2+
{
3+
"FILE_VERSION" = "9237"
4+
"ENLISTMENT_CHOICE" = "NEVER"
5+
"PROJECT_FILE_RELATIVE_PATH" = ""
6+
"NUMBER_OF_EXCLUDED_FILES" = "0"
7+
"ORIGINAL_PROJECT_FILE_PATH" = ""
8+
"NUMBER_OF_NESTED_PROJECTS" = "0"
9+
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10+
}
+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
#region Copyright and License
2+
3+
// Copyright (c) Islington Council 2010-2013
4+
// Author: Oli Sharpe (oli@gometa.co.uk)
5+
//
6+
// This file is part of the Work Box Framework.
7+
//
8+
// The Work Box Framework is free software: you can redistribute it and/or
9+
// modify it under the terms of the GNU Lesser General Public License as
10+
// published by the Free Software Foundation, either version 2.1 of the
11+
// License, or (at your option) any later version.
12+
//
13+
// The Work Box Framework is distributed in the hope that it will be
14+
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
// GNU Lesser General Public License for more details.
17+
//
18+
// You should have received a copy of the GNU Lesser General Public License
19+
// along with Foobar. If not, see <http://www.gnu.org/licenses/>.
20+
21+
#endregion
22+
23+
using System;
24+
using System.Collections.Generic;
25+
using System.Linq;
26+
using System.Text;
27+
using Microsoft.SharePoint;
28+
using WorkBoxFramework;
29+
30+
namespace WBFWebParts
31+
{
32+
internal class WBFWebPartsUtils
33+
{
34+
35+
internal static bool InDMZ(SPContext context)
36+
{
37+
return false;
38+
}
39+
40+
41+
internal static bool OnIzziOrPublicWeb(SPContext context)
42+
{
43+
string[] izziOrPublicWeb = { "sp.izzi", "collection.izzi", "izzi", "collection", "teststagingweb", "stagingweb", "liveweb", "www.islington.gov.uk" };
44+
45+
if (izziOrPublicWeb.Contains(context.Site.HostName))
46+
{
47+
return true;
48+
}
49+
else
50+
{
51+
return false;
52+
}
53+
54+
}
55+
56+
internal static String GetPublicLibraryURL(SPContext context)
57+
{
58+
WBFarm farm = WBFarm.Local;
59+
60+
string[] internalSites = { "sp.izzi", "collection.izzi", "izzi", "collection" };
61+
string[] publicSites = { "teststagingweb", "stagingweb", "liveweb", "www.islington.gov.uk" };
62+
63+
if (OnPublicSite(context))
64+
{
65+
WBLogging.Debug("On a public site");
66+
67+
if (publicSites.Contains(context.Site.HostName))
68+
{
69+
return "http://" + context.Site.HostName + "/publicrecords/library/";
70+
}
71+
else
72+
{
73+
if (InDMZ(context))
74+
{
75+
return "http://www.islington.gov.uk/publicrecords/library/";
76+
}
77+
else
78+
{
79+
return farm.PublicRecordsLibraryUrl;
80+
}
81+
}
82+
}
83+
else
84+
{
85+
WBLogging.Debug("Not on a public site");
86+
return farm.ProtectedRecordsLibraryUrl;
87+
}
88+
}
89+
90+
91+
internal static String GetExtranetLibraryURL(SPContext context)
92+
{
93+
WBFarm farm = WBFarm.Local;
94+
95+
if (InDMZ(context))
96+
{
97+
WBLogging.Debug("In DMZ");
98+
99+
return "http://extranets.islington.gov.uk/records/library";
100+
}
101+
else
102+
{
103+
return "http://stagingextranets/records/library";
104+
}
105+
}
106+
107+
108+
internal static bool OnPublicSite(SPContext context)
109+
{
110+
// string [] publicSites = { "teststagingweb", "stagingweb", "liveweb", "www.islington.gov.uk" };
111+
112+
string[] internalSites = { "sp.izzi", "collection.izzi" , "izzi", "collection" };
113+
114+
return (!internalSites.Contains(context.Site.HostName));
115+
}
116+
117+
118+
119+
internal static SPListItem GetRecord(SPSite site, SPWeb web, SPList library, String zone, String recordID)
120+
{
121+
WBQuery query = new WBQuery();
122+
123+
WBQueryClause recordIDClause = new WBQueryClause(WBColumn.RecordID, WBQueryClause.Comparators.Equals, recordID);
124+
query.AddClause(recordIDClause);
125+
126+
WBQueryClause isLiveClause = new WBQueryClause(WBColumn.LiveOrArchived, WBQueryClause.Comparators.Equals, WBColumn.LIVE_OR_ARCHIVED__LIVE);
127+
query.AddClause(isLiveClause);
128+
129+
query.AddViewColumn(WBColumn.Name);
130+
query.AddViewColumn(WBColumn.Title);
131+
query.AddViewColumn(WBColumn.FileSize);
132+
query.AddViewColumn(WBColumn.FileTypeIcon);
133+
query.AddViewColumn(WBColumn.FileType);
134+
query.AddViewColumn(WBColumn.TitleOrName);
135+
query.AddViewColumn(WBColumn.DisplayFileSize);
136+
query.AddViewColumn(WBColumn.EncodedAbsoluteURL);
137+
//query.AddViewColumn(WBColumn.FunctionalArea);
138+
//query.AddViewColumn(WBColumn.OwningTeam);
139+
query.AddViewColumn(WBColumn.ReferenceDate);
140+
query.AddViewColumn(WBColumn.SourceID);
141+
142+
SPListItemCollection items = library.WBxGetItems(site, query);
143+
144+
if (items.Count < 1)
145+
{
146+
WBLogging.Debug("Couldn't find the document with Record ID = " + recordID);
147+
return null;
148+
}
149+
else
150+
{
151+
152+
if (items.Count > 1) WBUtils.shouldThrowError("Found " + items.Count + " items that matched the query for Record ID: " + recordID);
153+
154+
return items[0];
155+
}
156+
}
157+
158+
159+
}
160+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
3+
</Feature>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<feature xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" dslVersion="1.0.0.0" Id="061c5b12-6d9e-4873-b139-16a15d20b184" featureId="061c5b12-6d9e-4873-b139-16a15d20b184" imageUrl="" scope="Site" solutionId="00000000-0000-0000-0000-000000000000" title="WBFWebParts - Extranet Web Parts" version="" deploymentPath="$SharePoint.Project.FileNameWithoutExtension$_$SharePoint.Feature.FileNameWithoutExtension$" xmlns="http://schemas.microsoft.com/VisualStudio/2008/SharePointTools/FeatureModel">
3+
<projectItems>
4+
<projectItemReference itemId="2da6489a-5a87-421d-84a3-60cba87a5620" />
5+
</projectItems>
6+
</feature>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
3+
</Feature>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<feature xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" dslVersion="1.0.0.0" Id="b6949ff3-a914-4d85-829d-ac5334ca4809" featureId="b6949ff3-a914-4d85-829d-ac5334ca4809" imageUrl="" scope="Site" solutionId="00000000-0000-0000-0000-000000000000" title="WBF Web Parts" version="" deploymentPath="$SharePoint.Project.FileNameWithoutExtension$_$SharePoint.Feature.FileNameWithoutExtension$" xmlns="http://schemas.microsoft.com/VisualStudio/2008/SharePointTools/FeatureModel">
3+
<projectItems>
4+
<projectItemReference itemId="56b9592e-971f-4ee4-a5dd-4c4525330ecd" />
5+
<projectItemReference itemId="556f6416-be78-4b59-8a4e-3f74fed21252" />
6+
<projectItemReference itemId="9f40976c-f218-45c0-9a9e-51527a65eaa5" />
7+
</projectItems>
8+
</feature>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ProjectItem Type="Microsoft.VisualStudio.SharePoint.MappedFolder" SupportedTrustLevels="FullTrust" SupportedDeploymentScopes="Package" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel">
3+
<ProjectItemFolder Target="Layouts" Type="TemplateFile" />
4+
</ProjectItem>

0 commit comments

Comments
 (0)