Explicitly define base and asset path in templates
With the new routes, all pages are not all at the same folder level anymore (e.g. /shaare and /shaare/123), so we can't just use './' everywhere. The most consistent way to handle this is to prefix all path with the proper variable, and handle the actual path in controllers.
This commit is contained in:
parent
c22fa57a55
commit
818b3193ff
51 changed files with 205 additions and 236 deletions
|
@ -22,6 +22,7 @@
|
||||||
* Extension of Slim container to document the injected objects.
|
* Extension of Slim container to document the injected objects.
|
||||||
*
|
*
|
||||||
* @property mixed[] $environment $_SERVER automatically injected by Slim
|
* @property mixed[] $environment $_SERVER automatically injected by Slim
|
||||||
|
* @property string $basePath Shaarli's instance base path (e.g. `/shaarli/`)
|
||||||
* @property ConfigManager $conf
|
* @property ConfigManager $conf
|
||||||
* @property SessionManager $sessionManager
|
* @property SessionManager $sessionManager
|
||||||
* @property LoginManager $loginManager
|
* @property LoginManager $loginManager
|
||||||
|
|
|
@ -39,6 +39,8 @@ public function __construct(ShaarliContainer $container)
|
||||||
public function __invoke(Request $request, Response $response, callable $next)
|
public function __invoke(Request $request, Response $response, callable $next)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->container->basePath = rtrim($request->getUri()->getBasePath(), '/');
|
||||||
|
|
||||||
$response = $next($request, $response);
|
$response = $next($request, $response);
|
||||||
} catch (ShaarliFrontException $e) {
|
} catch (ShaarliFrontException $e) {
|
||||||
$this->container->pageBuilder->assign('message', $e->getMessage());
|
$this->container->pageBuilder->assign('message', $e->getMessage());
|
||||||
|
|
|
@ -60,6 +60,19 @@ protected function render(string $template): string
|
||||||
$this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
|
$this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
|
||||||
$this->assignView('plugin_errors', $this->container->pluginManager->getErrors());
|
$this->assignView('plugin_errors', $this->container->pluginManager->getErrors());
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define base path (if Shaarli is installed in a domain's subfolder, e.g. `/shaarli`)
|
||||||
|
* and the asset path (subfolder/tpl/default for default theme).
|
||||||
|
* These MUST be used to create an internal link or to include an asset in templates.
|
||||||
|
*/
|
||||||
|
$this->assignView('base_path', $this->container->basePath);
|
||||||
|
$this->assignView(
|
||||||
|
'asset_path',
|
||||||
|
$this->container->basePath . '/' .
|
||||||
|
rtrim($this->container->conf->get('resource.raintpl_tpl', 'tpl'), '/') . '/' .
|
||||||
|
$this->container->conf->get('resource.theme', 'default')
|
||||||
|
);
|
||||||
|
|
||||||
$this->executeDefaultHooks($template);
|
$this->executeDefaultHooks($template);
|
||||||
|
|
||||||
return $this->container->pageBuilder->render($template);
|
return $this->container->pageBuilder->render($template);
|
||||||
|
@ -105,7 +118,7 @@ protected function redirectFromReferer(
|
||||||
array $clearParams = [],
|
array $clearParams = [],
|
||||||
string $anchor = null
|
string $anchor = null
|
||||||
): Response {
|
): Response {
|
||||||
$defaultPath = rtrim($request->getUri()->getBasePath(), '/') . '/';
|
$defaultPath = $this->container->basePath . '/';
|
||||||
$referer = $this->container->environment['HTTP_REFERER'] ?? null;
|
$referer = $this->container->environment['HTTP_REFERER'] ?? null;
|
||||||
|
|
||||||
if (null !== $referer) {
|
if (null !== $referer) {
|
||||||
|
|
|
@ -149,6 +149,10 @@ private function initialize()
|
||||||
*/
|
*/
|
||||||
protected function finalize(): void
|
protected function finalize(): void
|
||||||
{
|
{
|
||||||
|
//FIXME - DEV _ REMOVE ME
|
||||||
|
$this->assign('base_path', '/Shaarli');
|
||||||
|
$this->assign('asset_path', '/Shaarli/tpl/default');
|
||||||
|
|
||||||
// TODO: use the SessionManager
|
// TODO: use the SessionManager
|
||||||
$messageKeys = [
|
$messageKeys = [
|
||||||
SessionManager::KEY_SUCCESS_MESSAGES,
|
SessionManager::KEY_SUCCESS_MESSAGES,
|
||||||
|
|
|
@ -10,13 +10,14 @@
|
||||||
* It contains a recursive call to retrieve the thumb of the next link when it succeed.
|
* It contains a recursive call to retrieve the thumb of the next link when it succeed.
|
||||||
* It also update the progress bar and other visual feedback elements.
|
* It also update the progress bar and other visual feedback elements.
|
||||||
*
|
*
|
||||||
|
* @param {string} basePath Shaarli subfolder for XHR requests
|
||||||
* @param {array} ids List of LinkID to update
|
* @param {array} ids List of LinkID to update
|
||||||
* @param {int} i Current index in ids
|
* @param {int} i Current index in ids
|
||||||
* @param {object} elements List of DOM element to avoid retrieving them at each iteration
|
* @param {object} elements List of DOM element to avoid retrieving them at each iteration
|
||||||
*/
|
*/
|
||||||
function updateThumb(ids, i, elements) {
|
function updateThumb(basePath, ids, i, elements) {
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', './?do=ajax_thumb_update');
|
xhr.open('POST', `${basePath}/?do=ajax_thumb_update`);
|
||||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||||
xhr.responseType = 'json';
|
xhr.responseType = 'json';
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
|
@ -40,6 +41,7 @@ function updateThumb(ids, i, elements) {
|
||||||
}
|
}
|
||||||
|
|
||||||
(() => {
|
(() => {
|
||||||
|
const basePath = document.querySelector('input[name="js_base_path"]').value;
|
||||||
const ids = document.getElementsByName('ids')[0].value.split(',');
|
const ids = document.getElementsByName('ids')[0].value.split(',');
|
||||||
const elements = {
|
const elements = {
|
||||||
progressBar: document.querySelector('.progressbar > div'),
|
progressBar: document.querySelector('.progressbar > div'),
|
||||||
|
@ -47,5 +49,5 @@ function updateThumb(ids, i, elements) {
|
||||||
thumbnail: document.querySelector('.thumbnail-placeholder'),
|
thumbnail: document.querySelector('.thumbnail-placeholder'),
|
||||||
title: document.querySelector('.thumbnail-link-title'),
|
title: document.querySelector('.thumbnail-link-title'),
|
||||||
};
|
};
|
||||||
updateThumb(ids, 0, elements);
|
updateThumb(basePath, ids, 0, elements);
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -25,9 +25,9 @@ function findParent(element, tagName, attributes) {
|
||||||
/**
|
/**
|
||||||
* Ajax request to refresh the CSRF token.
|
* Ajax request to refresh the CSRF token.
|
||||||
*/
|
*/
|
||||||
function refreshToken() {
|
function refreshToken(basePath) {
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', './?do=token');
|
xhr.open('GET', `${basePath}/?do=token`);
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
const token = document.getElementById('token');
|
const token = document.getElementById('token');
|
||||||
token.setAttribute('value', xhr.responseText);
|
token.setAttribute('value', xhr.responseText);
|
||||||
|
@ -215,6 +215,8 @@ function init(description) {
|
||||||
}
|
}
|
||||||
|
|
||||||
(() => {
|
(() => {
|
||||||
|
const basePath = document.querySelector('input[name="js_base_path"]').value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle responsive menu.
|
* Handle responsive menu.
|
||||||
* Source: http://purecss.io/layouts/tucked-menu-vertical/
|
* Source: http://purecss.io/layouts/tucked-menu-vertical/
|
||||||
|
@ -461,7 +463,7 @@ function init(description) {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (window.confirm(message)) {
|
if (window.confirm(message)) {
|
||||||
window.location = `?delete_link&lf_linkdate=${ids.join('+')}&token=${token.value}`;
|
window.location = `${basePath}/?delete_link&lf_linkdate=${ids.join('+')}&token=${token.value}`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -483,7 +485,8 @@ function init(description) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const ids = links.map(item => item.id);
|
const ids = links.map(item => item.id);
|
||||||
window.location = `?change_visibility&token=${token.value}&newVisibility=${visibility}&ids=${ids.join('+')}`;
|
window.location =
|
||||||
|
`${basePath}/?change_visibility&token=${token.value}&newVisibility=${visibility}&ids=${ids.join('+')}`;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -546,7 +549,7 @@ function init(description) {
|
||||||
const refreshedToken = document.getElementById('token').value;
|
const refreshedToken = document.getElementById('token').value;
|
||||||
const fromtag = block.getAttribute('data-tag');
|
const fromtag = block.getAttribute('data-tag');
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', './manage-tags');
|
xhr.open('POST', `${basePath}/manage-tags`);
|
||||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
if (xhr.status !== 200) {
|
if (xhr.status !== 200) {
|
||||||
|
@ -558,8 +561,12 @@ function init(description) {
|
||||||
input.setAttribute('value', totag);
|
input.setAttribute('value', totag);
|
||||||
findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none';
|
findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none';
|
||||||
block.querySelector('a.tag-link').innerHTML = htmlEntities(totag);
|
block.querySelector('a.tag-link').innerHTML = htmlEntities(totag);
|
||||||
block.querySelector('a.tag-link').setAttribute('href', `./?searchtags=${encodeURIComponent(totag)}`);
|
block
|
||||||
block.querySelector('a.rename-tag').setAttribute('href', `./manage-tags?fromtag=${encodeURIComponent(totag)}`);
|
.querySelector('a.tag-link')
|
||||||
|
.setAttribute('href', `${basePath}/?searchtags=${encodeURIComponent(totag)}`);
|
||||||
|
block
|
||||||
|
.querySelector('a.rename-tag')
|
||||||
|
.setAttribute('href', `${basePath}/manage-tags?fromtag=${encodeURIComponent(totag)}`);
|
||||||
|
|
||||||
// Refresh awesomplete values
|
// Refresh awesomplete values
|
||||||
existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag));
|
existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag));
|
||||||
|
@ -567,7 +574,7 @@ function init(description) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.send(`renametag=1&fromtag=${encodeURIComponent(fromtag)}&totag=${encodeURIComponent(totag)}&token=${refreshedToken}`);
|
xhr.send(`renametag=1&fromtag=${encodeURIComponent(fromtag)}&totag=${encodeURIComponent(totag)}&token=${refreshedToken}`);
|
||||||
refreshToken();
|
refreshToken(basePath);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -593,13 +600,13 @@ function init(description) {
|
||||||
|
|
||||||
if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) {
|
if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) {
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', './manage-tags');
|
xhr.open('POST', `${basePath}/manage-tags`);
|
||||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
block.remove();
|
block.remove();
|
||||||
};
|
};
|
||||||
xhr.send(encodeURI(`deletetag=1&fromtag=${tag}&token=${refreshedToken}`));
|
xhr.send(encodeURI(`deletetag=1&fromtag=${tag}&token=${refreshedToken}`));
|
||||||
refreshToken();
|
refreshToken(basePath);
|
||||||
|
|
||||||
existingTags = existingTags.filter(tagItem => tagItem !== tag);
|
existingTags = existingTags.filter(tagItem => tagItem !== tag);
|
||||||
awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes);
|
awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes);
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
use Shaarli\Render\PageBuilder;
|
use Shaarli\Render\PageBuilder;
|
||||||
use Slim\Http\Request;
|
use Slim\Http\Request;
|
||||||
use Slim\Http\Response;
|
use Slim\Http\Response;
|
||||||
|
use Slim\Http\Uri;
|
||||||
|
|
||||||
class ShaarliMiddlewareTest extends TestCase
|
class ShaarliMiddlewareTest extends TestCase
|
||||||
{
|
{
|
||||||
|
@ -29,6 +30,13 @@ public function setUp(): void
|
||||||
public function testMiddlewareExecution(): void
|
public function testMiddlewareExecution(): void
|
||||||
{
|
{
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
|
$request->method('getUri')->willReturnCallback(function (): Uri {
|
||||||
|
$uri = $this->createMock(Uri::class);
|
||||||
|
$uri->method('getBasePath')->willReturn('/subfolder');
|
||||||
|
|
||||||
|
return $uri;
|
||||||
|
});
|
||||||
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
$controller = function (Request $request, Response $response): Response {
|
$controller = function (Request $request, Response $response): Response {
|
||||||
return $response->withStatus(418); // I'm a tea pot
|
return $response->withStatus(418); // I'm a tea pot
|
||||||
|
@ -44,6 +52,13 @@ public function testMiddlewareExecution(): void
|
||||||
public function testMiddlewareExecutionWithException(): void
|
public function testMiddlewareExecutionWithException(): void
|
||||||
{
|
{
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
|
$request->method('getUri')->willReturnCallback(function (): Uri {
|
||||||
|
$uri = $this->createMock(Uri::class);
|
||||||
|
$uri->method('getBasePath')->willReturn('/subfolder');
|
||||||
|
|
||||||
|
return $uri;
|
||||||
|
});
|
||||||
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
$controller = function (): void {
|
$controller = function (): void {
|
||||||
$exception = new LoginBannedException();
|
$exception = new LoginBannedException();
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
use Shaarli\Thumbnailer;
|
use Shaarli\Thumbnailer;
|
||||||
use Slim\Http\Request;
|
use Slim\Http\Request;
|
||||||
use Slim\Http\Response;
|
use Slim\Http\Response;
|
||||||
use Slim\Http\Uri;
|
|
||||||
|
|
||||||
class PostBookmarkControllerTest extends TestCase
|
class PostBookmarkControllerTest extends TestCase
|
||||||
{
|
{
|
||||||
|
@ -406,12 +405,6 @@ public function testSaveBookmark(): void
|
||||||
return $parameters[$key] ?? null;
|
return $parameters[$key] ?? null;
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$checkBookmark = function (Bookmark $bookmark) use ($parameters) {
|
$checkBookmark = function (Bookmark $bookmark) use ($parameters) {
|
||||||
|
@ -493,12 +486,6 @@ public function testSaveExistingBookmark(): void
|
||||||
return $parameters[$key] ?? null;
|
return $parameters[$key] ?? null;
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$checkBookmark = function (Bookmark $bookmark) use ($parameters, $id) {
|
$checkBookmark = function (Bookmark $bookmark) use ($parameters, $id) {
|
||||||
|
@ -575,12 +562,6 @@ public function testSaveBookmarkWithThumbnail(): void
|
||||||
return $parameters[$key] ?? null;
|
return $parameters[$key] ?? null;
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$this->container->conf = $this->createMock(ConfigManager::class);
|
$this->container->conf = $this->createMock(ConfigManager::class);
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
use Shaarli\Security\SessionManager;
|
use Shaarli\Security\SessionManager;
|
||||||
use Slim\Http\Request;
|
use Slim\Http\Request;
|
||||||
use Slim\Http\Response;
|
use Slim\Http\Response;
|
||||||
use Slim\Http\Uri;
|
|
||||||
|
|
||||||
class SessionFilterControllerTest extends TestCase
|
class SessionFilterControllerTest extends TestCase
|
||||||
{
|
{
|
||||||
|
@ -33,12 +32,6 @@ public function testLinksPerPage(): void
|
||||||
$this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
|
$this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$request->method('getParam')->with('nb')->willReturn('8');
|
$request->method('getParam')->with('nb')->willReturn('8');
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
|
@ -61,12 +54,6 @@ public function testLinksPerPage(): void
|
||||||
public function testLinksPerPageNotValid(): void
|
public function testLinksPerPageNotValid(): void
|
||||||
{
|
{
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$request->method('getParam')->with('nb')->willReturn('test');
|
$request->method('getParam')->with('nb')->willReturn('test');
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
|
@ -80,7 +67,7 @@ public function testLinksPerPageNotValid(): void
|
||||||
|
|
||||||
static::assertInstanceOf(Response::class, $result);
|
static::assertInstanceOf(Response::class, $result);
|
||||||
static::assertSame(302, $result->getStatusCode());
|
static::assertSame(302, $result->getStatusCode());
|
||||||
static::assertSame(['/subfolder'], $result->getHeader('location'));
|
static::assertSame(['/subfolder/'], $result->getHeader('location'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,12 +87,6 @@ public function testVisibility(): void
|
||||||
;
|
;
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$result = $this->controller->visibility($request, $response, $arg);
|
$result = $this->controller->visibility($request, $response, $arg);
|
||||||
|
@ -141,12 +122,6 @@ public function testVisibilityToggleOff(): void
|
||||||
;
|
;
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$result = $this->controller->visibility($request, $response, $arg);
|
$result = $this->controller->visibility($request, $response, $arg);
|
||||||
|
@ -176,19 +151,13 @@ public function testVisibilitySwitch(): void
|
||||||
;
|
;
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$result = $this->controller->visibility($request, $response, $arg);
|
$result = $this->controller->visibility($request, $response, $arg);
|
||||||
|
|
||||||
static::assertInstanceOf(Response::class, $result);
|
static::assertInstanceOf(Response::class, $result);
|
||||||
static::assertSame(302, $result->getStatusCode());
|
static::assertSame(302, $result->getStatusCode());
|
||||||
static::assertSame(['/subfolder'], $result->getHeader('location'));
|
static::assertSame(['/subfolder/'], $result->getHeader('location'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -212,12 +181,6 @@ public function testVisibilityInvalidValue(): void
|
||||||
;
|
;
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$result = $this->controller->visibility($request, $response, $arg);
|
$result = $this->controller->visibility($request, $response, $arg);
|
||||||
|
@ -249,12 +212,6 @@ public function testVisibilityLoggedOut(): void
|
||||||
;
|
;
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$result = $this->controller->visibility($request, $response, $arg);
|
$result = $this->controller->visibility($request, $response, $arg);
|
||||||
|
@ -272,12 +229,6 @@ public function testUntaggedOnly(): void
|
||||||
$this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
|
$this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$this->container->sessionManager
|
$this->container->sessionManager
|
||||||
|
@ -301,13 +252,6 @@ public function testUntaggedOnlyToggleOff(): void
|
||||||
$this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
|
$this->container->environment = ['HTTP_REFERER' => 'http://shaarli/subfolder/controller/?searchtag=abc'];
|
||||||
|
|
||||||
$request = $this->createMock(Request::class);
|
$request = $this->createMock(Request::class);
|
||||||
$request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
|
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
|
|
||||||
$this->container->sessionManager
|
$this->container->sessionManager
|
||||||
|
|
|
@ -81,6 +81,8 @@ protected function createContainer(): void
|
||||||
'SERVER_PORT' => '80',
|
'SERVER_PORT' => '80',
|
||||||
'REQUEST_URI' => '/daily-rss',
|
'REQUEST_URI' => '/daily-rss',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$this->container->basePath = '/subfolder';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,15 +8,14 @@
|
||||||
use Shaarli\Bookmark\BookmarkFilter;
|
use Shaarli\Bookmark\BookmarkFilter;
|
||||||
use Slim\Http\Request;
|
use Slim\Http\Request;
|
||||||
use Slim\Http\Response;
|
use Slim\Http\Response;
|
||||||
use Slim\Http\Uri;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ShaarliControllerTest
|
* Class ShaarliControllerTest
|
||||||
*
|
*
|
||||||
* This class is used to test default behavior of ShaarliController abstract class.
|
* This class is used to test default behavior of ShaarliVisitorController abstract class.
|
||||||
* It uses a dummy non abstract controller.
|
* It uses a dummy non abstract controller.
|
||||||
*/
|
*/
|
||||||
class ShaarliPublicControllerTest extends TestCase
|
class ShaarliVisitorControllerTest extends TestCase
|
||||||
{
|
{
|
||||||
use FrontControllerMockHelper;
|
use FrontControllerMockHelper;
|
||||||
|
|
||||||
|
@ -49,20 +48,15 @@ public function redirectFromReferer(
|
||||||
Request $request,
|
Request $request,
|
||||||
Response $response,
|
Response $response,
|
||||||
array $loopTerms = [],
|
array $loopTerms = [],
|
||||||
array $clearParams = []
|
array $clearParams = [],
|
||||||
|
string $anchor = null
|
||||||
): Response {
|
): Response {
|
||||||
return parent::redirectFromReferer($request, $response, $loopTerms, $clearParams);
|
return parent::redirectFromReferer($request, $response, $loopTerms, $clearParams, $anchor);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$this->assignedValues = [];
|
$this->assignedValues = [];
|
||||||
|
|
||||||
$this->request = $this->createMock(Request::class);
|
$this->request = $this->createMock(Request::class);
|
||||||
$this->request->method('getUri')->willReturnCallback(function (): Uri {
|
|
||||||
$uri = $this->createMock(Uri::class);
|
|
||||||
$uri->method('getBasePath')->willReturn('/subfolder');
|
|
||||||
|
|
||||||
return $uri;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAssignView(): void
|
public function testAssignView(): void
|
||||||
|
@ -102,6 +96,8 @@ public function testRender(): void
|
||||||
static::assertSame(10, $this->assignedValues['linkcount']);
|
static::assertSame(10, $this->assignedValues['linkcount']);
|
||||||
static::assertSame(5, $this->assignedValues['privateLinkcount']);
|
static::assertSame(5, $this->assignedValues['privateLinkcount']);
|
||||||
static::assertSame(['error'], $this->assignedValues['plugin_errors']);
|
static::assertSame(['error'], $this->assignedValues['plugin_errors']);
|
||||||
|
static::assertSame('/subfolder', $this->assignedValues['base_path']);
|
||||||
|
static::assertSame('/subfolder/tpl/default', $this->assignedValues['asset_path']);
|
||||||
|
|
||||||
static::assertSame('templateName', $this->assignedValues['plugins_includes']['render_includes']['target']);
|
static::assertSame('templateName', $this->assignedValues['plugins_includes']['render_includes']['target']);
|
||||||
static::assertTrue($this->assignedValues['plugins_includes']['render_includes']['loggedin']);
|
static::assertTrue($this->assignedValues['plugins_includes']['render_includes']['loggedin']);
|
||||||
|
@ -153,7 +149,7 @@ public function testRedirectFromRefererWithMatchingLoopTermInPath(): void
|
||||||
$result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'controller']);
|
$result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'controller']);
|
||||||
|
|
||||||
static::assertSame(302, $result->getStatusCode());
|
static::assertSame(302, $result->getStatusCode());
|
||||||
static::assertSame(['/subfolder'], $result->getHeader('location'));
|
static::assertSame(['/subfolder/'], $result->getHeader('location'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -168,7 +164,7 @@ public function testRedirectFromRefererWithMatchingLoopTermInQueryParam(): void
|
||||||
$result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'other']);
|
$result = $this->controller->redirectFromReferer($this->request, $response, ['nope', 'other']);
|
||||||
|
|
||||||
static::assertSame(302, $result->getStatusCode());
|
static::assertSame(302, $result->getStatusCode());
|
||||||
static::assertSame(['/subfolder'], $result->getHeader('location'));
|
static::assertSame(['/subfolder/'], $result->getHeader('location'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -8,7 +8,7 @@
|
||||||
{include="page.header"}
|
{include="page.header"}
|
||||||
<div id="pageError" class="page-error-container center">
|
<div id="pageError" class="page-error-container center">
|
||||||
<h2>{'Sorry, nothing to see here.'|t}</h2>
|
<h2>{'Sorry, nothing to see here.'|t}</h2>
|
||||||
<img src="img/sad_star.png" alt="">
|
<img src="{$asset_path}/img/sad_star.png#" alt="">
|
||||||
<p>{$error_message}</p>
|
<p>{$error_message}</p>
|
||||||
</div>
|
</div>
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="pure-u-lg-1-3 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-3 pure-u-1-24"></div>
|
||||||
<div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
|
<div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
|
||||||
<h2 class="window-title">{"Shaare a new link"|t}</h2>
|
<h2 class="window-title">{"Shaare a new link"|t}</h2>
|
||||||
<form method="GET" action="./shaare" name="addform" class="addform">
|
<form method="GET" action="{$base_path}/shaare" name="addform" class="addform">
|
||||||
<div>
|
<div>
|
||||||
<label for="shaare">{'URL or leave empty to post a note'|t}</label>
|
<label for="shaare">{'URL or leave empty to post a note'|t}</label>
|
||||||
<input type="text" name="post" id="shaare" class="autofocus">
|
<input type="text" name="post" id="shaare" class="autofocus">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="pure-u-lg-1-3 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-3 pure-u-1-24"></div>
|
||||||
<div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
|
<div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
|
||||||
<h2 class="window-title">{"Change password"|t}</h2>
|
<h2 class="window-title">{"Change password"|t}</h2>
|
||||||
<form method="POST" action="#" name="changepasswordform" id="changepasswordform">
|
<form method="POST" action="{$base_path}/password" name="changepasswordform" id="changepasswordform">
|
||||||
<div>
|
<div>
|
||||||
<input type="password" name="oldpassword" aria-label="{'Current password'|t}" placeholder="{'Current password'|t}" class="autofocus">
|
<input type="password" name="oldpassword" aria-label="{'Current password'|t}" placeholder="{'Current password'|t}" class="autofocus">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="pure-u-lg-1-3 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-3 pure-u-1-24"></div>
|
||||||
<div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
|
<div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
|
||||||
<h2 class="window-title">{"Manage tags"|t}</h2>
|
<h2 class="window-title">{"Manage tags"|t}</h2>
|
||||||
<form method="POST" action="#" name="changetag" id="changetag">
|
<form method="POST" action="{$base_path}/manage-tags" name="changetag" id="changetag">
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="fromtag" aria-label="{'Tag'|t}" placeholder="{'Tag'|t}" value="{$fromtag}"
|
<input type="text" name="fromtag" aria-label="{'Tag'|t}" placeholder="{'Tag'|t}" value="{$fromtag}"
|
||||||
list="tagsList" autocomplete="off" class="awesomplete autofocus" data-minChars="1">
|
list="tagsList" autocomplete="off" class="awesomplete autofocus" data-minChars="1">
|
||||||
|
@ -32,7 +32,7 @@ <h2 class="window-title">{"Manage tags"|t}</h2>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p>{'You can also edit tags in the'|t} <a href="./tag-list?sort=usage">{'tag list'|t}</a>.</p>
|
<p>{'You can also edit tags in the'|t} <a href="{$base_path}/tag-list?sort=usage">{'tag list'|t}</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{$ratioInput='7-12'}
|
{$ratioInput='7-12'}
|
||||||
{$ratioInputMobile='1-8'}
|
{$ratioInputMobile='1-8'}
|
||||||
|
|
||||||
<form method="POST" action="#" name="configform" id="configform">
|
<form method="POST" action="{$base_path}/configure" name="configform" id="configform">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
|
||||||
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
|
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
|
||||||
|
@ -35,7 +35,7 @@ <h2 class="window-title">{'Configure'|t}</h2>
|
||||||
<div class="form-label">
|
<div class="form-label">
|
||||||
<label for="titleLink">
|
<label for="titleLink">
|
||||||
<span class="label-name">{'Home link'|t}</span><br>
|
<span class="label-name">{'Home link'|t}</span><br>
|
||||||
<span class="label-desc">{'Default value'|t}: ./</span>
|
<span class="label-desc">{'Default value'|t}: {$base_path}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -289,7 +289,7 @@ <h2 class="window-title">{'Configure'|t}</h2>
|
||||||
{if="! $gd_enabled"}
|
{if="! $gd_enabled"}
|
||||||
{'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t}
|
{'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t}
|
||||||
{elseif="$thumbnails_enabled"}
|
{elseif="$thumbnails_enabled"}
|
||||||
<a href="./?do=thumbs_update">{'Synchronize thumbnails'|t}</a>
|
<a href="{$base_path}/?do=thumbs_update">{'Synchronize thumbnails'|t}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor" id="daily">
|
<div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor" id="daily">
|
||||||
<h2 class="window-title">
|
<h2 class="window-title">
|
||||||
{'The Daily Shaarli'|t}
|
{'The Daily Shaarli'|t}
|
||||||
<a href="./daily-rss" title="{'1 RSS entry per day'|t}"><i class="fa fa-rss"></i></a>
|
<a href="{$base_path}/daily-rss" title="{'1 RSS entry per day'|t}"><i class="fa fa-rss"></i></a>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div id="plugin_zone_start_daily" class="plugin_zone">
|
<div id="plugin_zone_start_daily" class="plugin_zone">
|
||||||
|
@ -25,7 +25,7 @@ <h2 class="window-title">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-lg-1-3 pure-u-1 center">
|
<div class="pure-u-lg-1-3 pure-u-1 center">
|
||||||
{if="$previousday"}
|
{if="$previousday"}
|
||||||
<a href="./daily?day={$previousday}">
|
<a href="{$base_path}/daily?day={$previousday}">
|
||||||
<i class="fa fa-arrow-left"></i>
|
<i class="fa fa-arrow-left"></i>
|
||||||
{'Previous day'|t}
|
{'Previous day'|t}
|
||||||
</a>
|
</a>
|
||||||
|
@ -36,7 +36,7 @@ <h2 class="window-title">
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-lg-1-3 pure-u-1 center">
|
<div class="pure-u-lg-1-3 pure-u-1 center">
|
||||||
{if="$nextday"}
|
{if="$nextday"}
|
||||||
<a href="./daily?day={$nextday}">
|
<a href="{$base_path}/daily?day={$nextday}">
|
||||||
{'Next day'|t}
|
{'Next day'|t}
|
||||||
<i class="fa fa-arrow-right"></i>
|
<i class="fa fa-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -69,7 +69,7 @@ <h3 class="window-subtitle">
|
||||||
{$link=$value}
|
{$link=$value}
|
||||||
<div class="daily-entry">
|
<div class="daily-entry">
|
||||||
<div class="daily-entry-title center">
|
<div class="daily-entry-title center">
|
||||||
<a href="./?{$link.shorturl}" title="{'Permalink'|t}">
|
<a href="{$base_path}/?{$link.shorturl}" title="{'Permalink'|t}">
|
||||||
<i class="fa fa-link"></i>
|
<i class="fa fa-link"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="{$link.real_url}">{$link.title}</a>
|
<a href="{$link.real_url}">{$link.title}</a>
|
||||||
|
@ -116,7 +116,7 @@ <h3 class="window-subtitle">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/thumbnails.min.js?v={$version_hash}"></script>
|
<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="pure-u-lg-1-5 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-5 pure-u-1-24"></div>
|
||||||
<form method="post"
|
<form method="post"
|
||||||
name="linkform"
|
name="linkform"
|
||||||
action="./shaare"
|
action="{$base_path}/shaare"
|
||||||
class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light"
|
class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light"
|
||||||
>
|
>
|
||||||
<h2 class="window-title">
|
<h2 class="window-title">
|
||||||
|
@ -73,7 +73,7 @@ <h2 class="window-title">
|
||||||
<input type="submit" name="save_edit" class="" id="button-save-edit"
|
<input type="submit" name="save_edit" class="" id="button-save-edit"
|
||||||
value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}">
|
value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}">
|
||||||
{if="!$link_is_new"}
|
{if="!$link_is_new"}
|
||||||
<a href="?delete_link&lf_linkdate={$link.id}&token={$token}"
|
<a href="{$base_path}/?delete_link&lf_linkdate={$link.id}&token={$token}"
|
||||||
title="" name="delete_link" class="button button-red confirm-delete">
|
title="" name="delete_link" class="button button-red confirm-delete">
|
||||||
{'Delete'|t}
|
{'Delete'|t}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -15,7 +15,7 @@ <h2>{$message}</h2>
|
||||||
</pre>
|
</pre>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<img src="img/sad_star.png" alt="">
|
<img src="{asset_path}/img/sad_star.png#" alt="">
|
||||||
</div>
|
</div>
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<body>
|
<body>
|
||||||
{include="page.header"}
|
{include="page.header"}
|
||||||
|
|
||||||
<form method="GET" action="#" name="exportform" id="exportform">
|
<form method="GET" action="{$base_path}/?do=export" name="exportform" id="exportform">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-lg-1-4 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-4 pure-u-1-24"></div>
|
||||||
<div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
|
<div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<body>
|
<body>
|
||||||
{include="page.header"}
|
{include="page.header"}
|
||||||
|
|
||||||
<form method="POST" action="./?do=import" enctype="multipart/form-data" name="uploadform" id="uploadform">
|
<form method="POST" action="{$base_path}/?do=import" enctype="multipart/form-data" name="uploadform" id="uploadform">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-lg-1-4 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-4 pure-u-1-24"></div>
|
||||||
<div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
|
<div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
<meta name="referrer" content="same-origin">
|
<meta name="referrer" content="same-origin">
|
||||||
<link rel="alternate" type="application/atom+xml" href="{$feedurl}feed-atom?{$searchcrits}#" title="ATOM Feed" />
|
<link rel="alternate" type="application/atom+xml" href="{$feedurl}feed-atom?{$searchcrits}#" title="ATOM Feed" />
|
||||||
<link rel="alternate" type="application/rss+xml" href="{$feedurl}feed-rss?{$searchcrits}#" title="RSS Feed" />
|
<link rel="alternate" type="application/rss+xml" href="{$feedurl}feed-rss?{$searchcrits}#" title="RSS Feed" />
|
||||||
<link href="img/favicon.png" rel="shortcut icon" type="image/png" />
|
<link href="{$asset_path}/img/favicon.png#" rel="shortcut icon" type="image/png" />
|
||||||
<link href="img/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" />
|
<link href="{$asset_path}/img/apple-touch-icon.png#" rel="apple-touch-icon" sizes="180x180" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/shaarli.min.css?v={$version_hash}" />
|
<link type="text/css" rel="stylesheet" href="{$asset_path}/css/shaarli.min.css?v={$version_hash}#" />
|
||||||
{if="$formatter==='markdown'"}
|
{if="$formatter==='markdown'"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/markdown.min.css?v={$version_hash}" />
|
<link type="text/css" rel="stylesheet" href="{$asset_path}/css/markdown.min.css?v={$version_hash}#" />
|
||||||
{/if}
|
{/if}
|
||||||
{loop="$plugins_includes.css_files"}
|
{loop="$plugins_includes.css_files"}
|
||||||
<link type="text/css" rel="stylesheet" href="{$value}?v={$version_hash}#"/>
|
<link type="text/css" rel="stylesheet" href="{$value}?v={$version_hash}#"/>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
{if="is_file('data/user.css')"}
|
{if="is_file('data/user.css')"}
|
||||||
<link type="text/css" rel="stylesheet" href="data/user.css#" />
|
<link type="text/css" rel="stylesheet" href="data/user.css#" />
|
||||||
{/if}
|
{/if}
|
||||||
<link rel="search" type="application/opensearchdescription+xml" href="./open-search#"
|
<link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#"
|
||||||
title="Shaarli search - {$shaarlititle}" />
|
title="Shaarli search - {$shaarlititle}" />
|
||||||
{if="! empty($links) && count($links) === 1"}
|
{if="! empty($links) && count($links) === 1"}
|
||||||
{$link=reset($links)}
|
{$link=reset($links)}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{$ratioLabelMobile='7-8'}
|
{$ratioLabelMobile='7-8'}
|
||||||
{$ratioInputMobile='1-8'}
|
{$ratioInputMobile='1-8'}
|
||||||
|
|
||||||
<form method="POST" action="#" name="installform" id="installform">
|
<form method="POST" action="{$base_path}/?do=install" name="installform" id="installform">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-lg-1-6 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-6 pure-u-1-24"></div>
|
||||||
<div class="pure-u-lg-2-3 pure-u-22-24 page-form page-form-complete">
|
<div class="pure-u-lg-2-3 pure-u-22-24 page-form page-form-complete">
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
{'tagged'|t}
|
{'tagged'|t}
|
||||||
{loop="$exploded_tags"}
|
{loop="$exploded_tags"}
|
||||||
<span class="label label-tag" title="{'Remove tag'|t}">
|
<span class="label label-tag" title="{'Remove tag'|t}">
|
||||||
<a href="./remove-tag/{function="urlencode($value)"}" aria-label="{'Remove tag'|t}">
|
<a href="{$base_path}/remove-tag/{function="urlencode($value)"}" aria-label="{'Remove tag'|t}">
|
||||||
{$value}<span class="remove"><i class="fa fa-times" aria-hidden="true"></i></span>
|
{$value}<span class="remove"><i class="fa fa-times" aria-hidden="true"></i></span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -183,7 +183,7 @@ <h2>
|
||||||
{$tag_counter=count($value.taglist)}
|
{$tag_counter=count($value.taglist)}
|
||||||
{loop="value.taglist"}
|
{loop="value.taglist"}
|
||||||
<span class="label label-tag" title="{$strAddTag}">
|
<span class="label label-tag" title="{$strAddTag}">
|
||||||
<a href="./add-tag/{$value|urlencode}">{$value}</a>
|
<a href="{$base_path}/add-tag/{$value|urlencode}">{$value}</a>
|
||||||
</span>
|
</span>
|
||||||
{if="$tag_counter - 1 != $counter"}·{/if}
|
{if="$tag_counter - 1 != $counter"}·{/if}
|
||||||
{/loop}
|
{/loop}
|
||||||
|
@ -198,16 +198,16 @@ <h2>
|
||||||
<input type="checkbox" class="link-checkbox" value="{$value.id}">
|
<input type="checkbox" class="link-checkbox" value="{$value.id}">
|
||||||
</span>
|
</span>
|
||||||
<span class="linklist-item-infos-controls-item ctrl-edit">
|
<span class="linklist-item-infos-controls-item ctrl-edit">
|
||||||
<a href="?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a>
|
<a href="{$base_path}/?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a>
|
||||||
</span>
|
</span>
|
||||||
<span class="linklist-item-infos-controls-item ctrl-delete">
|
<span class="linklist-item-infos-controls-item ctrl-delete">
|
||||||
<a href="?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}"
|
<a href="{$base_path}/?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}"
|
||||||
title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete">
|
title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete">
|
||||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="linklist-item-infos-controls-item ctrl-pin">
|
<span class="linklist-item-infos-controls-item ctrl-pin">
|
||||||
<a href="./?do=pin&id={$value.id}&token={$token}"
|
<a href="{$base_path}/?do=pin&id={$value.id}&token={$token}"
|
||||||
title="{$strToggleSticky}" aria-label="{$strToggleSticky}" class="pin-link {if="$value.sticky"}pinned-link{/if} pure-u-0 pure-u-lg-visible">
|
title="{$strToggleSticky}" aria-label="{$strToggleSticky}" class="pin-link {if="$value.sticky"}pinned-link{/if} pure-u-0 pure-u-lg-visible">
|
||||||
<i class="fa fa-thumb-tack" aria-hidden="true"></i>
|
<i class="fa fa-thumb-tack" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -224,7 +224,7 @@ <h2>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
<a href="?{$value.shorturl}" title="{$strPermalink}">
|
<a href="{$base_path}/?{$value.shorturl}" title="{$strPermalink}">
|
||||||
{if="!$hide_timestamps || $is_logged_in"}
|
{if="!$hide_timestamps || $is_logged_in"}
|
||||||
{$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink}
|
{$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink}
|
||||||
<span class="linkdate" title="{$updated}">
|
<span class="linkdate" title="{$updated}">
|
||||||
|
@ -267,12 +267,12 @@ <h2>
|
||||||
{/if}
|
{/if}
|
||||||
{if="$is_logged_in"}
|
{if="$is_logged_in"}
|
||||||
·
|
·
|
||||||
<a href="?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}"
|
<a href="{$base_path}/?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}"
|
||||||
title="{$strDelete}" class="delete-link confirm-delete">
|
title="{$strDelete}" class="delete-link confirm-delete">
|
||||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
·
|
·
|
||||||
<a href="?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a>
|
<a href="{$base_path}/?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -297,6 +297,6 @@ <h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/thumbnails.min.js?v={$version_hash}"></script>
|
<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
{'Filters'|t}
|
{'Filters'|t}
|
||||||
</span>
|
</span>
|
||||||
{if="$is_logged_in"}
|
{if="$is_logged_in"}
|
||||||
<a href="./visibility/private" aria-label="{'Only display private links'|t}" title="{'Only display private links'|t}"
|
<a href="{$base_path}/visibility/private" aria-label="{'Only display private links'|t}" title="{'Only display private links'|t}"
|
||||||
class="{if="$visibility==='private'"}filter-on{else}filter-off{/if}"
|
class="{if="$visibility==='private'"}filter-on{else}filter-off{/if}"
|
||||||
><i class="fa fa-user-secret" aria-hidden="true"></i></a>
|
><i class="fa fa-user-secret" aria-hidden="true"></i></a>
|
||||||
<a href="./visibility/public" aria-label="{'Only display public links'|t}" title="{'Only display public links'|t}"
|
<a href="{$base_path}/visibility/public" aria-label="{'Only display public links'|t}" title="{'Only display public links'|t}"
|
||||||
class="{if="$visibility==='public'"}filter-on{else}filter-off{/if}"
|
class="{if="$visibility==='public'"}filter-on{else}filter-off{/if}"
|
||||||
><i class="fa fa-globe" aria-hidden="true"></i></a>
|
><i class="fa fa-globe" aria-hidden="true"></i></a>
|
||||||
{/if}
|
{/if}
|
||||||
<a href="./untagged-only" aria-label="{'Filter untagged links'|t}" title="{'Filter untagged links'|t}"
|
<a href="{$base_path}/untagged-only" aria-label="{'Filter untagged links'|t}" title="{'Filter untagged links'|t}"
|
||||||
class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if}
|
class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if}
|
||||||
><i class="fa fa-tag" aria-hidden="true"></i></a>
|
><i class="fa fa-tag" aria-hidden="true"></i></a>
|
||||||
<a href="#" aria-label="{'Select all'|t}" title="{'Select all'|t}"
|
<a href="#" aria-label="{'Select all'|t}" title="{'Select all'|t}"
|
||||||
|
@ -53,10 +53,10 @@
|
||||||
|
|
||||||
<div class="linksperpage pure-u-1-3">
|
<div class="linksperpage pure-u-1-3">
|
||||||
<div class="pure-u-0 pure-u-lg-visible">{'Links per page'|t}</div>
|
<div class="pure-u-0 pure-u-lg-visible">{'Links per page'|t}</div>
|
||||||
<a href="./links-per-page?nb=20">20</a>
|
<a href="{$base_path}/links-per-page?nb=20">20</a>
|
||||||
<a href="./links-per-page?nb=50">50</a>
|
<a href="{$base_path}/links-per-page?nb=50">50</a>
|
||||||
<a href="./links-per-page?nb=100">100</a>
|
<a href="{$base_path}/links-per-page?nb=100">100</a>
|
||||||
<form method="GET" class="pure-u-0 pure-u-lg-visible" action="./links-per-page">
|
<form method="GET" class="pure-u-0 pure-u-lg-visible" action="{$base_path}/links-per-page">
|
||||||
<input type="text" name="nb" placeholder="133">
|
<input type="text" name="nb" placeholder="133">
|
||||||
</form>
|
</form>
|
||||||
<a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" aria-label="{'Fold all'|t}" title="{'Fold all'|t}">
|
<a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" aria-label="{'Fold all'|t}" title="{'Fold all'|t}">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
·
|
·
|
||||||
{'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} ·
|
{'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} ·
|
||||||
<a href="doc/html/index.html" rel="nofollow">{'Documentation'|t}</a>
|
<a href="{$base_path}/doc/html/index.html" rel="nofollow">{'Documentation'|t}</a>
|
||||||
{loop="$plugins_footer.text"}
|
{loop="$plugins_footer.text"}
|
||||||
{$value}
|
{$value}
|
||||||
{/loop}
|
{/loop}
|
||||||
|
@ -39,4 +39,5 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/shaarli.min.js?v={$version_hash}"></script>
|
<input type="hidden" name="js_base_path" value="{$base_path}" />
|
||||||
|
<script src="{$asset_path}/js/shaarli.min.js?v={$version_hash}#"></script>
|
||||||
|
|
|
@ -21,24 +21,24 @@
|
||||||
</li>
|
</li>
|
||||||
{if="$is_logged_in || $openshaarli"}
|
{if="$is_logged_in || $openshaarli"}
|
||||||
<li class="pure-menu-item">
|
<li class="pure-menu-item">
|
||||||
<a href="./add-shaare" class="pure-menu-link" id="shaarli-menu-shaare">
|
<a href="{$base_path}/add-shaare" class="pure-menu-link" id="shaarli-menu-shaare">
|
||||||
<i class="fa fa-plus" aria-hidden="true"></i> {'Shaare'|t}
|
<i class="fa fa-plus" aria-hidden="true"></i> {'Shaare'|t}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="pure-menu-item" id="shaarli-menu-tools">
|
<li class="pure-menu-item" id="shaarli-menu-tools">
|
||||||
<a href="./tools" class="pure-menu-link">{'Tools'|t}</a>
|
<a href="{$base_path}/tools" class="pure-menu-link">{'Tools'|t}</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
<li class="pure-menu-item" id="shaarli-menu-tags">
|
<li class="pure-menu-item" id="shaarli-menu-tags">
|
||||||
<a href="./tag-cloud" class="pure-menu-link">{'Tag cloud'|t}</a>
|
<a href="{$base_path}/tag-cloud" class="pure-menu-link">{'Tag cloud'|t}</a>
|
||||||
</li>
|
</li>
|
||||||
{if="$thumbnails_enabled"}
|
{if="$thumbnails_enabled"}
|
||||||
<li class="pure-menu-item" id="shaarli-menu-picwall">
|
<li class="pure-menu-item" id="shaarli-menu-picwall">
|
||||||
<a href="./picture-wall?{function="ltrim($searchcrits, '&')"}" class="pure-menu-link">{'Picture wall'|t}</a>
|
<a href="{$base_path}/picture-wall?{function="ltrim($searchcrits, '&')"}" class="pure-menu-link">{'Picture wall'|t}</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
<li class="pure-menu-item" id="shaarli-menu-daily">
|
<li class="pure-menu-item" id="shaarli-menu-daily">
|
||||||
<a href="./daily" class="pure-menu-link">{'Daily'|t}</a>
|
<a href="{$base_path}/daily" class="pure-menu-link">{'Daily'|t}</a>
|
||||||
</li>
|
</li>
|
||||||
{loop="$plugins_header.buttons_toolbar"}
|
{loop="$plugins_header.buttons_toolbar"}
|
||||||
<li class="pure-menu-item shaarli-menu-plugin">
|
<li class="pure-menu-item shaarli-menu-plugin">
|
||||||
|
@ -52,15 +52,15 @@
|
||||||
</li>
|
</li>
|
||||||
{/loop}
|
{/loop}
|
||||||
<li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-rss">
|
<li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-rss">
|
||||||
<a href="./feed-{$feed_type}?{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a>
|
<a href="{$base_path}/feed-{$feed_type}?{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a>
|
||||||
</li>
|
</li>
|
||||||
{if="$is_logged_in"}
|
{if="$is_logged_in"}
|
||||||
<li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-logout">
|
<li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-logout">
|
||||||
<a href="./logout" class="pure-menu-link">{'Logout'|t}</a>
|
<a href="{$base_path}/logout" class="pure-menu-link">{'Logout'|t}</a>
|
||||||
</li>
|
</li>
|
||||||
{else}
|
{else}
|
||||||
<li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-login">
|
<li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-login">
|
||||||
<a href="./login" class="pure-menu-link">{'Login'|t}</a>
|
<a href="{$base_path}/login" class="pure-menu-link">{'Login'|t}</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -74,13 +74,13 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="pure-menu-item" id="shaarli-menu-desktop-rss">
|
<li class="pure-menu-item" id="shaarli-menu-desktop-rss">
|
||||||
<a href="./feed-{$feed_type}?{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}" aria-label="{'RSS Feed'|t}">
|
<a href="{$base_path}/feed-{$feed_type}?{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}" aria-label="{'RSS Feed'|t}">
|
||||||
<i class="fa fa-rss" aria-hidden="true"></i>
|
<i class="fa fa-rss" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{if="!$is_logged_in"}
|
{if="!$is_logged_in"}
|
||||||
<li class="pure-menu-item" id="shaarli-menu-desktop-login">
|
<li class="pure-menu-item" id="shaarli-menu-desktop-login">
|
||||||
<a href="./login" class="pure-menu-link"
|
<a href="{$base_path}/login" class="pure-menu-link"
|
||||||
data-open-id="header-login-form"
|
data-open-id="header-login-form"
|
||||||
id="login-button" aria-label="{'Login'|t}" title="{'Login'|t}">
|
id="login-button" aria-label="{'Login'|t}" title="{'Login'|t}">
|
||||||
<i class="fa fa-user" aria-hidden="true"></i>
|
<i class="fa fa-user" aria-hidden="true"></i>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
</li>
|
</li>
|
||||||
{else}
|
{else}
|
||||||
<li class="pure-menu-item" id="shaarli-menu-desktop-logout">
|
<li class="pure-menu-item" id="shaarli-menu-desktop-logout">
|
||||||
<a href="./logout" class="pure-menu-link" aria-label="{'Logout'|t}" title="{'Logout'|t}">
|
<a href="{$base_path}/logout" class="pure-menu-link" aria-label="{'Logout'|t}" title="{'Logout'|t}">
|
||||||
<i class="fa fa-sign-out" aria-hidden="true"></i>
|
<i class="fa fa-sign-out" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{if="count($linksToDisplay)===0 && $is_logged_in"}
|
{if="count($linksToDisplay)===0 && $is_logged_in"}
|
||||||
<div class="pure-g pure-alert pure-alert-warning page-single-alert">
|
<div class="pure-g pure-alert pure-alert-warning page-single-alert">
|
||||||
<div class="pure-u-1 center">
|
<div class="pure-u-1 center">
|
||||||
{'There is no cached thumbnail. Try to <a href="./?do=thumbs_update">synchronize them</a>.'|t}
|
{'There is no cached thumbnail. Try to <a href="{$base_path}/do=thumbs_update">synchronize them</a>.'|t}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -52,7 +52,7 @@ <h2 class="window-title">{'Picture Wall'|t} - {$countPics} {'pics'|t}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/thumbnails.min.js?v={$version_hash}"></script>
|
<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
<form method="POST" action="./?do=save_pluginadmin" name="pluginform" id="pluginform" class="pluginform-container">
|
<form method="POST" action="{$base_path}/?do=save_pluginadmin" name="pluginform" id="pluginform" class="pluginform-container">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
|
||||||
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
|
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
|
||||||
|
@ -127,7 +127,7 @@ <h3 class="window-subtitle">{'Disabled Plugins'|t}</h3>
|
||||||
<input type="hidden" name="token" value="{$token}">
|
<input type="hidden" name="token" value="{$token}">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form action="./?do=save_pluginadmin" method="POST">
|
<form action="{$base_path}/?do=save_pluginadmin" method="POST">
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
|
<div class="pure-u-lg-1-8 pure-u-1-24"></div>
|
||||||
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-light">
|
<div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-light">
|
||||||
|
@ -176,7 +176,7 @@ <h3 class="window-subtitle">{function="str_replace('_', ' ', $key)"}</h3>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/pluginsadmin.min.js?v={$version_hash}"></script>
|
<script src="{$asset_path}/js/pluginsadmin.min.js?v={$version_hash}#"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<h2 class="window-title">{'Tag cloud'|t} - {$countTags} {'tags'|t}</h2>
|
<h2 class="window-title">{'Tag cloud'|t} - {$countTags} {'tags'|t}</h2>
|
||||||
{if="!empty($search_tags)"}
|
{if="!empty($search_tags)"}
|
||||||
<p class="center">
|
<p class="center">
|
||||||
<a href="./?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
|
<a href="{$base_path}/?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
|
||||||
{'List all links with those tags'|t}
|
{'List all links with those tags'|t}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -48,8 +48,8 @@ <h2 class="window-title">{'Tag cloud'|t} - {$countTags} {'tags'|t}</h2>
|
||||||
|
|
||||||
<div id="cloudtag" class="cloudtag-container">
|
<div id="cloudtag" class="cloudtag-container">
|
||||||
{loop="tags"}
|
{loop="tags"}
|
||||||
<a href="./?searchtags={$key|urlencode} {$search_tags|urlencode}" style="font-size:{$value.size}em;">{$key}</a
|
<a href="{$base_path}/?searchtags={$key|urlencode} {$search_tags|urlencode}" style="font-size:{$value.size}em;">{$key}</a
|
||||||
><a href="./add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value.count}</a>
|
><a href="{$base_path}/add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value.count}</a>
|
||||||
{loop="$value.tag_plugin"}
|
{loop="$value.tag_plugin"}
|
||||||
{$value}
|
{$value}
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<h2 class="window-title">{'Tag list'|t} - {$countTags} {'tags'|t}</h2>
|
<h2 class="window-title">{'Tag list'|t} - {$countTags} {'tags'|t}</h2>
|
||||||
{if="!empty($search_tags)"}
|
{if="!empty($search_tags)"}
|
||||||
<p class="center">
|
<p class="center">
|
||||||
<a href="./?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
|
<a href="{$base_path}/?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
|
||||||
{'List all links with those tags'|t}
|
{'List all links with those tags'|t}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -51,13 +51,13 @@ <h2 class="window-title">{'Tag list'|t} - {$countTags} {'tags'|t}</h2>
|
||||||
<div class="pure-u-1">
|
<div class="pure-u-1">
|
||||||
{if="$is_logged_in===true"}
|
{if="$is_logged_in===true"}
|
||||||
<a href="#" class="delete-tag" aria-label="{'Delete'|t}"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
<a href="#" class="delete-tag" aria-label="{'Delete'|t}"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||||
<a href="./manage-tags?fromtag={$key|urlencode}" class="rename-tag" aria-label="{'Rename tag'|t}">
|
<a href="{$base_path}/manage-tags?fromtag={$key|urlencode}" class="rename-tag" aria-label="{'Rename tag'|t}">
|
||||||
<i class="fa fa-pencil-square-o {$key}" aria-hidden="true"></i>
|
<i class="fa fa-pencil-square-o {$key}" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<a href="./add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value}</a>
|
<a href="{$base_path}/add-tag/{$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value}</a>
|
||||||
<a href="./?searchtags={$key|urlencode} {$search_tags|urlencode}" class="tag-link">{$key}</a>
|
<a href="{$base_path}/?searchtags={$key|urlencode} {$search_tags|urlencode}" class="tag-link">{$key}</a>
|
||||||
|
|
||||||
{loop="$value.tag_plugin"}
|
{loop="$value.tag_plugin"}
|
||||||
{$value}
|
{$value}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-1 pure-alert pure-alert-success tag-sort">
|
<div class="pure-u-1 pure-alert pure-alert-success tag-sort">
|
||||||
{'Sort by:'|t}
|
{'Sort by:'|t}
|
||||||
<a href="./tag-cloud">{'Cloud'|t}</a> ·
|
<a href="{$base_path}/tag-cloud">{'Cloud'|t}</a> ·
|
||||||
<a href="./tag-list?sort=usage">{'Most used'|t}</a> ·
|
<a href="{$base_path}/tag-list?sort=usage">{'Most used'|t}</a> ·
|
||||||
<a href="./tag-list?sort=alpha">{'Alphabetical'|t}</a>
|
<a href="{$base_path}/tag-list?sort=alpha">{'Alphabetical'|t}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -43,6 +43,6 @@ <h2 class="window-title">{'Thumbnails update'|t}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/thumbnails_update.min.js?v={$version_hash}"></script>
|
<script src="{$asset_path}/js/thumbnails_update.min.js?v={$version_hash}#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -11,35 +11,35 @@
|
||||||
<div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light">
|
<div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light">
|
||||||
<h2 class="window-title">{'Settings'|t}</h2>
|
<h2 class="window-title">{'Settings'|t}</h2>
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
<a href="./configure" title="{'Change Shaarli settings: title, timezone, etc.'|t}">
|
<a href="{$base_path}/configure" title="{'Change Shaarli settings: title, timezone, etc.'|t}">
|
||||||
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Configure your Shaarli'|t}</span>
|
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Configure your Shaarli'|t}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
<a href="./?do=pluginadmin" title="{'Enable, disable and configure plugins'|t}">
|
<a href="{$base_path}/?do=pluginadmin" title="{'Enable, disable and configure plugins'|t}">
|
||||||
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Plugin administration'|t}</span>
|
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Plugin administration'|t}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{if="!$openshaarli"}
|
{if="!$openshaarli"}
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
<a href="./?do=changepasswd" title="{'Change your password'|t}">
|
<a href="{$base_path}/?do=changepasswd" title="{'Change your password'|t}">
|
||||||
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Change password'|t}</span>
|
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Change password'|t}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
<a href="./manage-tags" title="{'Rename or delete a tag in all links'|t}">
|
<a href="{$base_path}/manage-tags" title="{'Rename or delete a tag in all links'|t}">
|
||||||
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Manage tags'|t}</span>
|
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Manage tags'|t}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
<a href="./?do=import"
|
<a href="{$base_path}/?do=import"
|
||||||
title="{'Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, delicious...)'|t}">
|
title="{'Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, delicious...)'|t}">
|
||||||
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Import links'|t}</span>
|
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Import links'|t}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
<a href="./?do=export"
|
<a href="{$base_path}/?do=export"
|
||||||
title="{'Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)'|t}">
|
title="{'Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)'|t}">
|
||||||
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Export database'|t}</span>
|
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Export database'|t}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -47,7 +47,7 @@ <h2 class="window-title">{'Settings'|t}</h2>
|
||||||
|
|
||||||
{if="$thumbnails_enabled"}
|
{if="$thumbnails_enabled"}
|
||||||
<div class="tools-item">
|
<div class="tools-item">
|
||||||
<a href="./?do=thumbs_update" title="{'Synchronize all link thumbnails'|t}">
|
<a href="{$base_path}/?do=thumbs_update" title="{'Synchronize all link thumbnails'|t}">
|
||||||
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Synchronize thumbnails'|t}</span>
|
<span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Synchronize thumbnails'|t}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="error-container">
|
<div class="error-container">
|
||||||
<h1>404 Not found <small>Oh crap!</small></h1>
|
<h1>404 Not found <small>Oh crap!</small></h1>
|
||||||
<p>{$error_message}</p>
|
<p>{$error_message}</p>
|
||||||
<p>Would you mind <a href="?">clicking here</a>?</p>
|
<p>Would you mind <a href="{$base_path}/">clicking here</a>?</p>
|
||||||
</div>
|
</div>
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div id="pageheader">
|
<div id="pageheader">
|
||||||
{include="page.header"}
|
{include="page.header"}
|
||||||
<div id="headerform">
|
<div id="headerform">
|
||||||
<form method="GET" action="./shaare" name="addform" class="addform">
|
<form method="GET" action="{$base_path}/shaare" name="addform" class="addform">
|
||||||
<input type="text" name="post" class="linkurl">
|
<input type="text" name="post" class="linkurl">
|
||||||
<input type="submit" value="Add link" class="bigbutton">
|
<input type="submit" value="Add link" class="bigbutton">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Home link:</b></td>
|
<td><b>Home link:</b></td>
|
||||||
<td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label
|
<td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label
|
||||||
for="titleLink">(default value is: ./)</label></td>
|
for="titleLink">(default value is: {$base_path}/)</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
{if="! $gd_enabled"}
|
{if="! $gd_enabled"}
|
||||||
{'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t}
|
{'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t}
|
||||||
{elseif="$thumbnails_enabled"}
|
{elseif="$thumbnails_enabled"}
|
||||||
<a href="./?do=thumbs_update">{'Synchonize thumbnails'|t}</a>
|
<a href="{$base_path}/?do=thumbs_update">{'Synchonize thumbnails'|t}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
|
|
||||||
<div class="dailyAbout">
|
<div class="dailyAbout">
|
||||||
All links of one day<br>in a single page.<br>
|
All links of one day<br>in a single page.<br>
|
||||||
{if="$previousday"} <a href="./daily&day={$previousday}"><b><</b>Previous day</a>{else}<b><</b>Previous day{/if}
|
{if="$previousday"} <a href="{$base_path}/daily&day={$previousday}"><b><</b>Previous day</a>{else}<b><</b>Previous day{/if}
|
||||||
-
|
-
|
||||||
{if="$nextday"}<a href="./daily&day={$nextday}">Next day<b>></b></a>{else}Next day<b>></b>{/if}
|
{if="$nextday"}<a href="{$base_path}/daily&day={$nextday}">Next day<b>></b></a>{else}Next day<b>></b>{/if}
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
{loop="$daily_about_plugin"}
|
{loop="$daily_about_plugin"}
|
||||||
|
@ -24,13 +24,13 @@
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a href="./daily-rss" title="1 RSS entry per day"><img src="img/feed-icon-14x14.png" alt="rss_feed">Daily RSS Feed</a>
|
<a href="{$base_path}/daily-rss" title="1 RSS entry per day"><img src="{$asset_path}/img/feed-icon-14x14.png#" alt="rss_feed">Daily RSS Feed</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dailyTitle">
|
<div class="dailyTitle">
|
||||||
<img src="img/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left">
|
<img src="{$asset_path}/img/floral_left.png#" width="51" height="50" class="nomobile" alt="floral_left">
|
||||||
The Daily Shaarli
|
The Daily Shaarli
|
||||||
<img src="img/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right">
|
<img src="{$asset_path}/img/floral_right.png#" width="51" height="50" class="nomobile" alt="floral_right">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dailyDate">
|
<div class="dailyDate">
|
||||||
|
@ -52,13 +52,13 @@
|
||||||
{$link=$value}
|
{$link=$value}
|
||||||
<div class="dailyEntry">
|
<div class="dailyEntry">
|
||||||
<div class="dailyEntryPermalink">
|
<div class="dailyEntryPermalink">
|
||||||
<a href="?{$value.shorturl}">
|
<a href="{$base_path}/?{$value.shorturl}">
|
||||||
<img src="img/squiggle.png" width="25" height="26" title="permalink" alt="permalink">
|
<img src="{$asset_path}/img/squiggle.png#" width="25" height="26" title="permalink" alt="permalink">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{if="!$hide_timestamps || $is_logged_in"}
|
{if="!$hide_timestamps || $is_logged_in"}
|
||||||
<div class="dailyEntryLinkdate">
|
<div class="dailyEntryLinkdate">
|
||||||
<a href="?{$value.shorturl}">{function="strftime('%c', $link.timestamp)"}</a>
|
<a href="{$base_path}/?{$value.shorturl}">{function="strftime('%c', $link.timestamp)"}</a>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if="$link.tags"}
|
{if="$link.tags"}
|
||||||
|
@ -101,9 +101,9 @@
|
||||||
{$value}
|
{$value}
|
||||||
{/loop}
|
{/loop}
|
||||||
</div>
|
</div>
|
||||||
<div id="closing"><img src="img/squiggle_closing.png" width="66" height="61" alt="-"></div>
|
<div id="closing"><img src="{$asset_path}/img/squiggle_closing.png#" width="66" height="61" alt="-"></div>
|
||||||
</div>
|
</div>
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/thumbnails.min.js?v={$version_hash}"></script>
|
<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<input type="submit" value="Save" name="save_edit" class="bigbutton">
|
<input type="submit" value="Save" name="save_edit" class="bigbutton">
|
||||||
{if="!$link_is_new && isset($link.id)"}
|
{if="!$link_is_new && isset($link.id)"}
|
||||||
<a href="?delete_link&lf_linkdate={$link.id}&token={$token}"
|
<a href="{$base_path}/?delete_link&lf_linkdate={$link.id}&token={$token}"
|
||||||
name="delete_link" class="bigbutton"
|
name="delete_link" class="bigbutton"
|
||||||
onClick="return confirmDeleteLink();">
|
onClick="return confirmDeleteLink();">
|
||||||
{'Delete'|t}
|
{'Delete'|t}
|
||||||
|
|
|
@ -18,7 +18,7 @@ <h1>Error</h1>
|
||||||
</pre>
|
</pre>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<p>Would you mind <a href="?">clicking here</a>?</p>
|
<p>Would you mind <a href="{$base_path}/">clicking here</a>?</p>
|
||||||
</div>
|
</div>
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{include="page.header"}
|
{include="page.header"}
|
||||||
<div id="uploaddiv">
|
<div id="uploaddiv">
|
||||||
Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize}).
|
Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize}).
|
||||||
<form method="POST" action="./?do=import" enctype="multipart/form-data"
|
<form method="POST" action="{$base_path}/?do=import" enctype="multipart/form-data"
|
||||||
name="uploadform" id="uploadform">
|
name="uploadform" id="uploadform">
|
||||||
<input type="hidden" name="token" value="{$token}">
|
<input type="hidden" name="token" value="{$token}">
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}">
|
<input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}">
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
||||||
<link type="text/css" rel="stylesheet" href="css/shaarli.min.css" />
|
<link type="text/css" rel="stylesheet" href="css/shaarli.min.css" />
|
||||||
{if="$formatter==='markdown'"}
|
{if="$formatter==='markdown'"}
|
||||||
<link type="text/css" rel="stylesheet" href="css/markdown.min.css?v={$version_hash}" />
|
<link type="text/css" rel="stylesheet" href="{$asset_path}/css/markdown.min.css?v={$version_hash}#" />
|
||||||
{/if}
|
{/if}
|
||||||
{loop="$plugins_includes.css_files"}
|
{loop="$plugins_includes.css_files"}
|
||||||
<link type="text/css" rel="stylesheet" href="{$value}#"/>
|
<link type="text/css" rel="stylesheet" href="{$value}#"/>
|
||||||
{/loop}
|
{/loop}
|
||||||
{if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if}
|
{if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if}
|
||||||
<link rel="search" type="application/opensearchdescription+xml" href="./open-search#"
|
<link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#"
|
||||||
title="Shaarli search - {$shaarlititle|htmlspecialchars}" />
|
title="Shaarli search - {$shaarlititle|htmlspecialchars}" />
|
||||||
{if="! empty($links) && count($links) === 1"}
|
{if="! empty($links) && count($links) === 1"}
|
||||||
{$link=reset($links)}
|
{$link=reset($links)}
|
||||||
|
|
|
@ -66,12 +66,12 @@
|
||||||
tagged
|
tagged
|
||||||
{loop="$exploded_tags"}
|
{loop="$exploded_tags"}
|
||||||
<span class="linktag" title="Remove tag">
|
<span class="linktag" title="Remove tag">
|
||||||
<a href="./remove-tag/{function="urlencode($value)"}">{$value} <span class="remove">x</span></a>
|
<a href="{$base_path}/remove-tag/{function="urlencode($value)"}">{$value} <span class="remove">x</span></a>
|
||||||
</span>
|
</span>
|
||||||
{/loop}
|
{/loop}
|
||||||
{elseif="$search_tags === false"}
|
{elseif="$search_tags === false"}
|
||||||
<span class="linktag" title="Remove tag">
|
<span class="linktag" title="Remove tag">
|
||||||
<a href="?">untagged <span class="remove">x</span></a>
|
<a href="{$base_path}/">untagged <span class="remove">x</span></a>
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,13 +95,13 @@
|
||||||
<div class="linkeditbuttons">
|
<div class="linkeditbuttons">
|
||||||
<form method="GET" class="buttoneditform">
|
<form method="GET" class="buttoneditform">
|
||||||
<input type="hidden" name="edit_link" value="{$value.id}">
|
<input type="hidden" name="edit_link" value="{$value.id}">
|
||||||
<input type="image" alt="Edit" src="img/edit_icon.png" title="Edit" class="button_edit">
|
<input type="image" alt="Edit" src="{$asset_path}/img/edit_icon.png#" title="Edit" class="button_edit">
|
||||||
</form><br>
|
</form><br>
|
||||||
<form method="GET" class="buttoneditform">
|
<form method="GET" class="buttoneditform">
|
||||||
<input type="hidden" name="lf_linkdate" value="{$value.id}">
|
<input type="hidden" name="lf_linkdate" value="{$value.id}">
|
||||||
<input type="hidden" name="token" value="{$token}">
|
<input type="hidden" name="token" value="{$token}">
|
||||||
<input type="hidden" name="delete_link">
|
<input type="hidden" name="delete_link">
|
||||||
<input type="image" alt="Delete" src="img/delete_icon.png" title="Delete"
|
<input type="image" alt="Delete" src="{$asset_path}/img/delete_icon.png#" title="Delete"
|
||||||
class="button_delete" onClick="return confirmDeleteLink();">
|
class="button_delete" onClick="return confirmDeleteLink();">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
{if="!$hide_timestamps || $is_logged_in"}
|
{if="!$hide_timestamps || $is_logged_in"}
|
||||||
{$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'}
|
{$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'}
|
||||||
<span class="linkdate" title="Permalink">
|
<span class="linkdate" title="Permalink">
|
||||||
<a href="?{$value.shorturl}">
|
<a href="{$base_path}/?{$value.shorturl}">
|
||||||
<span title="{$updated}">
|
<span title="{$updated}">
|
||||||
{$value.created|format_date}
|
{$value.created|format_date}
|
||||||
{if="$value.updated_timestamp"}*{/if}
|
{if="$value.updated_timestamp"}*{/if}
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
</a> -
|
</a> -
|
||||||
</span>
|
</span>
|
||||||
{else}
|
{else}
|
||||||
<span class="linkdate" title="Short link here"><a href="?{$value.shorturl}">permalink</a> - </span>
|
<span class="linkdate" title="Short link here"><a href="{$base_path}/?{$value.shorturl}">permalink</a> - </span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{loop="$value.link_plugin"}
|
{loop="$value.link_plugin"}
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
<a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
|
<a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
|
||||||
{if="$value.tags"}
|
{if="$value.tags"}
|
||||||
<div class="linktaglist">
|
<div class="linktaglist">
|
||||||
{loop="$value.taglist"}<span class="linktag" title="Add tag"><a href="./add-tag/{$value|urlencode}">{$value}</a></span> {/loop}
|
{loop="$value.taglist"}<span class="linktag" title="Add tag"><a href="{$base_path}/add-tag/{$value|urlencode}">{$value}</a></span> {/loop}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/thumbnails.min.js"></script>
|
<script src="{$asset_path}/js/thumbnails.min.js#"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<div class="paging">
|
<div class="paging">
|
||||||
{if="$is_logged_in"}
|
{if="$is_logged_in"}
|
||||||
<div class="paging_privatelinks">
|
<div class="paging_privatelinks">
|
||||||
<a href="./visibility/private">
|
<a href="{$base_path}/visibility/private">
|
||||||
{if="$visibility=='private'"}
|
{if="$visibility=='private'"}
|
||||||
<img src="img/private_16x16_active.png" width="16" height="16" title="Click to see all links" alt="Click to see all links">
|
<img src="{$asset_path}/img/private_16x16_active.png#" width="16" height="16" title="Click to see all links" alt="Click to see all links">
|
||||||
{else}
|
{else}
|
||||||
<img src="img/private_16x16.png" width="16" height="16" title="Click to see only private links" alt="Click to see only private links">
|
<img src="{$asset_path}/img/private_16x16.png#" width="16" height="16" title="Click to see only private links" alt="Click to see only private links">
|
||||||
{/if}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
{/loop}
|
{/loop}
|
||||||
<div class="paging_linksperpage">
|
<div class="paging_linksperpage">
|
||||||
Links per page:
|
Links per page:
|
||||||
<a href="./links-per-page?nb=20">20</a>
|
<a href="{$base_path}/links-per-page?nb=20">20</a>
|
||||||
<a href="./links-per-page?nb=50">50</a>
|
<a href="{$base_path}/links-per-page?nb=50">50</a>
|
||||||
<a href="./links-per-page?nb=100">100</a>
|
<a href="{$base_path}/links-per-page?nb=100">100</a>
|
||||||
<form method="GET" class="linksperpage" action="./links-per-page">
|
<form method="GET" class="linksperpage" action="{$base_path}/links-per-page">
|
||||||
<input type="text" name="nb" size="2">
|
<input type="text" name="nb" size="2">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<script src="js/shaarli.min.js"></script>
|
<script src="{$asset_path}/js/shaarli.min.js#"></script>
|
||||||
|
|
||||||
{if="$is_logged_in"}
|
{if="$is_logged_in"}
|
||||||
<script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script>
|
<script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script>
|
||||||
|
|
|
@ -18,22 +18,22 @@
|
||||||
{else}
|
{else}
|
||||||
<li><a href="{$titleLink}" class="nomobile">Home</a></li>
|
<li><a href="{$titleLink}" class="nomobile">Home</a></li>
|
||||||
{if="$is_logged_in"}
|
{if="$is_logged_in"}
|
||||||
<li><a href="./logout">Logout</a></li>
|
<li><a href="{$base_path}/logout">Logout</a></li>
|
||||||
<li><a href="./tools">Tools</a></li>
|
<li><a href="{$base_path}/tools">Tools</a></li>
|
||||||
<li><a href="./add-shaare">Add link</a></li>
|
<li><a href="{$base_path}/add-shaare">Add link</a></li>
|
||||||
{elseif="$openshaarli"}
|
{elseif="$openshaarli"}
|
||||||
<li><a href="./tools">Tools</a></li>
|
<li><a href="{$base_path}/tools">Tools</a></li>
|
||||||
<li><a href="./add-shaare">Add link</a></li>
|
<li><a href="{$base_path}/add-shaare">Add link</a></li>
|
||||||
{else}
|
{else}
|
||||||
<li><a href="./login">Login</a></li>
|
<li><a href="{$base_path}/login">Login</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
<li><a href="{$feedurl}/feed-rss?{$searchcrits}" class="nomobile">RSS Feed</a></li>
|
<li><a href="{$feedurl}/feed-rss?{$searchcrits}" class="nomobile">RSS Feed</a></li>
|
||||||
{if="$showatom"}
|
{if="$showatom"}
|
||||||
<li><a href="{$feedurl}/feed-atom?{$searchcrits}" class="nomobile">ATOM Feed</a></li>
|
<li><a href="{$feedurl}/feed-atom?{$searchcrits}" class="nomobile">ATOM Feed</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
<li><a href="./tag-cloud">Tag cloud</a></li>
|
<li><a href="{$base_path}/tag-cloud">Tag cloud</a></li>
|
||||||
<li><a href="./picture-wall{function="ltrim($searchcrits, '&')"}">Picture wall</a></li>
|
<li><a href="{$base_path}/picture-wall{function="ltrim($searchcrits, '&')"}">Picture wall</a></li>
|
||||||
<li><a href="./daily">Daily</a></li>
|
<li><a href="{$base_path}/daily">Daily</a></li>
|
||||||
{loop="$plugins_header.buttons_toolbar"}
|
{loop="$plugins_header.buttons_toolbar"}
|
||||||
<li><a
|
<li><a
|
||||||
{loop="$value.attr"}
|
{loop="$value.attr"}
|
||||||
|
|
|
@ -38,6 +38,6 @@
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
|
|
||||||
<script src="js/thumbnails.min.js"></script>
|
<script src="{$asset_path}/js/thumbnails.min.js#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
<div id="pluginsadmin">
|
<div id="pluginsadmin">
|
||||||
<form action="./?do=save_pluginadmin" method="POST">
|
<form action="{$base_path}/?do=save_pluginadmin" method="POST">
|
||||||
<section id="enabled_plugins">
|
<section id="enabled_plugins">
|
||||||
<h1>Enabled Plugins</h1>
|
<h1>Enabled Plugins</h1>
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ <h1>Disabled Plugins</h1>
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form action="./?do=save_pluginadmin" method="POST">
|
<form action="{$base_path}/?do=save_pluginadmin" method="POST">
|
||||||
<section id="plugin_parameters">
|
<section id="plugin_parameters">
|
||||||
<h1>Enabled Plugin Parameters</h1>
|
<h1>Enabled Plugin Parameters</h1>
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
<div id="cloudtag">
|
<div id="cloudtag">
|
||||||
{loop="$tags"}
|
{loop="$tags"}
|
||||||
<a href="./add-tag/{$key|urlencode}" class="count">{$value.count}</a><a
|
<a href="{$base_path}/add-tag/{$key|urlencode}" class="count">{$value.count}</a><a
|
||||||
href="./?searchtags={$key|urlencode}" style="font-size:{$value.size}em;">{$key}</a>
|
href="{$base_path}/?searchtags={$key|urlencode}" style="font-size:{$value.size}em;">{$key}</a>
|
||||||
{loop="$value.tag_plugin"}
|
{loop="$value.tag_plugin"}
|
||||||
{$value}
|
{$value}
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
<input type="hidden" name="ids" value="{function="implode(',', $ids)"}" />
|
<input type="hidden" name="ids" value="{function="implode(',', $ids)"}" />
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
<script src="js/thumbnails_update.min.js?v={$version_hash}"></script>
|
<input type="hidden" name="js_base_path" value="{$base_path}" />
|
||||||
|
<script src="{$asset_path}/js/thumbnails_update.min.js?v={$version_hash}#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -5,17 +5,17 @@
|
||||||
<div id="pageheader">
|
<div id="pageheader">
|
||||||
{include="page.header"}
|
{include="page.header"}
|
||||||
<div id="toolsdiv">
|
<div id="toolsdiv">
|
||||||
<a href="./configure"><b>Configure your Shaarli</b><span>: Change Title, timezone...</span></a>
|
<a href="{$base_path}/configure"><b>Configure your Shaarli</b><span>: Change Title, timezone...</span></a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="./?do=pluginadmin"><b>Plugin administration</b><span>: Enable, disable and configure plugins.</span></a>
|
<a href="{$base_path}/?do=pluginadmin"><b>Plugin administration</b><span>: Enable, disable and configure plugins.</span></a>
|
||||||
<br><br>
|
<br><br>
|
||||||
{if="!$openshaarli"}<a href="?do=changepasswd"><b>Change password</b><span>: Change your password.</span></a>
|
{if="!$openshaarli"}<a href="{$base_path}/?do=changepasswd"><b>Change password</b><span>: Change your password.</span></a>
|
||||||
<br><br>{/if}
|
<br><br>{/if}
|
||||||
<a href="./manage-tags"><b>Rename/delete tags</b><span>: Rename or delete a tag in all links</span></a>
|
<a href="{$base_path}/manage-tags"><b>Rename/delete tags</b><span>: Rename or delete a tag in all links</span></a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="./?do=import"><b>Import</b><span>: Import Netscape html bookmarks (as exported from Firefox, Chrome, Opera, delicious...)</span></a>
|
<a href="{$base_path}/?do=import"><b>Import</b><span>: Import Netscape html bookmarks (as exported from Firefox, Chrome, Opera, delicious...)</span></a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="./?do=export"><b>Export</b><span>: Export Netscape html bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)</span></a>
|
<a href="{$base_path}/?do=export"><b>Export</b><span>: Export Netscape html bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)</span></a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a class="smallbutton"
|
<a class="smallbutton"
|
||||||
onclick="return alertBookmarklet();"
|
onclick="return alertBookmarklet();"
|
||||||
|
|
Loading…
Reference in a new issue