From 7ec7c0a2bc14468ee527865c97e9b149f9b963e6 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 27 Sep 2014 22:40:45 +0200 Subject: [PATCH] Started work on Create Org - checkpoint commit --- Site5/App_Code/ControlV5Base.cs | 5 + Site5/App_GlobalResources/Global.resx | 60 +++++++ Site5/App_GlobalResources/Menu5.resx | 7 +- Site5/App_GlobalResources/Pages.Ledgers.resx | 6 - .../PageIcons/swarmops-builder-40px.png | Bin 0 -> 2749 bytes Site5/MainMenu-v5.xml | 22 ++- Site5/Pages/v5/Admin/CreateOrganization.aspx | 151 ++++++++++++++++++ .../Pages/v5/Admin/CreateOrganization.aspx.cs | 46 ++++++ Site5/Pages/v5/Init/Default.aspx.cs | 5 + Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs | 4 +- Site5/SprintName.txt | 1 + 11 files changed, 294 insertions(+), 13 deletions(-) create mode 100644 Site5/Images/PageIcons/swarmops-builder-40px.png create mode 100644 Site5/Pages/v5/Admin/CreateOrganization.aspx create mode 100644 Site5/Pages/v5/Admin/CreateOrganization.aspx.cs create mode 100644 Site5/SprintName.txt diff --git a/Site5/App_Code/ControlV5Base.cs b/Site5/App_Code/ControlV5Base.cs index 0d2b707e..f1bd81bd 100644 --- a/Site5/App_Code/ControlV5Base.cs +++ b/Site5/App_Code/ControlV5Base.cs @@ -53,6 +53,11 @@ public class ControlV5Base : System.Web.UI.UserControl { buildIdentity = "Build " + reader.ReadLine(); } + + using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/SprintName.txt"))) + { + buildIdentity += " (" + reader.ReadLine() + ")"; + } } catch (Exception) { diff --git a/Site5/App_GlobalResources/Global.resx b/Site5/App_GlobalResources/Global.resx index 17cbc172..522c85eb 100644 --- a/Site5/App_GlobalResources/Global.resx +++ b/Site5/App_GlobalResources/Global.resx @@ -411,4 +411,64 @@ On On (as opposed to Off) + + Customers + Gender neutral plural + + + Citizens + Gender neutral plural + + + Activists + Gender neutral plural + + + Customer + Female singular + + + Citizen + Female singular + + + Activist + Female singular + + + Customer + Gender neutral + + + Citizen + Gender neutral + + + Activist + Gender neutral + + + Customer + Male singular + + + Citizen + Male singular + + + Activist + Male singular + + + Commercial + A commercial organization (for-profit enterprise) + + + Governmental + Organization that's part of government somehow + + + Non-profit + Non-profit (activist, political parties) + \ No newline at end of file diff --git a/Site5/App_GlobalResources/Menu5.resx b/Site5/App_GlobalResources/Menu5.resx index 960bd9d4..352e4d25 100644 --- a/Site5/App_GlobalResources/Menu5.resx +++ b/Site5/App_GlobalResources/Menu5.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Admin @@ -123,6 +123,9 @@ Access Control Lists + + Create Organization + Geography Tree diff --git a/Site5/App_GlobalResources/Pages.Ledgers.resx b/Site5/App_GlobalResources/Pages.Ledgers.resx index 24341948..7845284d 100644 --- a/Site5/App_GlobalResources/Pages.Ledgers.resx +++ b/Site5/App_GlobalResources/Pages.Ledgers.resx @@ -473,9 +473,6 @@ Initial Value For asset and liability accounts - the value going into Swarmops first ledger year - - Owner - Parent account or group @@ -498,7 +495,4 @@ Flags - - Owner - \ No newline at end of file diff --git a/Site5/Images/PageIcons/swarmops-builder-40px.png b/Site5/Images/PageIcons/swarmops-builder-40px.png new file mode 100644 index 0000000000000000000000000000000000000000..41baf268d147cc7350822bc2b64ad44b90c88b06 GIT binary patch literal 2749 zcmV;u3PSaXP)t zK~z}7?U;LvUB!98f8WfU$9?SHUB92PlhVq?Y28*N;6$xzDTx9iX=O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JD101@r)X4!NNOCq*qcQNJ`m!(jVYucsaa5`EESuaO>SI$ zuRC3OmZgqSH-xI9KtM6ZV2l|!=_2oqkyw_9H5f5;%aZBo8Hz@o;h`qR2q6r>ih{&h zL=z%FYLUzi;Fjd{3&5s_v9F3G-;1F$<$|i7E`ziZhlrpGW$A%Po~2d9npdVmuiHaI zAgSdTfkxu!r71J*4rN*5+`J@}R+3`A2VGE7wf^M_KgrYY)Hz8|MgBcV#I`Z0os zrnA^ICB#TUl^(_z2OqD1l*J%&mJ=?1GGZdm?H{`7FJ~@v(`5YE*o>svm*yj?3?w=2 zJ+nU04v}t%%*8+v6|YLrv$13e+&MC^4oUhXK=;;LE(|c=vL%qFw~}Q~4EUY+F$!cott}rvizy}9{Vm+Np)GbB^Pip9FP@e1l1n#{hKVkkQFQ6`r*-uKlm7{zI-pLD&tpQ{Bmn!m)k@l|`ieZ|{y{C50zuVwY$-N(sYH?;iz7w)4ht}w{? zt6#9w^otmnso-m^dWALsaYP2=cV>n5(I00000NkvXXu0mjf DoJv_Z literal 0 HcmV?d00001 diff --git a/Site5/MainMenu-v5.xml b/Site5/MainMenu-v5.xml index 423007e2..8b323cd4 100644 --- a/Site5/MainMenu-v5.xml +++ b/Site5/MainMenu-v5.xml @@ -225,7 +225,7 @@ - + Administration @@ -235,11 +235,27 @@ Submenu - + + Administration_CreateOrganization + 4 + + iconshock-cabinet + /Pages/v5/Admin/CreateOrganization.aspx + Link + + + + + 1 + Separator + + + + 4 - + swarmops-builder BuildNumber diff --git a/Site5/Pages/v5/Admin/CreateOrganization.aspx b/Site5/Pages/v5/Admin/CreateOrganization.aspx new file mode 100644 index 00000000..1dc9ed71 --- /dev/null +++ b/Site5/Pages/v5/Admin/CreateOrganization.aspx @@ -0,0 +1,151 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeFile="CreateOrganization.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Admin.CreateOrganization" %> +<%@ Register src="~/Controls/v5/Base/FileUpload.ascx" tagname="FileUpload" tagprefix="Swarmops5" %> +<%@ Register TagPrefix="Swarmops5" TagName="ExternalScripts" Src="~/Controls/v5/UI/ExternalScripts.ascx" %> +<%@ Register TagPrefix="Swarmops5" TagName="ComboBudgets" Src="~/Controls/v5/Financial/ComboBudgets.ascx" %> + + + + + + + + + + + + + + + +
+ ​
+ ​
+  
+ "> 
+ +  
+ + + + + + + +  
+ ​
+ ​
+  
+ +
+ +
+
+ + + + + + diff --git a/Site5/Pages/v5/Admin/CreateOrganization.aspx.cs b/Site5/Pages/v5/Admin/CreateOrganization.aspx.cs new file mode 100644 index 00000000..3611d4e4 --- /dev/null +++ b/Site5/Pages/v5/Admin/CreateOrganization.aspx.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Swarmops.Logic.Financial; +using Swarmops.Logic.Support; + +namespace Swarmops.Frontend.Pages.v5.Admin +{ + public partial class CreateOrganization : PageV5Base + { + protected void Page_Load(object sender, EventArgs e) + { + this.PageTitle = Resources.Pages.Financial.FileExpenseClaim_PageTitle; + this.PageIcon = "iconshock-moneyback"; + this.InfoBoxLiteral = Resources.Pages.Financial.FileExpenseClaim_Info; + + if (!Page.IsPostBack) + { + Localize(); + } + } + + + private void Localize() + { + + } + + + protected void ButtonRequest_Click(object sender, EventArgs e) + { + // Create org here + + Response.AppendCookie(new HttpCookie("DashboardMessage", HttpUtility.UrlEncode(successMessage))); + + // Redirect to dashboard + + Response.Redirect("/", true); + } + + } +} \ No newline at end of file diff --git a/Site5/Pages/v5/Init/Default.aspx.cs b/Site5/Pages/v5/Init/Default.aspx.cs index 72531d44..aff4263f 100644 --- a/Site5/Pages/v5/Init/Default.aspx.cs +++ b/Site5/Pages/v5/Init/Default.aspx.cs @@ -377,6 +377,11 @@ public partial class Pages_v5_Init_Default : System.Web.UI.Page Swarmops.Logic.Support.DatabaseMaintenance.FirstInitialization(); + _initProgress = 6; + _initMessage = "Applying all post-baseline database schema upgrades..."; + Swarmops.Logic.Support.DatabaseMaintenance.UpgradeSchemata(); + Thread.Sleep(100); + _initProgress = 5; _initMessage = "Getting list of countries from Swarmops servers..."; Thread.Sleep(100); diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs index 3957df0c..327c2180 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs @@ -38,7 +38,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers this.LiteralHeaderEdit.Text = Resources.Pages.Ledgers.AccountPlan_Header_Edit; this.LiteralHeaderEditingAccount.Text = Resources.Pages.Ledgers.AccountPlan_Edit_Header; this.LiteralHeaderFlags.Text = Resources.Pages.Ledgers.AccountPlan_Header_Flags; - this.LiteralHeaderOwner.Text = Resources.Pages.Ledgers.AccountPlan_Header_Owner; + this.LiteralHeaderOwner.Text = Resources.Global.Global_Owner; this.LiteralLabelAccountName.Text = Resources.Pages.Ledgers.AccountPlan_Edit_AccountName; this.LiteralLabelActiveLong.Text = Resources.Pages.Ledgers.AccountPlan_Edit_ActiveLong; this.LiteralLabelActiveShort.Text = Resources.Pages.Ledgers.AccountPlan_Edit_ActiveShort; @@ -52,7 +52,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers this.LiteralLabelHeaderConfiguration.Text = Resources.Pages.Ledgers.AccountPlan_Edit_HeaderConfiguration; this.LiteralLabelHeaderDailyOperations.Text = Resources.Pages.Ledgers.AccountPlan_Edit_HeaderDailyOperations; - this.LiteralLabelOwner.Text = Resources.Pages.Ledgers.AccountPlan_Edit_Owner; + this.LiteralLabelOwner.Text = Resources.Global.Global_Owner; this.LiteralLabelParent.Text = Resources.Pages.Ledgers.AccountPlan_Edit_Parent; diff --git a/Site5/SprintName.txt b/Site5/SprintName.txt new file mode 100644 index 00000000..b71ef704 --- /dev/null +++ b/Site5/SprintName.txt @@ -0,0 +1 @@ +Black 2 \ No newline at end of file