Skip to content

Commit

Permalink
Server UI tweaks. Relates to Baud-UCS#29.
Browse files Browse the repository at this point in the history
  • Loading branch information
Berzeger committed Jul 16, 2015
1 parent e1ed747 commit 3ac5c16
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<data name="EditParameters" xml:space="preserve">
<value>Upravit parametry</value>
</data>
<data name="EditParametersFor" xml:space="preserve">
<value>Upravit parametry pro</value>
</data>
<data name="Enable" xml:space="preserve">
<value>Nastavit jako aktivní</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions src/Server/DeploymentFramework/Resources/StringResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<data name="EditParameters" xml:space="preserve">
<value>Edit parameters</value>
</data>
<data name="EditParametersFor" xml:space="preserve">
<value>Edit parameters for</value>
</data>
<data name="Enable" xml:space="preserve">
<value>Enable</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ServersController(Func<IDeploymentUow> deploymentUow)
// GET: Deployment/Servers
public virtual ActionResult Index(IndexFilter filter, PagingData paging)
{
paging.PageSize = 2; // only for testing
paging.PageSize = 10; // only for testing

ViewBag.Filter = filter;

Expand Down Expand Up @@ -127,8 +127,8 @@ public virtual ActionResult EditParameters(int serverID, FormCollection form)
{
using (var uow = _deploymentUow())
{
// Two items (ID, Value) for each Parameter passed, hence / 2.
for (int i = 0; i < form.Count / 2; i++)
// Three items (ID, Name, Value) for each Parameter passed, hence / 3.
for (int i = 0; i < form.Count / 3; i++)
{
var id = Int32.Parse(form.Get("Parameters[" + i + "].ID"));
var value = form.Get("Parameters[" + i + "].Value");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@
ViewBag.Title = StringResources.EditParameters;
}

<h2>@ViewBag.Title</h2>
<h2>@StringResources.EditParametersFor @Model.Name</h2>
@using (var f = Html.BeginCustomForm())
{
using (var s = f.BeginSection())
{
for (int i = 0; i < Model.Parameters.Count(); i++)
{
@Html.HiddenFor(m => Model.Parameters[i].ID)
@s.FieldFor(m => Model.Parameters[i].Value).DisplayAsInputGroup().Prepend(Model.Parameters[i].Name).Label("")
<div class="row">
<div class="col-md-6">
@s.FieldFor(m => Model.Parameters[i].Name).Readonly().HideRequiredHint()
</div>
<div class="col-md-6">
@s.FieldFor(m => Model.Parameters[i].Value)
</div>
</div>
}

using (var n = f.BeginNavigation())
Expand Down

0 comments on commit 3ac5c16

Please sign in to comment.