[9395] | 1 | @model IEnumerable<HeuristicLab.Services.Optimization.Web.Models.ScenarioModel>
|
---|
[8958] | 2 |
|
---|
| 3 | @{
|
---|
| 4 | ViewBag.Title = "Index.cshtml";
|
---|
| 5 | }
|
---|
| 6 |
|
---|
| 7 | <h2>Add scenarios</h2>
|
---|
| 8 |
|
---|
| 9 | @using (Html.BeginForm("AddScenario", "Admin", FormMethod.Post, new {enctype = "multipart/form-data"})) {
|
---|
| 10 | <fieldset>
|
---|
| 11 | <label for="scenarioMapper">Scenario Mapper</label>
|
---|
| 12 | <input type="file" name="scenarioMapper" id="scenarioMapper" />
|
---|
[9395] | 13 | <label for="scenarioXml">Scenario XML</label>
|
---|
[8958] | 14 | <input type="file" name="scenarioXml" id="scenarioXml" />
|
---|
[9362] | 15 | <input type="submit" value="Upload scenario" />
|
---|
[8958] | 16 | </fieldset>
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | <h2>Manage scenarios:</h2>
|
---|
| 20 | @using (Html.BeginForm("DeleteScenario", "Admin", FormMethod.Post)) {
|
---|
| 21 | <table>
|
---|
| 22 | <thead>
|
---|
| 23 | <tr>
|
---|
| 24 | <td>Name</td>
|
---|
| 25 | <td>Delete</td>
|
---|
| 26 | </tr>
|
---|
| 27 | </thead>
|
---|
| 28 | <tbody>
|
---|
| 29 | @foreach (var scen in Model) {
|
---|
| 30 | <tr>
|
---|
[9395] | 31 | <td>@scen.Scenario</td>
|
---|
[8958] | 32 | <td>
|
---|
[9395] | 33 | <input type="hidden" value="@scen.Scenario" name="id" />
|
---|
[8958] | 34 | <input type="submit" value="Delete" />
|
---|
[9395] | 35 | </td>
|
---|
[8958] | 36 | </tr>
|
---|
| 37 | }
|
---|
| 38 | </tbody>
|
---|
| 39 | </table>
|
---|
| 40 | }
|
---|
| 41 |
|
---|
[9395] | 42 | <h2>Visual extensions:</h2>
|
---|
| 43 | @using (Html.BeginForm("DeleteVisualExtension", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
---|
| 44 | <fieldset>
|
---|
| 45 | <label for="scenarioId">Scenario</label>
|
---|
| 46 | <select name="scenarioId">
|
---|
| 47 | @foreach (var scen in Model) {
|
---|
| 48 | if (scen.Exists) {
|
---|
| 49 | <option>@scen.Scenario</option>
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
| 52 | </select>
|
---|
| 53 | <input type="submit" value="Delete visual extension" />
|
---|
| 54 | </fieldset>
|
---|
| 55 | }
|
---|
[8958] | 56 |
|
---|
[9395] | 57 | @using (Html.BeginForm("AddVisualExtension", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
---|
| 58 | <fieldset>
|
---|
| 59 | <label for="scenarioId">Scenario</label>
|
---|
| 60 | <select name="scenarioId">
|
---|
| 61 | @foreach (var scen in Model) {
|
---|
| 62 | <option>@scen.Scenario</option>
|
---|
| 63 | }
|
---|
| 64 | </select>
|
---|
| 65 | <label for="scenarioJs">Visual extension (JavaScript) for Scenario</label>
|
---|
| 66 | <input type="file" name="scenarioJs" id="scenarioJs" />
|
---|
| 67 | <input type="submit" value="Upload visual extension" />
|
---|
| 68 | </fieldset>
|
---|
| 69 | } |
---|