_ToolMenu.cshtml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @using WePlatform.Views.Shared.SearchForm
  2. @model List<WePlatform.Models.Layout.ToolMenuViewModel>
  3. <!-- TOOL-MENU START-->
  4. <div class="btn-toolbar row tableTool" role="toolbar" aria-label="Toolbar with button groups">
  5. @{
  6. SearchFormViewModel searchFrom = ViewBag.SearchFrom;
  7. var toolWidth1 = 8;
  8. var toolWidth2 = 9;
  9. if (searchFrom == null)
  10. {
  11. toolWidth1 = 12;
  12. toolWidth2 = 12;
  13. }
  14. }
  15. <div class="col-sm-@toolWidth1 col-lg-@toolWidth2 pull-left" style="padding: 0">
  16. <div class="btn-group btn-group-sm" id="Tool1" role="group" aria-label="First group">
  17. @{
  18. if (Model != null)
  19. {
  20. foreach (var perm in Model)
  21. {
  22. string btnClass = perm.Class, btnType = perm.Script, url = perm.Url;
  23. if (string.IsNullOrEmpty(btnClass))
  24. {
  25. btnClass = "btn btn-default";
  26. }
  27. btnClass += " menu-btn ";
  28. if (string.IsNullOrEmpty(btnType))
  29. {
  30. btnType = "btn" + perm.FunctionNo;
  31. }
  32. if (string.IsNullOrEmpty(url))
  33. {
  34. url = "";
  35. }
  36. <button type="button" class="@btnClass" data-type="@btnType" data-url="@url">
  37. <i class=" @perm.Icon"></i>
  38. @perm.DisplayName
  39. </button>
  40. }
  41. }
  42. }
  43. </div>
  44. <div class="row" id="tableToolExt">
  45. </div>
  46. </div>
  47. @{
  48. if (searchFrom != null)
  49. {
  50. <div class="col-sm-4 col-lg-3 pull-right" style="padding: 0">
  51. @*@Html.Action("SearchForm_Sig", "Layout", new { SelectList = selectList })*@
  52. @Html.Partial("SearchForm/_SearchForm", searchFrom)
  53. </div>
  54. }
  55. }
  56. </div>
  57. <!-- TOOL-MENU END-->