From bb6f7cd0a0a4497f3ac64c2af01b0c8b0f1dccc9 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Wed, 3 Jul 2013 13:13:31 +0200 Subject: [PATCH] Align templates to new ajax return format. --- share/templates/administrator/list.tt | 4 ++-- share/templates/billing/fees.tt | 4 ++-- share/templates/billing/list.tt | 6 +++--- share/templates/billing/peaktimes.tt | 4 ++-- share/templates/billing/zones.tt | 4 ++-- share/templates/contact/list.tt | 4 ++-- share/templates/contract/list.tt | 4 ++-- share/templates/customer/list.tt | 6 +++--- share/templates/domain/list.tt | 4 ++-- share/templates/ncos/list.tt | 6 +++--- share/templates/ncos/pattern_list.tt | 4 ++-- share/templates/peering/list.tt | 6 +++--- share/templates/peering/servers_rules.tt | 10 +++++----- share/templates/reseller/list.tt | 4 ++-- share/templates/rewrite/set_list.tt | 6 +++--- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/share/templates/administrator/list.tt b/share/templates/administrator/list.tt index 61e01786c4..09aaca76f3 100644 --- a/share/templates/administrator/list.tt +++ b/share/templates/administrator/list.tt @@ -14,8 +14,8 @@ helper.ajax_uri = c.uri_for( c.controller.action_for('ajax') ); helper.dt_buttons = [ - { name = 'Edit', uri = "/administrator/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/administrator/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = "/administrator/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/administrator/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Create Administrator', uri = c.uri_for('/administrator/create'), icon = 'icon-star' }, diff --git a/share/templates/billing/fees.tt b/share/templates/billing/fees.tt index a5ad622066..a6751616e9 100644 --- a/share/templates/billing/fees.tt +++ b/share/templates/billing/fees.tt @@ -15,8 +15,8 @@ helper.tmpuri = c.uri_for( profile.id, 'fees'); helper.dt_buttons = [ - { name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Create Fee Entry', uri = c.uri_for( profile.id, 'fees') _ "/create", icon = 'icon-star' }, diff --git a/share/templates/billing/list.tt b/share/templates/billing/list.tt index ef59a954de..f00136f79e 100644 --- a/share/templates/billing/list.tt +++ b/share/templates/billing/list.tt @@ -13,9 +13,9 @@ helper.ajax_uri = c.uri_for( c.controller.action_for('ajax') ); helper.dt_buttons = [ - { name = 'Edit', uri = "/billing/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Fees', uri = "/billing/'+full[0]+'/fees", class = 'btn-small btn-tertiary', icon = 'icon-shopping-cart' }, - { name = 'Peaktimes', uri = "/billing/'+full[0]+'/peaktimes", class = 'btn-small btn-tertiary', icon = 'icon-time' }, + { name = 'Edit', uri = "/billing/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Fees', uri = "/billing/'+full[\"id\"]+'/fees", class = 'btn-small btn-tertiary', icon = 'icon-shopping-cart' }, + { name = 'Peaktimes', uri = "/billing/'+full[\"id\"]+'/peaktimes", class = 'btn-small btn-tertiary', icon = 'icon-time' }, ]; helper.top_buttons = [ { name = 'Create Billing Profile', uri = c.uri_for('/billing/create'), icon = 'icon-star' }, diff --git a/share/templates/billing/peaktimes.tt b/share/templates/billing/peaktimes.tt index ef68a9500e..d834460502 100644 --- a/share/templates/billing/peaktimes.tt +++ b/share/templates/billing/peaktimes.tt @@ -65,8 +65,8 @@ helper.tmpuri = c.uri_for(c.req.captures.0, "peaktimes","date"); helper.dt_buttons = [ - { name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Create Special Off-Peak Date', uri = helper.tmpuri _ "/create", icon = 'icon-star' }, diff --git a/share/templates/billing/zones.tt b/share/templates/billing/zones.tt index ad47f50463..38be10caac 100644 --- a/share/templates/billing/zones.tt +++ b/share/templates/billing/zones.tt @@ -14,8 +14,8 @@ helper.tmpuri = c.uri_for( profile.id, 'zones'); helper.dt_buttons = [ - { name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Back', uri = c.uri_for(profile.id, 'fees'), icon = 'icon-arrow-left' }, diff --git a/share/templates/contact/list.tt b/share/templates/contact/list.tt index bc07c160cd..8850465767 100644 --- a/share/templates/contact/list.tt +++ b/share/templates/contact/list.tt @@ -14,8 +14,8 @@ helper.ajax_uri = c.uri_for( c.controller.action_for('ajax') ); helper.dt_buttons = [ - { name = 'Edit', uri = "/contact/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/contact/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = "/contact/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/contact/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Create Contact', uri = c.uri_for('/contact/create'), icon = 'icon-star' }, diff --git a/share/templates/contract/list.tt b/share/templates/contract/list.tt index 60c9ef7bab..021257c369 100644 --- a/share/templates/contract/list.tt +++ b/share/templates/contract/list.tt @@ -14,8 +14,8 @@ helper.ajax_uri = ajax_uri; helper.dt_buttons = [ - { name = 'Edit', uri = "/contract/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/contract/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = "/contract/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/contract/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Create Contract', uri = c.uri_for('/contract/create'), icon = 'icon-star' }, diff --git a/share/templates/customer/list.tt b/share/templates/customer/list.tt index bef2383180..178295a974 100644 --- a/share/templates/customer/list.tt +++ b/share/templates/customer/list.tt @@ -13,9 +13,9 @@ helper.ajax_uri = c.uri_for('/contract/customer/ajax'); helper.dt_buttons = [ - { name = 'Edit', uri = "/contract/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/contract/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, - { name = 'Details', uri = "/customer/'+full[0]+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' }, + { name = 'Edit', uri = "/contract/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/contract/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Details', uri = "/customer/'+full[\"id\"]+'/details", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; helper.top_buttons = [ { name = 'Create Customer', uri = c.uri_for_action('/contract/customer_create'), icon = 'icon-star' }, diff --git a/share/templates/domain/list.tt b/share/templates/domain/list.tt index a7fcce39d4..2d8e2dff3e 100644 --- a/share/templates/domain/list.tt +++ b/share/templates/domain/list.tt @@ -14,8 +14,8 @@ helper.ajax_uri = c.uri_for( c.controller.action_for('ajax') ); helper.dt_buttons = [ - { name = 'Delete', uri = "/domain/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, - { name = 'Preferences', uri = "/domain/'+full[0]+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, + { name = 'Delete', uri = "/domain/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Preferences', uri = "/domain/'+full[\"id\"]+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; helper.top_buttons = [ { name = 'Create Domain', uri = c.uri_for('/domain/create'), icon = 'icon-star' }, diff --git a/share/templates/ncos/list.tt b/share/templates/ncos/list.tt index bd56f3f894..eb423e75eb 100644 --- a/share/templates/ncos/list.tt +++ b/share/templates/ncos/list.tt @@ -13,9 +13,9 @@ helper.ajax_uri = c.uri_for_action( "/ncos/ajax" ); helper.dt_buttons = [ - { name = 'Edit', uri = "/ncos/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/ncos/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, - { name = 'Patterns', uri = "/ncos/'+full[0]+'/pattern", class = 'btn-small btn-tertiary', icon = 'icon-list' }, + { name = 'Edit', uri = "/ncos/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/ncos/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Patterns', uri = "/ncos/'+full[\"id\"]+'/pattern", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; helper.top_buttons = [ { name = 'Create NCOS Level', uri = c.uri_for('/ncos/create'), icon = 'icon-star' }, diff --git a/share/templates/ncos/pattern_list.tt b/share/templates/ncos/pattern_list.tt index 94b54d0344..133dec6f75 100644 --- a/share/templates/ncos/pattern_list.tt +++ b/share/templates/ncos/pattern_list.tt @@ -15,8 +15,8 @@ helper.tmpuri = c.uri_for_action( "/ncos/pattern_root", [c.req.captures.0] ) helper.dt_buttons = [ - { name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Back', uri = c.uri_for(), icon = 'icon-arrow-left' }, diff --git a/share/templates/peering/list.tt b/share/templates/peering/list.tt index d7e15f18fd..2a6e236561 100644 --- a/share/templates/peering/list.tt +++ b/share/templates/peering/list.tt @@ -13,9 +13,9 @@ helper.ajax_uri = c.uri_for_action( "/peering/ajax" ); helper.dt_buttons = [ - { name = 'Edit', uri = "/peering/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/peering/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, - { name = 'Details', uri = "/peering/'+full[0]+'/servers", class = 'btn-small btn-tertiary', icon = 'icon-list' }, + { name = 'Edit', uri = "/peering/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/peering/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Details', uri = "/peering/'+full[\"id\"]+'/servers", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; helper.top_buttons = [ { name = 'Create Peering Group', uri = c.uri_for('/peering/create'), icon = 'icon-star' }, diff --git a/share/templates/peering/servers_rules.tt b/share/templates/peering/servers_rules.tt index e383ca7c24..a79715513a 100644 --- a/share/templates/peering/servers_rules.tt +++ b/share/templates/peering/servers_rules.tt @@ -14,9 +14,9 @@ helper.tmpuri = c.uri_for_action("/peering/servers_root", [c.req.captures.0]); helper.dt_buttons = [ - { name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, - { name = 'Preferences', uri = helper.tmpuri _ "/'+full[0]+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, + { name = 'Edit', uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Preferences', uri = helper.tmpuri _ "/'+full[\"id\"]+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; helper.top_buttons = [ { name = 'Create Peering Server', uri = helper.tmpuri _ "/create", icon = 'icon-star' }, @@ -40,8 +40,8 @@ helper.tmpuri = c.uri_for(group.id, "rules"); helper.dt_buttons = [ - { name = 'Edit', uri = helper.tmpuri _ "/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = helper.tmpuri _ "/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = helper.tmpuri _ "/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = helper.tmpuri _ "/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Create Peering Rule', uri = helper.tmpuri _ "/create", icon = 'icon-star' }, diff --git a/share/templates/reseller/list.tt b/share/templates/reseller/list.tt index 92c6ce8534..96552cba3f 100644 --- a/share/templates/reseller/list.tt +++ b/share/templates/reseller/list.tt @@ -14,8 +14,8 @@ helper.ajax_uri = c.uri_for( c.controller.action_for('ajax') ); helper.dt_buttons = [ - { name = 'Edit', uri = "/reseller/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/domain/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Edit', uri = "/reseller/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/reseller/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ { name = 'Create Reseller', uri = c.uri_for('/reseller/create'), icon = 'icon-star' }, diff --git a/share/templates/rewrite/set_list.tt b/share/templates/rewrite/set_list.tt index 269e721a8c..dc6717b980 100644 --- a/share/templates/rewrite/set_list.tt +++ b/share/templates/rewrite/set_list.tt @@ -14,9 +14,9 @@ helper.base_uri = c.uri_for_action( "/rewrite/set_root" ); helper.dt_buttons = [ - { name = 'Edit', uri = "/rewrite/'+full[0]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, - { name = 'Delete', uri = "/rewrite/'+full[0]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, - { name = 'Rules', uri = "/rewrite/'+full[0]+'/rules", class = 'btn-small btn-tertiary', icon = 'icon-list' }, + { name = 'Edit', uri = "/rewrite/'+full[\"id\"]+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, + { name = 'Delete', uri = "/rewrite/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, + { name = 'Rules', uri = "/rewrite/'+full[\"id\"]+'/rules", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; helper.top_buttons = [ { name = 'Create Rewrite Rule Set', uri = c.uri_for('/rewrite/create'), icon = 'icon-star' },