mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
add sitekey helper in list sitekey page
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use actix_identity::Identity;
|
||||
use actix_web::{HttpResponse, Responder};
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
<ul class="taskbar">
|
||||
<!--
|
||||
<li class="taskbar__action">Brand Name</li>
|
||||
-->
|
||||
<li class="taskbar__spacer"></li>
|
||||
<li class="taskbar__action">
|
||||
<a class="taskbar__link" href="<.= crate::PAGES.panel.sitekey.add .>">
|
||||
<button class="taskbar__add-site">
|
||||
+ New Site
|
||||
</button>
|
||||
</a>
|
||||
<. include!("./new-sitekey-btn.html"); .>
|
||||
</li>
|
||||
<li class="taskbar__action">
|
||||
<img class="taskbar__icon" src="<.=
|
||||
@@ -23,7 +16,6 @@
|
||||
alt="Notifications" />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="taskbar__action">
|
||||
<a href="<.= crate::V1_API_ROUTES.auth.logout .>">
|
||||
<img class="taskbar__icon" src="<.=
|
||||
|
||||
5
templates/panel/header/taskbar/new-sitekey-btn.html
Normal file
5
templates/panel/header/taskbar/new-sitekey-btn.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<a class="taskbar__link" href="<.= crate::PAGES.panel.sitekey.add .>">
|
||||
<button class="taskbar__add-site">
|
||||
+ New Site
|
||||
</button>
|
||||
</a>
|
||||
@@ -11,16 +11,8 @@ include!("./navbar/index.html"); .>
|
||||
<. include!("./help-banner/index.html"); .>
|
||||
<div class="inner-container">
|
||||
<. if sitekeys.is_empty() { .>
|
||||
<ul class="sitekey-list__box">
|
||||
<p>
|
||||
It looks like you don't have any sitekeys. Click
|
||||
<a href="<.= crate::PAGES.panel.sitekey.add .>">here</a> to add new
|
||||
sitekey.
|
||||
</p>
|
||||
</ul>
|
||||
|
||||
<. include!("./sitekey/list/empty-sitekey.html"); .>
|
||||
<.} else {.>
|
||||
|
||||
<table class="sitekey__table">
|
||||
<thead class="sitekey__table-heading">
|
||||
<tr>
|
||||
@@ -62,7 +54,6 @@ include!("./navbar/index.html"); .>
|
||||
<. } .>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<.}.>
|
||||
</div>
|
||||
<. include!("../components/footers.html"); .>
|
||||
|
||||
6
templates/panel/sitekey/list/empty-sitekey.html
Normal file
6
templates/panel/sitekey/list/empty-sitekey.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<ul class="sitekey-list__box">
|
||||
<p>
|
||||
It looks like you don't have any sitekeys. Click <.
|
||||
include!("../../header/taskbar/new-sitekey-btn.html"); .> to add new sitekey.
|
||||
</p>
|
||||
</ul>
|
||||
@@ -12,6 +12,9 @@ include!("../../navbar/index.html"); .>
|
||||
<!-- Main content container -->
|
||||
<div class="inner-container">
|
||||
<!-- Main menu/ important actions roaster -->
|
||||
<. if sitekeys.is_empty() { .>
|
||||
<. include!("./empty-sitekey.html"); .>
|
||||
<.} else {.>
|
||||
<table class="sitekey__table">
|
||||
<thead class="sitekey__table-heading">
|
||||
<tr>
|
||||
@@ -53,6 +56,7 @@ include!("../../navbar/index.html"); .>
|
||||
<. } .>
|
||||
</tbody>
|
||||
</table>
|
||||
<.}.>
|
||||
</div>
|
||||
<!-- end of container -->
|
||||
<. include!("../../../components/footers.html"); .>
|
||||
|
||||
Reference in New Issue
Block a user