From 4dc487a75566cef2c111a641967cbac8c8914e57 Mon Sep 17 00:00:00 2001 From: totoro Date: Wed, 15 Mar 2017 02:29:10 +0100 Subject: [PATCH] add no_action alternative in web_action_name.anubis --- web/types/web_action_name.anubis | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/web/types/web_action_name.anubis b/web/types/web_action_name.anubis index 2deda8f..b1a4519 100644 --- a/web/types/web_action_name.anubis +++ b/web/types/web_action_name.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-03-15 - * Time: 02:17:19 + * Time: 02:27:54 * */ @@ -12,17 +12,18 @@ transmit tools/basis.anubis public type WEB_Action_Name: + no_action, controller_action( - String controller, - String ac_name + String controller, + String ac_name ), action_name( - String ac_name + String ac_name ), //url is raw action, hence we will only copy that url in final link url( - String url_name + String url_name ) . @@ -39,6 +40,10 @@ public define Message forget(add_string(_web_action_name_message, "__TYPE__", "WEB_Action_Name")); if _web_action_name is { + //Alternative no_action (NO TYPE) + no_action then + forget(add_string(_web_action_name_message, "__TYPE_ALT__", "no_action")), + //Alternative controller_action controller_action(_controller, _ac_name) then forget(add_string(_web_action_name_message, "__TYPE_ALT__", "controller_action")); @@ -72,7 +77,10 @@ public define Maybe(WEB_Action_Name) if find_string(_web_action_name_message, "__TYPE__") is {failure then failure, success(__type__) then if find_string(_web_action_name_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then if __type__ = "WEB_Action_Name" then - //Alternative controller_action + //Alternative no_action (NO TYPE) + if __type_alt__ = "no_action" then + success(no_action) + else //Alternative controller_action if __type_alt__ = "controller_action" then //Alternative controller_action // [type = String] controller_action.controller if find_string(_web_action_name_message, "controller") is {failure then failure, success(controller) then -- libgit2 0.21.4