mirror of
				https://github.com/sissbruecker/linkding.git
				synced 2025-11-04 13:04:00 +01:00 
			
		
		
		
	Improve and promote admin panel (#76)
* Improve and promote admin panel (#76) * Customize admin panel texts (#76) * Improve settings structure (#76) * Improve admin list consistency (#76) * Fix redirect URLs (#76) * Add admin tooltip (#76)
This commit is contained in:
		
							
								
								
									
										25
									
								
								bookmarks/templates/settings/api.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								bookmarks/templates/settings/api.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
{% extends "bookmarks/layout.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div class="settings-page">
 | 
			
		||||
 | 
			
		||||
        {% include 'settings/nav.html' %}
 | 
			
		||||
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <h2>API Token</h2>
 | 
			
		||||
            <p>The following token can be used to authenticate 3rd-party applications against the REST API:</p>
 | 
			
		||||
            <div class="form-group">
 | 
			
		||||
                <div class="columns">
 | 
			
		||||
                    <div class="column col-6 col-md-12">
 | 
			
		||||
                        <input class="form-input" value="{{ api_token }}" disabled>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <p><strong>Please treat this token as you would any other credential.</strong> Any party with access to this
 | 
			
		||||
                token can access and manage all your bookmarks.</p>
 | 
			
		||||
            <p>If you think that a token was compromised you can revoke (delete) it in the <a href="{% url 'admin:authtoken_token_changelist' %}">admin panel</a>. After deleting the token, a new one will be generated when you reload this settings page.</p>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										54
									
								
								bookmarks/templates/settings/data.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								bookmarks/templates/settings/data.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
{% extends "bookmarks/layout.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div class="settings-page">
 | 
			
		||||
 | 
			
		||||
        {% include 'settings/nav.html' %}
 | 
			
		||||
 | 
			
		||||
        {# Import section #}
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <h2>Import</h2>
 | 
			
		||||
            <p>Import bookmarks and tags in the Netscape HTML format. This will execute a sync where new bookmarks are
 | 
			
		||||
                added and existing ones are updated.</p>
 | 
			
		||||
            <form method="post" enctype="multipart/form-data" action="{% url 'bookmarks:settings.import' %}">
 | 
			
		||||
                {% csrf_token %}
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <div class="input-group col-8 col-md-12">
 | 
			
		||||
                        <input class="form-input" type="file" name="import_file">
 | 
			
		||||
                        <input type="submit" class="input-group-btn col-2 btn btn-primary" value="Upload">
 | 
			
		||||
                    </div>
 | 
			
		||||
                    {% if import_success_message %}
 | 
			
		||||
                        <div class="has-success">
 | 
			
		||||
                            <p class="form-input-hint">
 | 
			
		||||
                                {{ import_success_message }}
 | 
			
		||||
                            </p>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% if import_errors_message %}
 | 
			
		||||
                        <div class="has-error">
 | 
			
		||||
                            <p class="form-input-hint">
 | 
			
		||||
                                {{ import_errors_message }}
 | 
			
		||||
                            </p>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
            </form>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
        {# Export section #}
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <h2>Export</h2>
 | 
			
		||||
            <p>Export all bookmarks in Netscape HTML format.</p>
 | 
			
		||||
            <a class="btn btn-primary" href="{% url 'bookmarks:settings.export' %}">Download (.html)</a>
 | 
			
		||||
            {% if export_error %}
 | 
			
		||||
                <div class="has-error">
 | 
			
		||||
                    <p class="form-input-hint">
 | 
			
		||||
                        {{ export_error }}
 | 
			
		||||
                    </p>
 | 
			
		||||
                </div>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -1,91 +0,0 @@
 | 
			
		||||
{% extends "bookmarks/layout.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div class="settings-page">
 | 
			
		||||
 | 
			
		||||
        {# Import section #}
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <div class="content-area-header">
 | 
			
		||||
                <h2>Import</h2>
 | 
			
		||||
            </div>
 | 
			
		||||
            <p>Import bookmarks and tags in the Netscape HTML format. This will execute a sync where new bookmarks are
 | 
			
		||||
                added and existing ones are updated.</p>
 | 
			
		||||
            <form method="post" enctype="multipart/form-data" action="{% url 'bookmarks:settings.import' %}">
 | 
			
		||||
                {% csrf_token %}
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <div class="input-group col-8 col-md-12">
 | 
			
		||||
                        <input class="form-input" type="file" name="import_file">
 | 
			
		||||
                        <input type="submit" class="input-group-btn col-2 btn btn-primary" value="Upload">
 | 
			
		||||
                    </div>
 | 
			
		||||
                    {% if import_success_message %}
 | 
			
		||||
                        <div class="has-success">
 | 
			
		||||
                            <p class="form-input-hint">
 | 
			
		||||
                                {{ import_success_message }}
 | 
			
		||||
                            </p>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% if import_errors_message %}
 | 
			
		||||
                        <div class="has-error">
 | 
			
		||||
                            <p class="form-input-hint">
 | 
			
		||||
                                {{ import_errors_message }}
 | 
			
		||||
                            </p>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                </div>
 | 
			
		||||
            </form>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
        {# Export section #}
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <div class="content-area-header">
 | 
			
		||||
                <h2>Export</h2>
 | 
			
		||||
            </div>
 | 
			
		||||
            <p>Export all bookmarks in Netscape HTML format.</p>
 | 
			
		||||
            <a class="btn btn-primary" href="{% url 'bookmarks:settings.export' %}">Download (.html)</a>
 | 
			
		||||
            {% if export_error %}
 | 
			
		||||
                <div class="has-error">
 | 
			
		||||
                    <p class="form-input-hint">
 | 
			
		||||
                        {{ export_error }}
 | 
			
		||||
                    </p>
 | 
			
		||||
                </div>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
        {# Integrations section #}
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <div class="content-area-header">
 | 
			
		||||
                <a id="bookmarklet"><h2>Bookmarklet</h2></a>
 | 
			
		||||
            </div>
 | 
			
		||||
            <p>The bookmarklet is a quick way to add new bookmarks without opening the linkding application
 | 
			
		||||
                first. Here's how it works:</p>
 | 
			
		||||
            <ul>
 | 
			
		||||
                <li>Drag the bookmarklet below into your browsers bookmark bar / toolbar</li>
 | 
			
		||||
                <li>Open the website that you want to bookmark</li>
 | 
			
		||||
                <li>Click the bookmarklet in your browsers toolbar</li>
 | 
			
		||||
                <li>linkding opens in a new window  or tab and allows you to add a bookmark for the site</li>
 | 
			
		||||
                <li>After saving the bookmark the linkding window closes and you are back on your website</li>
 | 
			
		||||
            </ul>
 | 
			
		||||
            <p>Drag the following bookmarklet to your browsers toolbar:</p>
 | 
			
		||||
            <a href="javascript: {% include 'bookmarks/bookmarklet.js' %}"
 | 
			
		||||
               class="btn btn-primary">📎 Add bookmark</a>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
        {# API token section #}
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <div class="content-area-header">
 | 
			
		||||
                <h2>API Token</h2>
 | 
			
		||||
            </div>
 | 
			
		||||
            <p>The following token can be used to authenticate 3rd-party applications against the REST API:</p>
 | 
			
		||||
            <div class="form-group">
 | 
			
		||||
                <div class="columns">
 | 
			
		||||
                    <div class="column col-6 col-md-12">
 | 
			
		||||
                        <input class="form-input" value="{{ api_token }}" disabled>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <p><strong>Please treat this token as you would any other credential.</strong> Any party with access to this token can access and manage all your bookmarks.</p>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										26
									
								
								bookmarks/templates/settings/integrations.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								bookmarks/templates/settings/integrations.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
{% extends "bookmarks/layout.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div class="settings-page">
 | 
			
		||||
 | 
			
		||||
        {% include 'settings/nav.html' %}
 | 
			
		||||
 | 
			
		||||
        {# Integrations section #}
 | 
			
		||||
        <section class="content-area">
 | 
			
		||||
            <h2>Bookmarklet</h2>
 | 
			
		||||
            <p>The bookmarklet is a quick way to add new bookmarks without opening the linkding application
 | 
			
		||||
                first. Here's how it works:</p>
 | 
			
		||||
            <ul>
 | 
			
		||||
                <li>Drag the bookmarklet below into your browsers bookmark bar / toolbar</li>
 | 
			
		||||
                <li>Open the website that you want to bookmark</li>
 | 
			
		||||
                <li>Click the bookmarklet in your browsers toolbar</li>
 | 
			
		||||
                <li>linkding opens in a new window or tab and allows you to add a bookmark for the site</li>
 | 
			
		||||
                <li>After saving the bookmark the linkding window closes and you are back on your website</li>
 | 
			
		||||
            </ul>
 | 
			
		||||
            <p>Drag the following bookmarklet to your browsers toolbar:</p>
 | 
			
		||||
            <a href="javascript: {% include 'bookmarks/bookmarklet.js' %}"
 | 
			
		||||
               class="btn btn-primary">📎 Add bookmark</a>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										23
									
								
								bookmarks/templates/settings/nav.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								bookmarks/templates/settings/nav.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
{% url 'bookmarks:settings.index' as index_url %}
 | 
			
		||||
{% url 'bookmarks:settings.data' as data_url %}
 | 
			
		||||
{% url 'bookmarks:settings.integrations' as integrations_url %}
 | 
			
		||||
{% url 'bookmarks:settings.api' as api_url %}
 | 
			
		||||
 | 
			
		||||
<ul class="tab tab-block">
 | 
			
		||||
    <li class="tab-item {% if request.get_full_path == index_url or request.get_full_path == data_url%}active{% endif %}">
 | 
			
		||||
        <a href="{% url 'bookmarks:settings.data' %}">Data</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="tab-item {% if request.get_full_path == integrations_url %}active{% endif %}">
 | 
			
		||||
        <a href="{% url 'bookmarks:settings.integrations' %}">Integrations</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="tab-item {% if request.get_full_path == api_url %}active{% endif %}">
 | 
			
		||||
        <a href="{% url 'bookmarks:settings.api' %}">API</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="tab-item tooltip tooltip-bottom" data-tooltip="The admin panel provides additional features 
 such as user management and bulk operations.">
 | 
			
		||||
        <a href="{% url 'admin:index' %}" target="_blank">
 | 
			
		||||
            <span>Admin</span>
 | 
			
		||||
            <i class="icon icon-share ml-1" style="font-size: 12px"></i>
 | 
			
		||||
        </a>
 | 
			
		||||
    </li>
 | 
			
		||||
</ul>
 | 
			
		||||
<br>
 | 
			
		||||
		Reference in New Issue
	
	Block a user