OSDN Git Service

* Web.pm: add acl2_type to siteconfig.js
authorhylom <hylom@users.sourceforge.jp>
Thu, 4 May 2017 08:09:16 +0000 (17:09 +0900)
committerhylom <hylom@users.sourceforge.jp>
Thu, 4 May 2017 08:09:16 +0000 (17:09 +0900)
src/newslash_web/lib/Newslash/Web.pm
src/newslash_web/templates/common/siteconfig.js.tt2

index d5afc4e..fc74c53 100644 (file)
@@ -101,6 +101,7 @@ sub startup {
     my $templ_name = "common/siteconfig.js";
     my $mod_reasons = $app->model('moderations')->reasons();
     my $topics = $app->model('tags')->get_topics;
+    my @acl2_types = $app->model('users')->acl2_types;
     my $keywords = {};
     for my $topic (@$topics) {
         my $lc_keyword = lc($topic->{keyword});
@@ -115,6 +116,7 @@ sub startup {
     my $vars = {
                 moderate_reasons => $mod_reasons,
                 topics => $keywords,
+                acl2_types => \@acl2_types,
                };
     my $siteconfig = $app->tt2renderer->render($templ_name, $vars);
     $app->static_content->add_content("js/siteconfig.js", $siteconfig, "text/javascript; charset=utf-8");
index af2707c..279e9c7 100644 (file)
@@ -8,3 +8,4 @@ topicIconBaseURL: "[% Site.topic_icon_base_url %]",
 };
 var topics = [% topics.json %];
 var editorConfig = [% Editor.json %];
+var acl2Types = [% acl2_types.json %];
\ No newline at end of file