diff options
author | Pasha <pasha@member.fsf.org> | 2024-01-20 10:09:23 +0000 |
---|---|---|
committer | Pasha <pasha@member.fsf.org> | 2024-01-20 10:09:23 +0000 |
commit | 76669f6c298bcf3f69a0e1df5c524a7cff3e367d (patch) | |
tree | 9704c3470c1f3ca91510d9af01b8e8eb81969ed9 /web/NetUseAdminWeb/views | |
download | netusemod-76669f6c298bcf3f69a0e1df5c524a7cff3e367d.tar.gz netusemod-76669f6c298bcf3f69a0e1df5c524a7cff3e367d.tar.bz2 |
Diffstat (limited to 'web/NetUseAdminWeb/views')
-rw-r--r-- | web/NetUseAdminWeb/views/acceptnews.tt | 30 | ||||
-rw-r--r-- | web/NetUseAdminWeb/views/generic.tt | 23 | ||||
-rw-r--r-- | web/NetUseAdminWeb/views/index.tt | 27 | ||||
-rw-r--r-- | web/NetUseAdminWeb/views/layouts/main.tt | 132 | ||||
-rw-r--r-- | web/NetUseAdminWeb/views/listnews.tt | 30 | ||||
-rw-r--r-- | web/NetUseAdminWeb/views/login.tt | 33 | ||||
-rw-r--r-- | web/NetUseAdminWeb/views/rejectnews.tt | 33 | ||||
-rw-r--r-- | web/NetUseAdminWeb/views/viewnews.tt | 25 |
8 files changed, 333 insertions, 0 deletions
diff --git a/web/NetUseAdminWeb/views/acceptnews.tt b/web/NetUseAdminWeb/views/acceptnews.tt new file mode 100644 index 0000000..95b1b6c --- /dev/null +++ b/web/NetUseAdminWeb/views/acceptnews.tt @@ -0,0 +1,30 @@ +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<div id="page"> + <div id="content"> + <% file_data %> + <br /><br /> + <form action="<% request.uri_base %>/acceptnews" method="POST"> + <input type='hidden' name='filename_param' value='<% filename_param %>'/> + <br /> + <input type="submit" name="submitbutton" value="Publish"> + </form> + <br /> + </div> +</div> diff --git a/web/NetUseAdminWeb/views/generic.tt b/web/NetUseAdminWeb/views/generic.tt new file mode 100644 index 0000000..8629624 --- /dev/null +++ b/web/NetUseAdminWeb/views/generic.tt @@ -0,0 +1,23 @@ +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<div id="page"> +<div id="content"> + <% message %> +</div> +</div> diff --git a/web/NetUseAdminWeb/views/index.tt b/web/NetUseAdminWeb/views/index.tt new file mode 100644 index 0000000..d16bc34 --- /dev/null +++ b/web/NetUseAdminWeb/views/index.tt @@ -0,0 +1,27 @@ +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<div id="page"> + <div id="content"> + <a href="<% request.uri_base %>/listincomingnews">Incoming news</a> + <br /><br /> + <a href="<% request.uri_base %>/listprocessednews">Processed news</a> + <br /><br /> + <a href="<% request.uri_base %>/listrejectednews">Rejected news</a> + </div> +</div> diff --git a/web/NetUseAdminWeb/views/layouts/main.tt b/web/NetUseAdminWeb/views/layouts/main.tt new file mode 100644 index 0000000..19f2134 --- /dev/null +++ b/web/NetUseAdminWeb/views/layouts/main.tt @@ -0,0 +1,132 @@ +<!DOCTYPE html> + +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<html lang="en"> +<head> + <meta charset="<% settings.charset %>"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> + <style> + body { + margin: 0; + margin-bottom: 25px; + padding: 0; + background-color: #ddd; + background-repeat: no-repeat; + background-position: top left; + font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana"; + font-size: 16px; + color: #333; + } + + * { + box-sizing: border-box; + } + + input, button, select, option, textarea { + font-size: 100%; + } + + header { + background-color: #777; + padding: 15px; + text-align: center; + font-size: 18px; + color: white; + } + + header a { + color: white; + } + + footer { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + + background-color: #777; + padding: 10px; + text-align: center; + color: white; + font-size: 14px; + } + + footer a { + color: white; + } + + section { + padding: 20px; + display: inline-block; + width: 100%; + background-color: white; + } + + article { + margin: auto; + width: 100%; + font-size: 16px; + border: 2px solid #777; + padding: 15px; + background-color: f1f1f1; + max-width: 900px; + } + + table { + font-family: Arial, Helvetica, sans-serif; + border-collapse: collapse; + width: 100%; + } + + table td, table th { + border: 1px solid #ddd; + padding: 8px; + } + + table tr:nth-child(even) { + background-color: #f2f2f2; + } + + table tr:hover {background-color: #ddd;} + + table th { + padding-top: 12px; + padding-bottom: 12px; + text-align: left; + background-color: #777; + color: white; + } + </style> + <title><% title %></title> +</head> +<body> + <header> + <a href="<% request.uri_base %>/">Home</a> <a href="<% request.uri_base %>/logout">Logout</a> + </header> + <section> + <article> + <% content %> + </article> +</section> +<footer> +Powered by <a href="http://perldancer.org/">Dancer2</a> <% dancer_version %> +</footer> +</body> +</html> diff --git a/web/NetUseAdminWeb/views/listnews.tt b/web/NetUseAdminWeb/views/listnews.tt new file mode 100644 index 0000000..ba8af99 --- /dev/null +++ b/web/NetUseAdminWeb/views/listnews.tt @@ -0,0 +1,30 @@ +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<div id="page"> + <div id="content"> + <table> + <tr> + <th>Filename</th> + <th>Created</th> + <th>Action</th> + </tr> + <% listnews %> + </table> + </div> +</div> diff --git a/web/NetUseAdminWeb/views/login.tt b/web/NetUseAdminWeb/views/login.tt new file mode 100644 index 0000000..2ea2c8b --- /dev/null +++ b/web/NetUseAdminWeb/views/login.tt @@ -0,0 +1,33 @@ +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<div id="page"> + <div id="content" align="center"> + <form action="<% request.uri_base %>/login" method="POST"> + <br /> + <label>UserName: </label> + <input type="text" name='user'> + <br /><br /> + <label>Password: </label> + <input type="password" name='pass'> + <br /><br /> + <input type='hidden' name='path' value='<% path %>'/> + <button type="submit">Login</button> + </form> + </div> +</div> diff --git a/web/NetUseAdminWeb/views/rejectnews.tt b/web/NetUseAdminWeb/views/rejectnews.tt new file mode 100644 index 0000000..fc19e41 --- /dev/null +++ b/web/NetUseAdminWeb/views/rejectnews.tt @@ -0,0 +1,33 @@ +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<div id="page"> + <div id="content"> + <% file_data %> + <br /><br /> + <form action="<% request.uri_base %>/rejectnews" method="POST"> + <input type='hidden' name='filename_param' value='<% filename_param %>'/> + <textarea id="reject_reason" name="reject_reason" rows="6" cols="50"></textarea> + <br /><br /><br /> + <input type="submit" name="submitbutton" value="Send reject notification"> + + <input type="submit" name="submitbutton" value="Ignore message (don't send notification)"> + </form> + <br /> + </div> +</div> diff --git a/web/NetUseAdminWeb/views/viewnews.tt b/web/NetUseAdminWeb/views/viewnews.tt new file mode 100644 index 0000000..f6d7f52 --- /dev/null +++ b/web/NetUseAdminWeb/views/viewnews.tt @@ -0,0 +1,25 @@ +<!-- + NetUseMod is a program to moderate Usenet posts via web interface. + Copyright (C) 2024 Salahuddin <salahuddin@member.fsf.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +--> + +<div id="page"> + <div id="content"> + <% file_data %> + <br /><br /> + <% accept_reject_html_block %> + </div> +</div> |