1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- ActiveAdmin::Dashboards.build do
-
-
-
-
-
-
-
- section "Bots and Channels" do
- @bots = Bot.all
- @bots.each do |bot|
- panel "Botnick: " + bot.botnick do
- span link_to("view this bot", "/admin/bots/" + bot.id.to_s)
- span "|"
- span link_to("edit this bot", "/admin/bots/" + bot.id.to_s + "/edit")
- span "|"
- span link_to("add a channel to this bot", "/admin/channels/new?bot_id=" + bot.id.to_s + "&botnick=" + bot.botnick.to_s)
- table do
- @channels = Channel.find_all_by_bot_id(bot.id)
- th :Name
- th :Activate
- th :Actions
- @channels.each do |c|
- tr do
- td c.name
- td c.activate
- td do
- span link_to("view", "/admin/channels/" + c.id.to_s)
- span link_to("edit", "/admin/channels/" + c.id.to_s + "/edit")
- span link_to("delete", "/admin/channels/" + c.id.to_s, :method => 'delete', :confirm => "You sure?")
- end
- end
- end
- end
- end
- end
- span link_to("add a new bot", "admin/bots/new")
- end
- section "Frequencies and Bans" do
- ul do
- @frequencies = Frequency.all
- @frequencies.each do |f|
- li "Freq: " + f.name + " on prefix: " + f.prefix + " (" + f.delay.to_s + " seconds delay)"
- ul do
- @bans = Ban.find_all_by_frequency_id(f.id)
- @bans.each do |b|
- li "Hostmask: " + b.hostmask + " Reason: " + b.reason + " (from " + b.valid_from.to_s + " to " + b.valid_to.to_s + ")"
- end
- end
- end
- end
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- end
|