Browse Source

Make modules contain their own static files and templates

master
Chase Sterling 7 years ago
parent
commit
33aa2b851e
20 changed files with 9 additions and 8 deletions
  1. +0
    -0
      realms/modules/auth/templates/auth/ldap/login.html
  2. +0
    -0
      realms/modules/auth/templates/auth/local/login.html
  3. +0
    -0
      realms/modules/auth/templates/auth/login.html
  4. +0
    -0
      realms/modules/auth/templates/auth/register.html
  5. +0
    -0
      realms/modules/auth/templates/auth/settings.html
  6. +1
    -1
      realms/modules/auth/views.py
  7. +0
    -0
      realms/modules/search/templates/search/search.html
  8. +1
    -1
      realms/modules/search/views.py
  9. +1
    -1
      realms/modules/wiki/assets.py
  10. +0
    -0
      realms/modules/wiki/static/js/aced.js
  11. +0
    -0
      realms/modules/wiki/static/js/collaboration/firepad.js
  12. +0
    -0
      realms/modules/wiki/static/js/collaboration/main.js
  13. +0
    -0
      realms/modules/wiki/static/js/collaboration/togetherjs.js
  14. +0
    -0
      realms/modules/wiki/static/js/editor.js
  15. +0
    -0
      realms/modules/wiki/templates/wiki/compare.html
  16. +4
    -4
      realms/modules/wiki/templates/wiki/edit.html
  17. +0
    -0
      realms/modules/wiki/templates/wiki/history.html
  18. +0
    -0
      realms/modules/wiki/templates/wiki/index.html
  19. +0
    -0
      realms/modules/wiki/templates/wiki/page.html
  20. +2
    -1
      realms/modules/wiki/views.py

realms/templates/auth/ldap/login.html → realms/modules/auth/templates/auth/ldap/login.html View File


realms/templates/auth/local/login.html → realms/modules/auth/templates/auth/local/login.html View File


realms/templates/auth/login.html → realms/modules/auth/templates/auth/login.html View File


realms/templates/auth/register.html → realms/modules/auth/templates/auth/register.html View File


realms/templates/auth/settings.html → realms/modules/auth/templates/auth/settings.html View File


+ 1
- 1
realms/modules/auth/views.py View File

@@ -2,7 +2,7 @@ from flask import current_app, render_template, request, redirect, Blueprint, fl
from flask.ext.login import logout_user
from realms.modules.auth.models import Auth

blueprint = Blueprint('auth', __name__)
blueprint = Blueprint('auth', __name__, template_folder='templates')


@blueprint.route("/login", methods=['GET', 'POST'])


realms/templates/search/search.html → realms/modules/search/templates/search/search.html View File


+ 1
- 1
realms/modules/search/views.py View File

@@ -1,7 +1,7 @@
from flask import render_template, request, Blueprint
from realms import search as search_engine

blueprint = Blueprint('search', __name__)
blueprint = Blueprint('search', __name__, template_folder='templates')


@blueprint.route('/_search')


+ 1
- 1
realms/modules/wiki/assets.py View File

@@ -7,4 +7,4 @@ assets.register('editor.js',
'vendor/ace-builds/src/mode-markdown.js',
'vendor/ace-builds/src/ext-keybinding_menu.js',
'vendor/keymaster/keymaster.js',
'js/aced.js')
'wiki/js/aced.js')

realms/static/js/aced.js → realms/modules/wiki/static/js/aced.js View File


realms/static/js/collaboration/firepad.js → realms/modules/wiki/static/js/collaboration/firepad.js View File


realms/static/js/collaboration/main.js → realms/modules/wiki/static/js/collaboration/main.js View File


realms/static/js/collaboration/togetherjs.js → realms/modules/wiki/static/js/collaboration/togetherjs.js View File


realms/static/js/editor.js → realms/modules/wiki/static/js/editor.js View File


realms/templates/wiki/compare.html → realms/modules/wiki/templates/wiki/compare.html View File


realms/templates/wiki/edit.html → realms/modules/wiki/templates/wiki/edit.html View File

@@ -6,7 +6,7 @@

var PAGE_NAME = '{{ name }}';
</script>
<script src="{{ url_for('static', filename='js/editor.js') }}"></script>
<script src="{{ url_for('wiki.static', filename='js/editor.js') }}"></script>

{% if partials %}
<script>
@@ -25,7 +25,7 @@
{% endif %}

{% if config.get('COLLABORATION') %}
<script src="{{ url_for('static', filename='js/collaboration/main.js') }}"></script>
<script src="{{ url_for('wiki.static', filename='js/collaboration/main.js') }}"></script>
{% endif %}

{% if config.get('COLLABORATION') == 'firepad' %}
@@ -34,11 +34,11 @@
</script>
<script src="https://cdn.firebase.com/js/client/1.0.17/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/firepad/1.0.0/firepad.min.js"></script>
<script src="{{ url_for('static', filename='js/collaboration/firepad.js') }}"></script>
<script src="{{ url_for('wiki.static', filename='js/collaboration/firepad.js') }}"></script>
{% endif %}

{% if config.get('COLLABORATION') == 'togetherjs' %}
<script src="{{ url_for('static', filename='js/collaboration/togetherjs.js') }}"></script>
<script src="{{ url_for('wiki.static', filename='js/collaboration/togetherjs.js') }}"></script>
<script src="https://togetherjs.com/togetherjs-min.js"></script>
{% endif %}


realms/templates/wiki/history.html → realms/modules/wiki/templates/wiki/history.html View File


realms/templates/wiki/index.html → realms/modules/wiki/templates/wiki/index.html View File


realms/templates/wiki/page.html → realms/modules/wiki/templates/wiki/page.html View File


+ 2
- 1
realms/modules/wiki/views.py View File

@@ -6,7 +6,8 @@ from flask.ext.login import login_required, current_user
from realms.lib.util import to_canonical, remove_ext, gravatar_url
from .models import PageNotFound

blueprint = Blueprint('wiki', __name__)
blueprint = Blueprint('wiki', __name__, template_folder='templates',
static_folder='static', static_url_path='/static/wiki')


@blueprint.route("/_commit/<sha>/<path:name>")


Loading…
Cancel
Save