app/helpers/dashboard_helper.rb in iqvoc-4.3.3 vs app/helpers/dashboard_helper.rb in iqvoc-4.4.0

- old
+ new

@@ -13,34 +13,32 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module DashboardHelper - def sorting_controls_for(name) - content_tag :div, :class => "sorting-controls" do - link_to(icon("arrow-circle-o-up", "sorting-arrow"), - dashboard_path(:order => "asc", :by => name.to_s)) + - link_to(icon("arrow-circle-o-down", "sorting-arrow"), - dashboard_path(:order => "desc", :by => name.to_s)) + content_tag :div, class: 'sorting-controls' do + link_to(icon('arrow-circle-o-up', 'sorting-arrow'), + dashboard_path(order: 'asc', by: name.to_s)) + + link_to(icon('arrow-circle-o-down', 'sorting-arrow'), + dashboard_path(order: 'desc', by: name.to_s)) end end def consistency_status(item) - css, msg = if item.valid_with_full_validation? - ["valid", "✓"] + css, msg = if item.publishable? + ['valid', '✓'] else - ["invalid", "✗"] + ['invalid', '✗'] end - content_tag :span, raw(msg), :class => css + content_tag :span, raw(msg), class: css end def link_to_dashboard_item(item) if item.is_a?(Label::Base) - item.published? ? label_path(:id => item.origin) : label_path(:published => 0, :id => item.origin) + item.published? ? label_path(id: item.origin) : label_path(published: 0, id: item.origin) else - item.published? ? concept_path(:id => item.origin) : concept_path(:published => 0, :id => item.origin) + item.published? ? concept_path(id: item.origin) : concept_path(published: 0, id: item.origin) end end - end