| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- @using ShwasherSys.Models.Layout
- @using ShwasherSys.Views.Shared.New.SearchForm
- @model List<PermissionButtonViewModel>
- <div class="btn-toolbar row" id="tableTool" role="toolbar" aria-label="Toolbar with button groups" style="min-height: 40px;">
- @{
- SearchFormViewModal searchFrom = null;
- SearchFormViewModel searchFrom2 = null;
- try
- {
- searchFrom = ViewBag.SearchFrom;
- }
- catch
- {
- searchFrom2 = ViewBag.SearchFrom;
- }
- var toolWidth1 = 8;
- var toolWidth2 = 9;
- if (searchFrom == null && searchFrom2 == null)
- {
- toolWidth1 = 12;
- toolWidth2 = 12;
- }
- }
- <div class="col-sm-@toolWidth1 col-lg-@toolWidth2 pull-left" style="padding: 0">
- <div class="btn-group btn-group-sm" id="Tool1" role="group" aria-label="First group">
- @{
- if (Model != null)
- {
- foreach (var perm in Model)
- {
- if (perm.MenuType != 3 || (perm.Script != null && perm.Script.StartsWith("N")))
- {
- continue;
- }
- string btnClass = perm.Class, btnType = perm.Script, url = perm.Url;
- if (string.IsNullOrEmpty(btnClass))
- {
- btnClass = "btn btn-default ";
- }
- btnClass += " menu-btn ";
- if (string.IsNullOrEmpty(btnType))
- {
- btnType = "btn" + perm.FunctionNo;
- }
- if (string.IsNullOrEmpty(url))
- {
- url = "";
- }
- <button type="button" class="@btnClass" data-type="@btnType" data-url="@url">
- <i class="iconfont @perm.Icon"></i>
- @perm.DisplayName
- </button>
- }
- }
- }
- </div>
- <div class="row" id="tableToolExt">
- </div>
- </div>
- <div class="col-sm-4 col-lg-3 pull-right" style="padding: 0">
- @if (searchFrom != null)
- {
- @Html.Partial("_SearchForm", searchFrom)
- }
- else if (searchFrom2 != null)
- {
- @Html.Partial("New/SearchForm/_SearchForm", searchFrom2)
- }
- </div>
- </div>
|