From 7eb0c7fa04e72496e07d25b21bf6a1f2b8f3ac41 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 28 Jul 2008 06:48:16 +0000 Subject: use <% %> instead of git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1323 ab2d0c66-481e-0410-8bed-d214d4d58bed --- tinydns-config-html.lsp | 22 +++++------ tinydns-edit-html.lsp | 40 ++++++++++---------- tinydns-html.lsp | 10 ++--- tinydns-listfiles-html.lsp | 36 +++++++++--------- tinydns-listpermissions-html.lsp | 28 +++++++------- tinydns-status-html.lsp | 12 +++--- tinydns-view-html.lsp | 80 ++++++++++++++++++++-------------------- 7 files changed, 114 insertions(+), 114 deletions(-) diff --git a/tinydns-config-html.lsp b/tinydns-config-html.lsp index a213785..47c9191 100755 --- a/tinydns-config-html.lsp +++ b/tinydns-config-html.lsp @@ -1,24 +1,24 @@ - - +<% --[[ DEBUG INFORMATION io.write("

DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%> - +end %> -

-<%= form.label %> +<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action displayform(form) -?> +%> - +end %> diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp index 44cf642..a100c27 100644 --- a/tinydns-edit-html.lsp +++ b/tinydns-edit-html.lsp @@ -1,6 +1,6 @@ - - - +<% local form, viewlibrary, page_info = ... %> +<% require("viewfunctions") %> +<% form = viewlibrary.dispatch_component(page_info.prefix .. page_info.controller .. "/editfile", form, true) %> -DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%>

Configuration

Expert Configuration

File Details

- +%>

File Entries

-

") ?>

-

") ?>

+<% if form.descr then %>

<%= string.gsub(form.descr, "\n", "
") %>

<% end %> +<% if form.errtxt then %>

<%= string.gsub(form.errtxt, "\n", "
") %>

<% end %> - +<% for line in string.gmatch(form.value.filecontent.value.."\n", "([^\n]*)\n") do %> - + - +<% end %>
<%= line %>
-

") ?>

+<% if form.value.filecontent.errtxt then %>

<%= string.gsub(form.value.filecontent.errtxt, "\n", "
") %>

<% end %> -
" method="POST"> - - +" method="POST"> + +

Save and Apply Above Settings

-
+
diff --git a/tinydns-html.lsp b/tinydns-html.lsp index 383906a..be0d7e9 100644 --- a/tinydns-html.lsp +++ b/tinydns-html.lsp @@ -1,12 +1,12 @@ - +%> -

-<%= form.label %> +<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action if form.value.userid then form.value.userid.contenteditable = false end if form.value.role then form.value.role.contenteditable = false end local order = { "userid", "role" } displayform(form, order) -?> +%> diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp index 46753ec..21bc652 100644 --- a/tinydns-listfiles-html.lsp +++ b/tinydns-listfiles-html.lsp @@ -1,15 +1,15 @@ - - +<% --[[ DEBUG INFORMATION io.write("

DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%> - +<% displaycommandresults({"delete"}, session) %>

Configuration

Edit/View existing Domains

@@ -20,25 +20,25 @@ io.write("") Last Modified File - +<% for i,file in ipairs(form.value) do %> - - - - + <% io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) %> + <% io.write(html.link{value = "view?filename=" .. file.value.filename.value, label="View " }) %> + <% io.write(html.link{value = "edit?filename=" .. file.value.filename.value, label="Edit " }) %> + <% io.write(html.link{value = "editfile?filename=" .. file.value.filename.value, label="Expert " }) %> - - - + <%= file.value.filesize.value %> + <%= file.value.mtime.value %> + <%= file.value.filename.value %> - +<% end %> - +<% if viewlibrary and viewlibrary.dispatch_component and session.permissions.tinydns.newfile then + local newfileform = viewlibrary.dispatch_component("newfile", nil, true) %>

Create new Domain

- +end %> diff --git a/tinydns-listpermissions-html.lsp b/tinydns-listpermissions-html.lsp index 0e8711c..355e49e 100644 --- a/tinydns-listpermissions-html.lsp +++ b/tinydns-listpermissions-html.lsp @@ -1,30 +1,30 @@ - - +<% --[[ io.write(html.cfe_unpack(view)) ---]] ?> +--]] %> -

+

<%= view.label %>

User Permissions

- - - +<% end %>
UserPermissions
- +
<%= html.link{value=page_info.script .. page_info.prefix .. page_info.controller .. "/edituserpermissions?userid=" .. user.id, label=user.id} %> + <% for y,allowed in pairs(user.allowed) do print(allowed, "
") - end ?> + end %>

Role Permissions

- - - +<% end %>
RolePermissions
- +
<%= html.link{value=page_info.script .. page_info.prefix .. page_info.controller .. "/editrolepermissions?role=" .. role.id, label=role.id} %> + <% for y,allowed in pairs(role.allowed) do print(allowed, "
") - end ?> + end %>
diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp index f175e92..3a34eaf 100644 --- a/tinydns-status-html.lsp +++ b/tinydns-status-html.lsp @@ -1,16 +1,16 @@ - - - +<% require("viewfunctions") %> +<% --[[ io.write(html.cfe_unpack(data)) ---]] ?> +--]] %>

System Info

- +%>
diff --git a/tinydns-view-html.lsp b/tinydns-view-html.lsp index 354b199..e851569 100644 --- a/tinydns-view-html.lsp +++ b/tinydns-view-html.lsp @@ -1,6 +1,6 @@ - +%> -DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(view)) io.write("
") --]] -?> +%>

DNS Entries - +<% if view.filename then io.write(" for "..view.filename) end %>

Locations

- -
  • + <% end %> +
  • <%= loc[1] %>
  • - +<% end %>
    - +%>

    Records

    Filter:
    -- cgit v1.2.3