简体   繁体   English

活跃的管理员定制Rails

[英]Active admin customisation ruby on rails

I'm new to active admin gem. 我是活跃管理员的新手。 My requirement is like admin should be able to view the table as usual. 我的要求就像管理员应该能够照常查看表。 In addition to that there should be a Text box along with a button which can be used for some action. 除此之外,还应该有一个文本框和一个可用于某些操作的按钮。 See the Uploaded Picture Below.. 请参阅下面的上载图片。 在此处输入图片说明

I have a model named PushNotification now and the fields it do have are enabled, rule_name,day_limit,message. 我现在有一个名为PushNotification的模型,并且已启用它的字段,rule_name,day_limit,message。

All these values should be shown as in the picture. 所有这些值应如图所示。 In addition to that I want a message box with button(send push notification) as shown in picture. 除此之外,我还需要一个带有按钮的消息框(发送推送通知),如图所示。

Is this possible in active admin?. 在活动的管理员中这可能吗? If so please do help.. 如果是这样,请提供帮助。

Thanks in advance 提前致谢

Put this in your admin page. 将其放在您的管理页面中。

    ActiveAdmin.register_page "Push Notification" do
      menu  priority: 12
        action_item do
        link_to "Create New Rule", "/"
        end

     content do
      render partial: 'send_notification'
      end
    end

and make a view inside view/admin. 并在view / admin内部进行查看。

now you can create your custom view in that html page inside admin folder. 现在,您可以在admin文件夹内的html页面中创建自定义视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM