grichard

Filtre Magento 2

May 25th, 2016
173
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- Filters -->
  2. <filters name="listing_filters">
  3. <argument name="data" xsi:type="array">
  4. <item name="config" xsi:type="array">
  5. <item name="storageConfig" xsi:type="array">
  6. <item name="provider" xsi:type="string">jobs_job_listing.jobs_job_listing.listing_top.bookmarks</item>
  7. <item name="namespace" xsi:type="string">current.filters</item>
  8. </item>
  9. <item name="childDefaults" xsi:type="array">
  10. <item name="provider" xsi:type="string">jobs_job_listing.jobs_job_listing.listing_top.listing_filters</item>
  11. <item name="imports" xsi:type="array">
  12. <item name="visible" xsi:type="string">jobs_job_listing.jobs_job_listing.listing_top.bookmarks:current.columns.${ $.index }.visible</item>
  13. </item>
  14. </item>
  15. </item>
  16. </argument>
  17. <!-- Job ID Filter -->
  18. <filterRange name="job_id">
  19. <argument name="data" xsi:type="array">
  20. <item name="config" xsi:type="array">
  21. <item name="dataScope" xsi:type="string">entity_id</item> <!-- Column name in DB -->
  22. <item name="label" xsi:type="string" translate="true">ID</item> <!-- Label on grid -->
  23. <item name="childDefaults" xsi:type="array">
  24. <item name="provider" xsi:type="string">jobs_job_listing.jobs_job_listing.listing_top.listing_filters</item>
  25. </item>
  26. </item>
  27. </argument>
  28. <filterInput name="from">
  29. <argument name="data" xsi:type="array">
  30. <item name="config" xsi:type="array">
  31. <item name="dataScope" xsi:type="string">from</item>
  32. <item name="label" xsi:type="string" translate="true">from</item>
  33. <item name="placeholder" xsi:type="string" translate="true">From</item>
  34. </item>
  35. </argument>
  36. </filterInput>
  37. <filterInput name="to">
  38. <argument name="data" xsi:type="array">
  39. <item name="config" xsi:type="array">
  40. <item name="dataScope" xsi:type="string">to</item>
  41. <item name="label" xsi:type="string" translate="true">to</item>
  42. <item name="placeholder" xsi:type="string" translate="true">To</item>
  43. </item>
  44. </argument>
  45. </filterInput>
  46. </filterRange>
  47.  
  48. <!-- Job title Filter -->
  49. <filterInput name="job_title">
  50. <argument name="data" xsi:type="array">
  51. <item name="config" xsi:type="array">
  52. <item name="dataScope" xsi:type="string">title</item> <!-- Column name in DB -->
  53. <item name="label" xsi:type="string" translate="true">Title</item> <!-- Label on grid -->
  54. </item>
  55. </argument>
  56. </filterInput>
  57.  
  58. <!-- Job type Filter -->
  59. <filterInput name="job_type">
  60. <argument name="data" xsi:type="array">
  61. <item name="config" xsi:type="array">
  62. <item name="dataScope" xsi:type="string">type</item> <!-- Column name in DB -->
  63. <item name="label" xsi:type="string" translate="true">Type</item> <!-- Label on grid -->
  64. </item>
  65. </argument>
  66. </filterInput>
  67.  
  68. <!-- Job location Filter -->
  69. <filterInput name="job_location">
  70. <argument name="data" xsi:type="array">
  71. <item name="config" xsi:type="array">
  72. <item name="dataScope" xsi:type="string">location</item> <!-- Column name in DB -->
  73. <item name="label" xsi:type="string" translate="true">Location</item> <!-- Label on grid -->
  74. </item>
  75. </argument>
  76. </filterInput>
  77.  
  78. <!-- Job date Filter / Custom Select-->
  79. <filterRange name="job_date" class="Magento\Ui\Component\Filters\Type\DateRange">
  80. <argument name="data" xsi:type="array">
  81. <item name="config" xsi:type="array">
  82. <item name="dataScope" xsi:type="string">date</item>
  83. <item name="label" xsi:type="string" translate="true">Date</item>
  84. <item name="childDefaults" xsi:type="array">
  85. <item name="provider" xsi:type="string">jobs_job_listing.jobs_job_listing.listing_top.listing_filters</item>
  86. </item>
  87. </item>
  88. </argument>
  89. <filterDate name="from">
  90. <argument name="data" xsi:type="array">
  91. <item name="config" xsi:type="array">
  92. <item name="dataScope" xsi:type="string">from</item>
  93. <item name="label" xsi:type="string" translate="true">from</item>
  94. <item name="placeholder" xsi:type="string" translate="true">From</item>
  95. </item>
  96. </argument>
  97. </filterDate>
  98. <filterDate name="to">
  99. <argument name="data" xsi:type="array">
  100. <item name="config" xsi:type="array">
  101. <item name="dataScope" xsi:type="string">to</item>
  102. <item name="label" xsi:type="string" translate="true">to</item>
  103. <item name="placeholder" xsi:type="string" translate="true">To</item>
  104. </item>
  105. </argument>
  106. </filterDate>
  107. </filterRange>
  108.  
  109. <!-- Job status Filter / Custom Select-->
  110. <filterSelect name="job_status">
  111. <argument name="optionsProvider" xsi:type="configurableObject">
  112. <argument name="class" xsi:type="string">Test\Jobs\Model\Source\Job\Status</argument>
  113. </argument>
  114. <argument name="data" xsi:type="array">
  115. <item name="config" xsi:type="array">
  116. <item name="dataScope" xsi:type="string">status</item>
  117. <item name="label" xsi:type="string" translate="true">Status</item>
  118. <item name="caption" xsi:type="string" translate="true">Select...</item>
  119. </item>
  120. </argument>
  121. </filterSelect>
  122.  
  123. <!-- Job Department Filter / Custom Select on DB -->
  124. <filterSelect name="job_department">
  125. <argument name="optionsProvider" xsi:type="configurableObject">
  126. <argument name="class" xsi:type="string">Test\Jobs\Model\Source\Department</argument>
  127. </argument>
  128. <argument name="data" xsi:type="array">
  129. <item name="config" xsi:type="array">
  130. <item name="dataScope" xsi:type="string">department_id</item>
  131. <item name="label" xsi:type="string" translate="true">Department</item>
  132. <item name="caption" xsi:type="string" translate="true">Select...</item>
  133. </item>
  134. </argument>
  135. </filterSelect>
  136. </filters>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×