2014-10-15 07:10:01 +08:00
@using System.Data
@using Orchard.Utility.Extensions
@model Orchard.DynamicForms.ViewModels.SubmissionsIndexViewModel
@{
Script.Require("ShapesBase");
Layout.Title = T("Submissions for {0}", Model.FormName);
}
@{
var dataColumns = new List<DataColumn>();
var dataColumnCount = Model.Submissions.Columns.Count > 11 ? 11 : Model.Submissions.Columns.Count;
for (var i = 0; i < dataColumnCount; i++) {
dataColumns.Add(Model.Submissions.Columns[i]);
}
}
2024-04-16 22:59:14 +08:00
<div class="manage">
@Html.ActionLink(T("Export").Text, "Export", "SubmissionAdmin", new { id = Model.FormName, area = "Orchard.DynamicForms" }, new { @class = "button primaryAction" })
</div>
2014-10-15 07:10:01 +08:00
@using (Html.BeginFormAntiForgeryPost()) {
<fieldset class="bulk-actions">
<label for="publishActions">@T("Actions:")</label>
<select id="publishActions" name="Options.BulkAction">
@Html.SelectOption("", false, T("Choose action...").ToString())
@Html.SelectOption("Delete", false, T("Delete").ToString())
</select>
<button type="submit" name="submit.BulkEdit" value="yes">@T("Apply")</button>
</fieldset>
<table class="items dynamic-forms-submissions">
<thead>
<tr>
<th><input type="checkbox" class="check-all" /></th>
@foreach (var dataColumn in dataColumns) {
<th>@dataColumn.ToString().CamelFriendly()</th>
}
<th></th>
</tr>
</thead>
<tbody class="submissions">
@foreach (DataRow dataRow in Model.Submissions.Rows) {
var id = dataRow["Id"];
<tr>
<td><input type="checkbox" value="@id" name="submissionIds" /></td>
@foreach (var dataColumn in dataColumns) {
<td>@dataRow[dataColumn]</td>
}
<td>
2017-03-04 15:35:55 +08:00
<ul class="action-links">
<li class="action-link">
@Html.ActionLink(T("Details").Text, "Details", "SubmissionAdmin", new { id = id, area = "Orchard.DynamicForms" }, null)
</li>
<li class="action-link">
2017-03-04 15:41:54 +08:00
@Html.ActionLink(T("Delete").Text, "Delete", "SubmissionAdmin", new { id = id, area = "Orchard.DynamicForms" }, new { itemprop = "RemoveUrl UnsafeUrl" })
2017-03-04 15:35:55 +08:00
</li>
</ul>
2014-10-15 07:10:01 +08:00
</td>
</tr>
}
</tbody>
</table>
@Display(Model.Pager)
}