This commit is contained in:
Rick Falkvinge
2015-04-10 01:24:31 +02:00
parent b2187dc93b
commit 4b976be456
4 changed files with 39 additions and 10 deletions
+21
View File
@@ -674,4 +674,25 @@
<data name="Global_NoActionItems" xml:space="preserve">
<value>No urgent action items. Yay!</value>
</data>
<data name="Global_MinMax" xml:space="preserve">
<value>Min / Max</value>
<comment>note the spaces</comment>
</data>
<data name="Swarm_AssignedPerson" xml:space="preserve">
<value>Assigned Person</value>
</data>
<data name="Swarm_AssignmentExpires" xml:space="preserve">
<value>Expires</value>
<comment>The date a position assignment autoterminates</comment>
</data>
<data name="Swarm_AssignMorePerson" xml:space="preserve">
<value>Assign one more person...</value>
<comment>To an existing position that accepts multiple people (like "assistants")</comment>
</data>
<data name="Swarm_AssignPerson" xml:space="preserve">
<value>Assign person...</value>
</data>
<data name="Swarm_Position" xml:space="preserve">
<value>Position</value>
</data>
</root>
+3 -3
View File
@@ -43,14 +43,14 @@ namespace Swarmops.Frontend.Automation
string expires = string.Empty;
string assignedName = Resources.Global.Swarm_Vacant + "<br/>Testing line 2<br/>Testing line 3";
string assignedName = Resources.Global.Swarm_Vacant + " <a href='#' class='LocalAssignPerson'>" + Resources.Global.Swarm_AssignPerson + "</a>" ;
if (assignments.Count > 0)
{
assignedName = assignments[0].Person.Canonical;
}
string element = string.Format("\"id\":\"{0}\",\"positionTitle\":\"{1}\",\"assignedName\":\"{2}\",\"expires\":\"{3}\"",
position.Identity, JsonSanitize (localizedPositionName), JsonSanitize (assignedName), JsonSanitize (expires));
string element = string.Format("\"id\":\"{0}\",\"positionTitle\":\"{1}\",\"assignedName\":\"{2}\",\"expires\":\"{3}\",\"minMax\":\"{4} / {5}\"",
position.Identity, JsonSanitize (localizedPositionName), JsonSanitize (assignedName), JsonSanitize (expires), position.MinCount, position.MaxCount == 0? @"&infin;" : position.MaxCount.ToString());
// TODO: Add all assignments after the first one right here
+5 -7
View File
@@ -26,13 +26,11 @@
idField="id" treeField="positionTitle">
<thead>
<tr>
<th field="positionTitle" width="160"><asp:Literal ID="LiteralHeaderPosition" Text="Position XYZ" runat="server"/></th>
<th field="assignedName" width="160"><asp:Literal ID="LiteralHeaderQ1" Text="AssignedName XYZ" runat="server" /></th>
<th field="dateExpires" width="80"><asp:Literal ID="LiteralHeaderExpires" Text="ExpiresDate XYZ" runat="server" /></th>
<th field="reportsTo" width="120"><asp:Literal ID="LiteralHeaderReportsTo" Text="ReportsTo XYZ" runat="server" /></th>
<th field="flags" width="50" align="center"><asp:Literal ID="Literal2" Text="FLAGS" runat="server" /></th>
<th field="vol" width="30" align="center"><asp:Literal ID="Literal3" Text="VOL" runat="server" /></th>
<th field="editIcon" width="30" align="center"><asp:Literal ID="Literal1" Text="EDIT" runat="server" /></th>
<th field="positionTitle" width="200"><asp:Literal ID="LiteralHeaderPosition" Text="Position XYZ" runat="server"/></th>
<th field="assignedName" width="200"><asp:Literal ID="LiteralHeaderName" Text="AssignedName XYZ" runat="server" /></th>
<th field="dateExpires" width="120"><asp:Literal ID="LiteralHeaderExpires" Text="ExpiresDate XYZ" runat="server" /></th>
<th field="minMax" width="80" align="center"><asp:Literal ID="LiteralHeaderMinMax" Text="Min/Max" runat="server" /></th>
<th field="actionIcon" width="50" align="center"><asp:Literal ID="LiteralHeaderAction" Text="XYZ" runat="server" /></th>
</tr>
</thead>
</table>
@@ -18,6 +18,16 @@ namespace Swarmops.Frontend.Controls.v5.Swarm
protected void Page_Load (object sender, EventArgs e)
{
Localize();
}
private void Localize()
{
this.LiteralHeaderAction.Text = Resources.Global.Global_Action;
this.LiteralHeaderName.Text = Resources.Global.Swarm_AssignedPerson;
this.LiteralHeaderPosition.Text = Resources.Global.Swarm_Position;
this.LiteralHeaderExpires.Text = Resources.Global.Swarm_AssignmentExpires;
this.LiteralHeaderMinMax.Text = Resources.Global.Global_MinMax;
}
public RoleLevel Level { get; set; }