From b87315803cafec5e66020e4e6a113d46e82042db Mon Sep 17 00:00:00 2001 From: Itamar Haber Date: Fri, 1 May 2020 15:34:37 +0300 Subject: [PATCH] Adds ACL categories to command pages --- lib/reference.rb | 4 ++++ views/commands/name.haml | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/lib/reference.rb b/lib/reference.rb index 4beab72f..4e5dadb2 100644 --- a/lib/reference.rb +++ b/lib/reference.rb @@ -106,6 +106,10 @@ def complexity command["complexity"] end + def aclcats + command["aclcats"] + end + def to_param name.downcase.gsub(" ", "-") end diff --git a/views/commands/name.haml b/views/commands/name.haml index f156b006..ce32b9f7 100644 --- a/views/commands/name.haml +++ b/views/commands/name.haml @@ -34,6 +34,13 @@ %li %a(href="#{url}")= name + - unless @command.aclcats.empty? + %h2 ACL categories + + %ul + - @command.aclcats.each do |category| + %li #{category} + %h2 Related commands