diff --git a/MANIFEST.in b/MANIFEST.in index 8f6d769..0d79874 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ include pyproject.toml -include rules.yaml +include src/djlint/rules.yaml diff --git a/README.rst b/README.rst index 3e066fc..ec3f36c 100644 --- a/README.rst +++ b/README.rst @@ -1,114 +1,41 @@ -djlint +djLint ====== -Simple Django template linter and reformatter. Ps, reformatting might -work with Jinja and Handlebar templates as well! Test it out with the -``--check`` flag. +Simple html template linter and reformatter to find common formatting issues with and *reformat* django html templates + +Ps, ``--check`` it out on Jinja and Handlebar templates as well! |codecov| |test| |Codacy Badge| |Maintainability| -Install from `Pypi `__ --------------------------------------------------------- -.. code:: sh - - pip install djlint - -Linter Usage ------------- - -.. code:: sh - - djlint src # file or path - - # with custom extensions - djlint src -e html.dj - -Reformatter Usage ------------------ - -Reforamtting is beta. Check the output before applying changes. Please -PR any changes needed 👍🏽 - -.. code:: sh - - djlint src --reformat --check - - djlint src --reformat - -Optional args +Documentation ------------- -+--------------------+---------------------------+----------------+ -| Arg | Definition | Default | -+====================+===========================+================+ -| -e, --extension | File extension to lint. | default=html | -+--------------------+---------------------------+----------------+ -| --reformat --check | Checks html formatting | | -+--------------------+---------------------------+----------------+ -| --reformat | Reformats html | | -+--------------------+---------------------------+----------------+ +Read the `documentation `_ -Linter Rules ------------- +Show your format +---------------- -Error Codes -~~~~~~~~~~~ +Add a badge to your projects `readme.md`: -+--------+----------------------------------------------------------------------+ -| Code | Meaning | -+========+======================================================================+ -| E001 | Variables should be wrapped in a single whitespace. Ex: {{ this }} | -+--------+----------------------------------------------------------------------+ -| E002 | Double quotes should be used in tags. Ex {% extends "this.html" %} | -+--------+----------------------------------------------------------------------+ +.. code-block:: md -Warning Codes -~~~~~~~~~~~~~ + [![Code style: black](https://img.shields.io/badge/html%20style-djlint-blue.svg)](https://github.com/Riverside-Healthcare/djlint) -+--------+----------------------------------------------------------------+ -| Code | Meaning | -+========+================================================================+ -| W003 | Endblock should have name. Ex: {% endblock body %}. | -+--------+----------------------------------------------------------------+ -| W004 | Status urls should follow {% static path/to/file %} pattern. | -+--------+----------------------------------------------------------------+ -| W005 | Html tag should have lang attribute. | -+--------+----------------------------------------------------------------+ -| W006 | Img tag should have alt, height and width attributes. | -+--------+----------------------------------------------------------------+ -| W007 | should be present before the html tag. | -+--------+----------------------------------------------------------------+ -| W008 | Attributes should be double quoted. | -+--------+----------------------------------------------------------------+ -| W009 | Tag names should be lowercase. | -+--------+----------------------------------------------------------------+ -| W010 | Attribute names should be lowercase. | -+--------+----------------------------------------------------------------+ -| W011 | Attirbute values should be quoted. | -+--------+----------------------------------------------------------------+ -| W012 | There should be no spaces around attribute =. | -+--------+----------------------------------------------------------------+ -| W013 | Line is longer than 99 chars. | -+--------+----------------------------------------------------------------+ -| W014 | More than 2 blank lines. | -+--------+----------------------------------------------------------------+ -| W015 | Follow h tags with a blank line. | -+--------+----------------------------------------------------------------+ -| W016 | Missging title tag in html. | -+--------+----------------------------------------------------------------+ -| W017 | Tag should be self closing. | -+--------+----------------------------------------------------------------+ -Adding Rules ------------- +Add a badge to your `readme.rst`: -A good rule consists of +.. code-block:: rst + + .. image:: https://img.shields.io/badge/html%20style-djlint-blue.svg + :target: https://github.com/Riverside-Healthcare/djlint + + +Looks like this: + +.. image:: https://img.shields.io/badge/html%20style-djlint-blue.svg + :target: https://github.com/Riverside-Healthcare/djlint -- Name -- Code - Codes beginning with "E" signify error, and "W" warning. -- Message - Message to display when error is found. -- Patterns - regex expressions that will find the error. Contributing - Please Help! --------------------------- diff --git a/docs/_static/icon.png b/docs/_static/icon.png new file mode 100644 index 0000000..3696167 Binary files /dev/null and b/docs/_static/icon.png differ diff --git a/docs/conf.py b/docs/conf.py index 73ea1dc..5ca082a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,14 +38,14 @@ html_sidebars = { html_theme_options = { "show_related": False, - "description": "django template formatter", + "description": "Html Template Lint", "github_button": True, "github_user": "Riverside-Healthcare", "github_repo": "djlint", "github_type": "star", "show_powered_by": False, "fixed_sidebar": True, - # "logo": "logo2.png", + "logo": "icon.png", } html_static_path = ["_static"] diff --git a/docs/djlint/configuration.rst b/docs/djlint/configuration.rst new file mode 100644 index 0000000..bd6af68 --- /dev/null +++ b/docs/djlint/configuration.rst @@ -0,0 +1,6 @@ +Configuration +============= + +Help needed! + +Ideally we'd like to be able to ignore rules through pyproject.toml, or cli. diff --git a/docs/djlint/formatter.rst b/docs/djlint/formatter.rst new file mode 100644 index 0000000..c5ff6e0 --- /dev/null +++ b/docs/djlint/formatter.rst @@ -0,0 +1,51 @@ +Formatter +========= + +djLint's formatter will take sloppy html templates and make it look pretty nice! + +For an example of what the output will be, check out the `/tests/` folder to see over 300 **formatted** templates from the top django and flask projects. + +Before +------ +.. code :: html + + {% load admin_list %} {% load i18n %} +

+ {% if pagination_required %} + {% for i in page_range %} {% paginator_number cl i %} + {% endfor %} {% endif %} + {{ cl.result_count }} + {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }} {% else %} + {{ cl.opts.verbose_name_plural }} {% endif %} + {% if show_all_url %} {% translate 'Show all' %} + + {% endif %}{% if cl.formset and cl.result_count %}{% endif %} +

+ +After +----- +.. code :: html + + {% load admin_list %} + {% load i18n %} +

+ {% if pagination_required %} + {% for i in page_range %} + {% paginator_number cl i %} + {% endfor %} + {% endif %} + {{ cl.result_count }} + {% if cl.result_count == 1 %} + {{ cl.opts.verbose_name }} + {% else %} + {{ cl.opts.verbose_name_plural }} + {% endif %} + {% if show_all_url %} + + {% translate 'Show all' %} + + {% endif %} + {% if cl.formset and cl.result_count %} + + {% endif %} +

diff --git a/docs/djlint/rules.rst b/docs/djlint/rules.rst new file mode 100644 index 0000000..0b66478 --- /dev/null +++ b/docs/djlint/rules.rst @@ -0,0 +1,60 @@ +Linter Rules +============ + +Error Codes +~~~~~~~~~~~ + ++--------+----------------------------------------------------------------------+ +| Code | Meaning | ++========+======================================================================+ +| E001 | Variables should be wrapped in a single whitespace. Ex: {{ this }} | ++--------+----------------------------------------------------------------------+ +| E002 | Double quotes should be used in tags. Ex {% extends "this.html" %} | ++--------+----------------------------------------------------------------------+ + +Warning Codes +~~~~~~~~~~~~~ + ++--------+----------------------------------------------------------------+ +| Code | Meaning | ++========+================================================================+ +| W003 | Endblock should have name. Ex: {% endblock body %}. | ++--------+----------------------------------------------------------------+ +| W004 | Status urls should follow {% static path/to/file %} pattern. | ++--------+----------------------------------------------------------------+ +| W005 | Html tag should have lang attribute. | ++--------+----------------------------------------------------------------+ +| W006 | Img tag should have alt, height and width attributes. | ++--------+----------------------------------------------------------------+ +| W007 | should be present before the html tag. | ++--------+----------------------------------------------------------------+ +| W008 | Attributes should be double quoted. | ++--------+----------------------------------------------------------------+ +| W009 | Tag names should be lowercase. | ++--------+----------------------------------------------------------------+ +| W010 | Attribute names should be lowercase. | ++--------+----------------------------------------------------------------+ +| W011 | Attirbute values should be quoted. | ++--------+----------------------------------------------------------------+ +| W012 | There should be no spaces around attribute =. | ++--------+----------------------------------------------------------------+ +| W013 | Line is longer than 120 chars. | ++--------+----------------------------------------------------------------+ +| W014 | More than 2 blank lines. | ++--------+----------------------------------------------------------------+ +| W015 | Follow h tags with a blank line. | ++--------+----------------------------------------------------------------+ +| W016 | Missging title tag in html. | ++--------+----------------------------------------------------------------+ +| W017 | Tag should be self closing. | ++--------+----------------------------------------------------------------+ + +Adding Rules +------------ + +A good rule consists of + +- Name +- Code - Codes beginning with "E" signify error, and "W" warning. +- Message - Message to display when error is found. +- Patterns - regex expressions that will find the error. diff --git a/docs/djlint/usage.rst b/docs/djlint/usage.rst new file mode 100644 index 0000000..67e712a --- /dev/null +++ b/docs/djlint/usage.rst @@ -0,0 +1,54 @@ +Getting Started +================ + +Installation from `Pypi `__ +-------------------------------------------------------------- + +.. code:: sh + + pip install djlint + +Linter Usage +------------ + +.. code:: sh + + djlint src # file or path + + # with custom extensions + djlint src -e html.dj + +Reformatter Usage +----------------- + +Reforamtting is a beta product. Check the output before applying changes. + +Reformatting does not work with long json/html embedded into attribute data. + +To check what may change in formatting run: + +.. code:: sh + + djlint src --check + +To reformat run: + +.. code:: sh + + djlint src --reformat + +CLI Args +------------- + +.. code:: sh + + Usage: djlint [OPTIONS] SRC ... + + Djlint django template files. + + Options: + -e, --extension TEXT File extension to lint [default: html] + --reformat Reformat the file(s). + --check Check formatting on the file(s). + --quiet Do not print diff when reformatting. + -h, --help Show this message and exit. diff --git a/docs/index.rst b/docs/index.rst index fcd2071..fa6c5ae 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,12 +1,17 @@ .. djlint documentation master file, created by sphinx-quickstart on Tue Jul 27 15:28:35 2021. -Django Template Formatter -========================= +Html Template Linter and Formatter +================================== .. toctree:: - :maxdepth: 2 - :caption: Contents: + :hidden: + :glob: + :maxdepth: 1 + :titlesonly: + + Welcome + djlint/* .. toctree:: :hidden: @@ -15,5 +20,48 @@ Django Template Formatter PyPI ↪ -.. include:: ../readme.rst - :start-line: 1 +Simple html template linter and reformatter to find common formatting issues with and *reformat* django html templates + +Ps, ``--check`` it out on Jinja and Handlebar templates as well! + +|codecov| |test| |Codacy Badge| |Maintainability| + +.. note:: djLint is not an html parser or syntax validator. + +Show your format +---------------- + +Add a badge to your projects `readme.md`: + +.. code-block:: md + + [![Code style: black](https://img.shields.io/badge/html%20style-djlint-blue.svg)](https://github.com/Riverside-Healthcare/djlint) + + +Add a badge to your `readme.rst`: + +.. code-block:: rst + + .. image:: https://img.shields.io/badge/html%20style-djlint-blue.svg + :target: https://github.com/Riverside-Healthcare/djlint + + +Looks like this: + +.. image:: https://img.shields.io/badge/html%20style-djlint-blue.svg + :target: https://github.com/Riverside-Healthcare/djlint + + +Contributing - Please Help! +--------------------------- + +Checkout the `issue `_ list and help where you can! + +.. |codecov| image:: https://codecov.io/gh/Riverside-Healthcare/djlint/branch/master/graph/badge.svg?token=eNTG721BAA + :target: https://codecov.io/gh/Riverside-Healthcare/djlint +.. |test| image:: https://github.com/Riverside-Healthcare/djlint/actions/workflows/test.yml/badge.svg + :target: https://github.com/Riverside-Healthcare/djlint/actions/workflows/test.yml +.. |Codacy Badge| image:: https://app.codacy.com/project/badge/Grade/dba6338b0e7a4de896b45b382574f369 + :target: https://www.codacy.com/gh/Riverside-Healthcare/djlint/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Riverside-Healthcare/djlint&utm_campaign=Badge_Grade +.. |Maintainability| image:: https://api.codeclimate.com/v1/badges/5febe4111a36c7e0d2ed/maintainability + :target: https://codeclimate.com/github/Riverside-Healthcare/djlint/maintainability diff --git a/pyproject.toml b/pyproject.toml index 1d3b2ae..0c46ca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,4 +22,4 @@ quiet = true [tool.pylint.messages_control] -disable = "E1120, R0914, E0401, R0912" +disable = "E1120, R0914, E0401, R0912, R0916" diff --git a/setup.py b/setup.py index fe05419..19bc553 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ __version__ = "0.1.1" def long_description(): """Build long description from readme and changelog.""" return ( - (project_path / "README.md").read_text(encoding="utf8") + (project_path / "README.rst").read_text(encoding="utf8") + "\n\n" + (project_path / "CHANGELOG.md").read_text(encoding="utf8") ) @@ -31,7 +31,7 @@ setup( author_email="cpickering@rhc.net", description="Django Template Linter", long_description=long_description(), - long_description_content_type="text/markdown", + long_description_content_type="text/rst", url="https://github.com/Riverside-Healthcare/djlint", include_package_data=True, package_data={"djlint": ["rules.yaml"]}, @@ -43,7 +43,12 @@ setup( package_dir={"": "src"}, packages=find_packages(where="src"), python_requires=">=3.6", - install_requires=["click>=7.1.2", "pyyaml>=5.4.1", "colorama>=0.4.3"], + install_requires=[ + "click>=7.1.2", + "pyyaml>=5.4.1", + "colorama>=0.4.3", + "regex>=2020.11.13", + ], test_suite="tests.test_djlint", entry_points={ "console_scripts": [ diff --git a/src/djlint/__init__.py b/src/djlint/__init__.py index 7ca3530..d05af14 100644 --- a/src/djlint/__init__.py +++ b/src/djlint/__init__.py @@ -4,10 +4,11 @@ Check Django template syntax. usage:: - djlint INPUT -e + djlint src options: + -e or --extension | --check | will check html formatting for needed changes --reformat | will reformat html @@ -24,9 +25,9 @@ import click from click import echo from colorama import Fore, Style, deinit, init -from djlint.lint import lint_file -from djlint.reformat import reformat_file -from djlint.settings import ignored_paths +from .lint import lint_file +from .reformat import reformat_file +from .settings import ignored_paths def get_src(src: Path, extension=None): @@ -149,17 +150,17 @@ def build_quantity_tense(size: int): @click.option( "--reformat", is_flag=True, - help="Reformat the file.", + help="Reformat the file(s).", ) @click.option( "--check", is_flag=True, - help="Reformat the file.", + help="Check formatting on the file(s).", ) @click.option( "--quiet", is_flag=True, - help="Reformat the file.", + help="Do not print diff when reformatting.", ) def main(src: str, extension: str, reformat: bool, check: bool, quiet: bool): """Djlint django template files.""" @@ -192,7 +193,7 @@ def main(src: str, extension: str, reformat: bool, check: bool, quiet: bool): worker_count = min(worker_count, 60) with ProcessPoolExecutor(max_workers=worker_count) as exe: - if reformat is True: + if reformat is True or check is True: func = partial(reformat_file, check) file_errors = exe.map(func, file_list) else: @@ -202,16 +203,8 @@ def main(src: str, extension: str, reformat: bool, check: bool, quiet: bool): success_message = "" error_count = 0 - if reformat is not True: - for error in file_errors: - error_count += build_output(error) - - success_message = "%sed %s, found %d errors." % ( - message, - file_quantity, - error_count, - ) - else: + if reformat is True or check is True: + # reformat message for error in file_errors: error_count += build_check_output(error, quiet) tense_message = ( @@ -221,6 +214,17 @@ def main(src: str, extension: str, reformat: bool, check: bool, quiet: bool): ) success_message = "%s updated." % tense_message + else: + # lint message + for error in file_errors: + error_count += build_output(error) + + success_message = "%sed %s, found %d errors." % ( + message, + file_quantity, + error_count, + ) + echo("\n%s\n" % (success_message)) diff --git a/src/djlint/formatter/__init__.py b/src/djlint/formatter/__init__.py new file mode 100644 index 0000000..609bdb4 --- /dev/null +++ b/src/djlint/formatter/__init__.py @@ -0,0 +1 @@ +# flake8:noqa diff --git a/src/djlint/formatter/compress_html.py b/src/djlint/formatter/compress_html.py new file mode 100644 index 0000000..781444d --- /dev/null +++ b/src/djlint/formatter/compress_html.py @@ -0,0 +1,116 @@ +"""djLint Attempt to logically shrink html.""" +import regex as re + +from ..settings import ( + ignored_inline_blocks, + ignored_tag_closing, + ignored_tag_opening, + single_line_html_tags, + single_line_template_tags, + start_template_tags, + tag_raw_flat_closing, + tag_raw_flat_opening, +) + + +def _clean_line(line): + """Clean up a line of html. + + * remove duplicate spaces + * remove trailing spaces + + """ + return re.sub(r" {2,}", " ", line.strip()) + + +def _strip_html_whitespace(html): + """Remove unnecessary whitespace from text.""" + rawcode_flat = "" + is_block_ignored = False + is_block_raw = False + + for item in html.strip().splitlines(): + + # start of ignored block + is_block_raw = bool(re.search(tag_raw_flat_opening, item, re.IGNORECASE)) + + # find ignored blocks and retain indentation, otherwise strip white space + if re.findall( + r"(?:%s)" % "|".join(ignored_inline_blocks), item, flags=re.IGNORECASE + ): + tmp = _clean_line(item) + + elif ( + re.search(ignored_tag_closing, item, re.IGNORECASE) + and is_block_raw is False + ): + tmp = _clean_line(item) + is_block_ignored = False + + elif ( + re.search(ignored_tag_opening, item, re.IGNORECASE) + and is_block_raw is False + ): + tmp = _clean_line(item) + is_block_ignored = True + + elif is_block_raw or is_block_ignored: + tmp = item + + else: + tmp = _clean_line(item) + + # end of ignore raw code + is_block_raw = not bool(re.search(tag_raw_flat_closing, item, re.IGNORECASE)) + + rawcode_flat = rawcode_flat + tmp + "\n" + + return rawcode_flat + + +def compress_html(html): + """Compress back tags that do not need to be expanded.""" + # put empty tags on one line + html = re.sub( + r"(<([\w]+)[^>]*>)\s+?(<\/\2>)", + r"\1\3", + html, + flags=re.IGNORECASE | re.MULTILINE, + ) + + # put empty template tags on one line + html = re.sub( + r"(" + start_template_tags + r")\s+?(\{\% end[^}]*?\%\})", + r"\1\2", + html, + re.MULTILINE, + ) + + # put short single line tags on one line + slt_html = "|".join(single_line_html_tags) + html = re.sub( + r"(<(%s)>)\s*([^<\n]{,80})\s*?()" % slt_html, + r"\1\3\4", + html, + re.IGNORECASE | re.MULTILINE, + ) + html = re.sub( + r"(<(%s) [^\n]{,30}>)\s*([^<\n]{,50})\s*?()" % slt_html, + r"\1\3\4", + html, + re.IGNORECASE | re.MULTILINE, + ) + + slt_template = "|".join(single_line_template_tags) + html = re.sub( + r"({% +?(" + + slt_template + + r") +?[^\n]{,30}%})\s*([^%\n]{,50})\s*?({% +?end(\2) +?%})", + r"\1\3\4", + html, + re.IGNORECASE | re.MULTILINE, + ) + + html = _strip_html_whitespace(html) + + return html diff --git a/src/djlint/formatter/expand_html.py b/src/djlint/formatter/expand_html.py new file mode 100644 index 0000000..7fbfe97 --- /dev/null +++ b/src/djlint/formatter/expand_html.py @@ -0,0 +1,201 @@ +"""djLint expand out html code.""" +from functools import partial + +import regex as re + +from ..settings import ( + break_html_tags, + break_template_tags, + ignored_attributes, + ignored_blocks, + tag_pattern, +) + + +def _flatten_attributes(match): + """Flatten multiline attributes back to one line. + + Skip when attribute is ignored. + Attribute name can be in group one or group 2. + for now, skipping if they are anywhere + """ + for attribute in ignored_attributes: + if attribute in match.group(): + return match.group() + + return "{} {}{}".format( + match.group(1), + " ".join(match.group(2).strip().splitlines()), + match.group(3), + ) + + +def _should_ignore(html, match): + """Do not add whitespace if the tag is in a non indent block.""" + for block in ignored_blocks: + return any( + ignored_match.start() < match.start(1) + and ignored_match.end() > match.end(1) + for ignored_match in re.finditer( + block % re.escape(match.group(1)), html, re.DOTALL | re.IGNORECASE + ) + ) + + return False + + +def expand_html(html): + """Split single line html into many lines based on tags.""" + + def add_html_line(out_format, match): + """Add whitespace. + + Do not add whitespace if the tag is in a non indent block. + """ + if _should_ignore(html, match): + return match.group(1) + + return out_format % match.group(1) + + # put attributes on one line + html = re.sub( + tag_pattern, + _flatten_attributes, + html, + flags=re.IGNORECASE | re.DOTALL | re.MULTILINE, + ) + + html_tags = "|".join(break_html_tags) + + # process opening tags ############ + + # the tag either closes
+ # self closes + # has attributes
+ # or has attributes and self closes + + add_left = partial(add_html_line, "\n%s") + add_right = partial(add_html_line, "%s\n") + + break_char = r"(?)" + % ( + break_char, + html_tags, + ), + add_left, + html, + flags=re.IGNORECASE, + ) + html = re.sub( + r"(<(?:%s)>)(?=[^\n])" % html_tags, add_right, html, flags=re.IGNORECASE + ) + + html = re.sub( + r"%s\K(<(?:%s) ?/>)" + % ( + break_char, + html_tags, + ), + add_left, + html, + flags=re.IGNORECASE, + ) + html = re.sub( + r"(<(?:%s) ?/>)(?=[^\n])" % html_tags, add_right, html, flags=re.IGNORECASE + ) + + html = re.sub( + r"%s\K(<(?:%s) [^>]*?[^/]>)" + % ( + break_char, + html_tags, + ), + add_left, + html, + flags=re.IGNORECASE, + ) + html = re.sub( + r"(<(?:%s) [^>]*?[^/]>)(?=[^\n])" % html_tags, + add_right, + html, + flags=re.IGNORECASE, + ) + + html = re.sub( + r"%s\K(<(?:%s) [^>]+?/>)" + % ( + break_char, + html_tags, + ), + add_left, + html, + flags=re.IGNORECASE, + ) + html = re.sub( + r"(<(?:%s) [^>]+?/>)(?=[^\n])" % html_tags, add_right, html, flags=re.IGNORECASE + ) + + # process closing (break_char, html_tags,)s ###### + + html = re.sub( + r"%s\K()" + % ( + break_char, + html_tags, + ), + add_left, + html, + flags=re.IGNORECASE, + ) + html = re.sub( + r"()(?=[^\n])" % html_tags, add_right, html, flags=re.IGNORECASE + ) + + # template tag breaks + + def should_i_move_template_tag(out_format, match): + # ensure template tag is not inside an html tag + html_tags = "|".join(break_html_tags) + + if _should_ignore(html, match): + return match.group(1) + + if not re.findall( + r"\<(?:" + + html_tags + + r") .*? ?\w+=[\"][^\"]*?" + + re.escape(match.group(1)) + + "$", + html[: match.end()], + re.MULTILINE, + ): + + return out_format % match.group(1) + + return match.group(1) + + for tag in break_template_tags: + # find all matching tags + + html = re.sub( + r"%s\K(%s)" + % ( + break_char, + tag, + ), + partial(should_i_move_template_tag, "\n%s"), + html, + re.IGNORECASE | re.MULTILINE, + ) + + html = re.sub( + r"(%s)(?=[^\n])" % tag, + partial(should_i_move_template_tag, "%s\n"), + html, + re.IGNORECASE | re.MULTILINE, + ) + + return html diff --git a/src/djlint/formatter/indent_html.py b/src/djlint/formatter/indent_html.py new file mode 100644 index 0000000..472fb16 --- /dev/null +++ b/src/djlint/formatter/indent_html.py @@ -0,0 +1,163 @@ +"""djLint add indentation to html.""" +import regex as re + +from ..settings import ( + always_single_line_html_tags, + attribute_pattern, + break_html_tags, + format_long_attributes, + ignored_inline_blocks, + ignored_tag_closing, + ignored_tag_opening, + indent, + max_line_length, + reduce_extralines_gt, + single_line_template_tags, + tag_indent, + tag_raw_flat_closing, + tag_raw_flat_opening, + tag_unindent, + tag_unindent_line, +) + + +def _format_attributes(match): + """Spread long attributes over multiple lines.""" + leading_space = match.group(1) + + tag = match.group(2) + + spacing = "\n" + leading_space + len(tag) * " " + + attributes = (spacing).join(re.findall(attribute_pattern, match.group(3).strip())) + + close = match.group(4) + + return "{}{}{}{}".format( + leading_space, + tag, + attributes, + close, + ) + + +def indent_html(rawcode): + """Indent raw code.""" + rawcode_flat_list = re.split("\n", rawcode) + + beautified_code = "" + indent_level = 0 + is_block_raw = False + blank_counter = 0 + + slt_html = "|".join( + break_html_tags + ) # here using all tags cause we allow empty tags on one line + always_slt_html = "|".join( + always_single_line_html_tags + ) # here using all tags cause we allow empty tags on one line + slt_template = "|".join(single_line_template_tags) + + for item in rawcode_flat_list: + # if a raw tag then start ignoring + if ( + tag_raw_flat_opening + and re.search(tag_raw_flat_opening, item, re.IGNORECASE) + ) or re.search(tag_raw_flat_opening, item, re.IGNORECASE): + is_block_raw = True + if re.findall( + r"(?:%s)" % "|".join(ignored_inline_blocks), item, flags=re.IGNORECASE + ): + tmp = (indent * indent_level) + item + "\n" + + # if a one-line, inline tag, just process it, only if line starts w/ it + elif ( + re.findall(r"(<(%s)>)(.*?)()" % slt_html, item, re.IGNORECASE) + or re.findall(r"(<(%s) .+?>)(.*?)()" % slt_html, item, re.IGNORECASE) + or re.findall( + r"({% +?(" + slt_template + r") +?.+?%})(.*?)({% +?end(\2) +?%})", + item, + re.IGNORECASE, + ) + or re.findall(r"(<(%s) .*?/>)" % slt_html, item, flags=re.IGNORECASE) + or re.findall( + r"(<(%s) .*?/?>)" % always_slt_html, item, flags=re.IGNORECASE + ) + ) and is_block_raw is False: + + tmp = (indent * indent_level) + item + "\n" + blank_counter = 0 + + # if unindent, move left + elif ( + re.search(r"^(?:" + tag_unindent + r")", item, re.IGNORECASE | re.MULTILINE) + and is_block_raw is False + or re.search(ignored_tag_closing, item, re.IGNORECASE) + ): + indent_level = indent_level - 1 + tmp = (indent * indent_level) + item + "\n" + blank_counter = 0 + + elif ( + re.search(r"^" + tag_unindent_line, item, re.IGNORECASE | re.MULTILINE) + and is_block_raw is False + ): + tmp = (indent * (indent_level - 1)) + item + "\n" + blank_counter = 0 + + # if indent, move right + elif ( + re.search(r"^(?:" + tag_indent + r")", item, re.IGNORECASE | re.MULTILINE) + and is_block_raw is False + ): + tmp = (indent * indent_level) + item + "\n" + indent_level = indent_level + 1 + blank_counter = 0 + + elif is_block_raw is True: + tmp = item + "\n" + + # if just a blank line + elif item.strip() == "" and ( + blank_counter < int(reduce_extralines_gt) or blank_counter + 1 + ): + tmp = item.strip() + + # otherwise, just leave same level + else: + tmp = (indent * indent_level) + item + "\n" + + # we can try to fix django tags + tmp = re.sub(r"({[{|%])(\w[^}].+?)([}|%]})", r"\1 \2\3", tmp) + tmp = re.sub(r"({[{|%])([^}].+?[^ ])([}|%]})", r"\1\2 \3", tmp) + + # handlebars templates + tmp = re.sub(r"({{#(?:each|if).+?[^ ])(}})", r"\1 \2", tmp) + + # if a opening raw tag then start ignoring.. only if there is no closing tag + # on the same line + if ( + tag_raw_flat_closing + and re.search(tag_raw_flat_opening, item, re.IGNORECASE) + ) or re.search(ignored_tag_opening, item, re.IGNORECASE): + is_block_raw = True + + # if a normal tag, we can try to expand attributes + elif ( + format_long_attributes + and is_block_raw is False + and len(tmp) > max_line_length + ): + # get leading space, and attributes + tmp = re.sub(r"(\s*?)(<\w+\s)([^>]+?)(/?>)", _format_attributes, tmp) + + # turn off raw block if we hit end - for one line raw blocks + if ( + tag_raw_flat_closing + and re.search(tag_raw_flat_closing, item, re.IGNORECASE) + ) or re.search(ignored_tag_closing, item, re.IGNORECASE): + is_block_raw = False + + beautified_code = beautified_code + tmp + + return beautified_code.strip() + "\n" diff --git a/src/djlint/reformat.py b/src/djlint/reformat.py index 454ce0d..b11dad0 100644 --- a/src/djlint/reformat.py +++ b/src/djlint/reformat.py @@ -4,246 +4,43 @@ Much code is borrowed from https://github.com/rareyman/HTMLBeautify, many thanks """ import difflib -import re from pathlib import Path -from djlint.settings import ( - attribute_pattern, - format_long_attributes, - ignored_tag_closing, - ignored_tag_opening, - indent, - max_line_length, - reduce_extralines_gt, - tag_indent, - tag_newline_after, - tag_newline_before, - tag_pattern, - tag_pos_inline, - tag_raw_flat_closing, - tag_raw_flat_opening, - tag_unindent, - tag_unindent_line, -) - - -def clean_line(line): - """Clean up a line of html. - - * remove duplicate spaces - * remove trailing spaces - - """ - return re.sub(r" {2,}", " ", line.strip()) - - -def flatten_attributes(match): - """Flatten multiline attributes back to one line.""" - return "{} {}{}".format( - match.group(1), - " ".join(match.group(2).strip().splitlines()), - match.group(3), - ) - - -def format_attributes(match): - """Spread long attributes over multiple lines.""" - leading_space = match.group(1) - - tag = match.group(2) - - attributes = "{}{}".format( - ("\n" + leading_space + indent), - ("\n" + leading_space + indent).join( - re.findall(attribute_pattern, match.group(3).strip()) - ), - ) - - close = match.group(4) - - return "{}{}{}{}".format( - leading_space, - tag, - attributes, - close, - ) - - -def add_newlines(match): - """Only add newlines of the match is not in our acceptable one line pattern.""" - g_one = match.group(1) - g_two = match.group(2) - - if not re.search(tag_pos_inline, g_one + g_two, flags=re.IGNORECASE | re.MULTILINE): - return g_one + "\n" + g_two - - return g_one + g_two - - -def remove_indentation(rawcode): - """Remove indentation from raw code.""" - rawcode_flat = "" - is_block_ignored = False - is_block_raw = False - - for item in rawcode.strip().splitlines(): - - # ignore raw code - if re.search(tag_raw_flat_closing, item, re.IGNORECASE): - is_block_raw = False - - elif re.search(tag_raw_flat_opening, item, re.IGNORECASE): - is_block_raw = True - - # find ignored blocks and retain indentation, otherwise strip white space - if re.search(ignored_tag_closing, item, re.IGNORECASE): - tmp = clean_line(item) - is_block_ignored = False - - elif re.search(ignored_tag_opening, item, re.IGNORECASE): - tmp = clean_line(item) - is_block_ignored = True - - # not filtered so just output it - elif is_block_raw: - # remove tabs from raw_flat content - tmp = re.sub(indent, "", item) - - elif is_block_ignored: - tmp = item - - else: - tmp = clean_line(item) # item.strip() - - # add missing line breaks before tag - tmp = re.sub( - tag_newline_before, - add_newlines, - tmp, - flags=re.IGNORECASE | re.MULTILINE, - ) - - # add missing line breaks after tag - tmp = re.sub( - tag_newline_after, add_newlines, tmp, flags=re.IGNORECASE | re.MULTILINE - ) - - rawcode_flat = rawcode_flat + tmp + "\n" - - # put attributes back on one line - rawcode_flat = re.sub( - tag_pattern, - flatten_attributes, - rawcode_flat, - flags=re.IGNORECASE | re.DOTALL | re.MULTILINE, - ) - - # put empty tags on one line - rawcode_flat = re.sub( - r"(<([\w]+)[^>]*>)\n(<\/\2>)", - r"\1\3", - rawcode_flat, - flags=re.IGNORECASE | re.MULTILINE, - ) - - return rawcode_flat - - -def add_indentation(rawcode): - """Indent raw code.""" - rawcode_flat_list = re.split("\n", rawcode) - - beautified_code = "" - indent_level = 0 - is_block_raw = False - blank_counter = 0 - - for item in rawcode_flat_list: - - # if a raw tag then start ignoring - if ( - tag_raw_flat_closing - and re.search(tag_raw_flat_closing, item, re.IGNORECASE) - ) or re.search(ignored_tag_closing, item, re.IGNORECASE): - is_block_raw = False - - # if a one-line, inline tag, just process it - if re.search(tag_pos_inline, item, re.IGNORECASE) and is_block_raw is False: - tmp = (indent * indent_level) + item - blank_counter = 0 - - # if unindent, move left - elif re.search(tag_unindent, item, re.IGNORECASE) and is_block_raw is False: - indent_level = indent_level - 1 - tmp = (indent * indent_level) + item - blank_counter = 0 - - elif ( - re.search(tag_unindent_line, item, re.IGNORECASE) and is_block_raw is False - ): - tmp = (indent * (indent_level - 1)) + item - blank_counter = 0 - - # if indent, move right - elif re.search(tag_indent, item, re.IGNORECASE) and is_block_raw is False: - tmp = (indent * indent_level) + item - indent_level = indent_level + 1 - blank_counter = 0 - - elif is_block_raw is True: - tmp = item - - # if just a blank line - elif item.strip() == "" and ( - blank_counter < int(reduce_extralines_gt) or blank_counter + 1 - ): - tmp = item.strip() - - # otherwise, just leave same level - else: - tmp = (indent * indent_level) + item - - # if not raw, we can try to fix django tags - tmp = re.sub(r"({[{|%])(\w[^}].+?)([}|%]})", r"\1 \2\3", tmp) - tmp = re.sub(r"({[{|%])([^}].+?[^ ])([}|%]})", r"\1\2 \3", tmp) - - # handlebars templates - tmp = re.sub(r"({{#(?:each|if).+?[^ ])(}})", r"\1 \2", tmp) - - # if a opening raw tag then start ignoring.. only if there is no closing tag - # on the same line - if ( - tag_raw_flat_closing - and re.search(tag_raw_flat_opening, item, re.IGNORECASE) - ) or re.search(ignored_tag_opening, item, re.IGNORECASE): - is_block_raw = True - - # if a normal tag, we can try to expand attributes - elif ( - format_long_attributes - and is_block_raw is False - and len(tmp) > max_line_length - ): - # get leading space, and attributes - tmp = re.sub(r"(\s*?)(<\w+)(\s[^>]+?)(/?>)", format_attributes, tmp) - - # turn off raw block if we hit end - for one line raw blocks - if ( - tag_raw_flat_closing - and re.search(tag_raw_flat_closing, item, re.IGNORECASE) - ) or re.search(ignored_tag_closing, item, re.IGNORECASE): - is_block_raw = False - - beautified_code = beautified_code + tmp + "\n" - - return beautified_code.strip() + "\n" +from .formatter.compress_html import compress_html +from .formatter.expand_html import expand_html +from .formatter.indent_html import indent_html def reformat_file(check: bool, this_file: Path): """Reformat html file.""" rawcode = this_file.read_text(encoding="utf8") - beautified_code = add_indentation(remove_indentation(rawcode)) + itteration = 0 + + beautified_code = rawcode + + while itteration < 10: + + expanded = expand_html(rawcode) + compressed = compress_html(expanded) + indented = indent_html(compressed) + + if ( + len( + list( + difflib.unified_diff( + beautified_code.splitlines(), indented.splitlines() + ) + ) + ) + == 0 + ): + beautified_code = indented + break + + beautified_code = indented + + itteration += 1 if check is not True: # update the file diff --git a/src/djlint/rules.yaml b/src/djlint/rules.yaml index 2d734f0..e26a095 100644 --- a/src/djlint/rules.yaml +++ b/src/djlint/rules.yaml @@ -65,9 +65,9 @@ - <(?:(?!\{[%|{|#])[^\n])*=\s - rule: name: W013 - message: Line is longer than 99 chars. + message: Line is longer than 120 chars. patterns: - - "[^\n]{99,}" + - "[^\n]{120,}" - rule: name: W014 message: More than 2 blank lines. diff --git a/src/djlint/settings.py b/src/djlint/settings.py index e4201e7..3bffd19 100644 --- a/src/djlint/settings.py +++ b/src/djlint/settings.py @@ -5,20 +5,17 @@ # default indentation indent = " " +break_html_tags = ["a", "abbr"] + + # indicates tags whose contents should not be formatted -ignored_tag_opening = r"|\*}|\?>|]*?>.*?)))" - -# these tags should be followed by a newline -tag_newline_after = r"((?:(?:\{\{[\/\#].*?\}\})|\{% +?(?:if|end|for|block|else|spaceless|compress|load|include)(?:.*?%}))|(?:{% endverbatim %})|(?:{% verbatim %})|(?:)([^\n]+)" +ignored_tag_closing = r"|\*}|\?>||||||]*>[^<]*
|]*>[^<]*|]*>[^<]*|]*>[^<]*|]*>[^<]*|]*>[^<]*|]*>[^<]*|]*>[^<]*|]*>[^<]*|]*>[^<]*|||]*>[^<]*|]*>[^<]*

|||]*>[^<]*|]*>[^<]*|)" - # these tags use raw code and should flatten to column 1 # tabs will be removed inside these tags! use spaces for spacing if needed! # flatten starting with this tag... -tag_raw_flat_opening = r"" +tag_raw_flat_opening = r"{#" # ...stop flattening when you encounter this tag -tag_raw_flat_closing = r"" +tag_raw_flat_closing = r"#}" # reduce empty lines greater than x to 1 line reduce_extralines_gt = 2 # if lines are longer than x -max_line_length = 99 +max_line_length = 120 format_long_attributes = True # pattern used to find attributes in a tag attribute_pattern = r"(.+?=(?:\".*?\"|\'.*?\')|required|checked)\s*" -tag_pattern = r"(<\w+?)((?:\n\s*?[^>]+?)+?)(/?\>)" +tag_pattern = r"(<\w+?[^>]*?)((?:\n\s*?[^>]+?)+?)(/?\>)" +ignored_attributes = [ + "data-json", +] ignored_paths = r"(?:\.tox|\.venv|node_modules|_build)" + + +start_template_tags = r"{% ?(?:if|for|block|spaceless|compress|load|include|assets|addto|language)[^}]+?%}" + +break_template_tags = [ + r"{% ?(?:if|end|for|block|endblock|else|spaceless|compress|load|include|assets|addto|language)[^}]+?%}", +] + +unformated_html_tags = ["script"] + +ignored_blocks = [ + r"<(script|style|pre|svg).*?(?:%s).*?", + r"", + r"{\*.*?(?:%s).*?\*}", + r"{#.*?(?:%s).*?#}", + r"<\?php.*?(?:%s).*?\?>", +] + +ignored_inline_blocks = [ + r"", + r"{\*.*?\*}", + r"{#.*?#}", + r"<\?php.*?\?>", +] + +single_line_html_tags = [ + "button", + "a", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "td", + "th", + "strong", + "em", + "icon", + "span", + "title", + "link", +] + +always_single_line_html_tags = ["link"] + +single_line_template_tags = ["if", "for", "block"] + +break_html_tags = [ + "a", + "abbr", + "acronym", + "address", + "applet", + "area", + "article", + "aside", + "audio", + "b", + "base", + "basefont", + "bdi", + "bdo", + "big", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "center", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "dir", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "font", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "meta", + "meter", + "nav", + "noframes", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "small", + "source", + "span", + "strike", + "strong", + "style", + "sub", + "summary", + "sup", + "svg", + "table", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "tt", + "u", + "ul", + "var", + "video", + "wbr", +] diff --git a/tests/bad.html b/tests/bad.html index 166ec5d..4c03b27 100644 --- a/tests/bad.html +++ b/tests/bad.html @@ -1,10 +1,6 @@ -My first name is {{htmlfirst_name }}. My last name is {{ last_name}}. - +My first name is {{ htmlfirst_name }}. My last name is {{ last_name }}. {% extends 'base_generic.html" %} -{% block body %} -{% endblock%} - - +{% block body %}{% endblock %} Hi! diff --git a/tests/django_admin/admin/404.html b/tests/django_admin/admin/404.html new file mode 100644 index 0000000..d7b0b72 --- /dev/null +++ b/tests/django_admin/admin/404.html @@ -0,0 +1,11 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block title %} + {% translate 'Page not found' %} +{% endblock %} +{% block content %} +

{% translate 'Page not found' %}

+

+ {% translate 'We’re sorry, but the requested page could not be found.' %} +

+{% endblock %} diff --git a/tests/django_admin/admin/500.html b/tests/django_admin/admin/500.html new file mode 100644 index 0000000..6a8d0aa --- /dev/null +++ b/tests/django_admin/admin/500.html @@ -0,0 +1,21 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block title %} + {% translate 'Server error (500)' %} +{% endblock %} +{% block content %} +

+ {% translate 'Server Error + (500) + ' %} +

+

+ {% translate 'There’s been an error. It’s been reported to the site administrators via email and should be fixed shortly. Thanks for your patience.' %} +

+{% endblock %} diff --git a/tests/django_admin/admin/actions.html b/tests/django_admin/admin/actions.html new file mode 100644 index 0000000..2604981 --- /dev/null +++ b/tests/django_admin/admin/actions.html @@ -0,0 +1,44 @@ +{% load i18n %} +
+ {% block actions %} + {% block actions-form %} + {% for field in action_form %} + {% if field.label %} + {% endif %} + {% endfor %} + {% endblock %} + {% block actions-submit %} + + {% endblock %} + {% block actions-counter %} + {% if actions_selection_counter %} + + {{ selection_note }} + + {% if cl.result_count != cl.result_list|length %} + + + + {% endif %} + {% endif %} + {% endblock %} + {% endblock %} +
diff --git a/tests/django_admin/admin/app_index.html b/tests/django_admin/admin/app_index.html new file mode 100644 index 0000000..819b2e5 --- /dev/null +++ b/tests/django_admin/admin/app_index.html @@ -0,0 +1,13 @@ +{% extends "admin/index.html" %} +{% load i18n %} +{% block bodyclass %}{{ block.super }} app-{{ app_label }}{% endblock %} +{% if not is_popup %} + {% block breadcrumbs %} + + {% endblock %} +{% endif %} +{% block sidebar %}{% endblock %} diff --git a/tests/django_admin/admin/app_list.html b/tests/django_admin/admin/app_list.html new file mode 100644 index 0000000..b20be2a --- /dev/null +++ b/tests/django_admin/admin/app_list.html @@ -0,0 +1,63 @@ +{% load i18n %} +{% if app_list %} + {% for app in app_list %} +
+ + + {% for model in app.models %} + + {% if model.admin_url %} + + {% else %} + + {% endif %} + {% if model.add_url %} + + {% else %} + + {% endif %} + {% if model.admin_url and show_changelinks %} + {% if model.view_only %} + + {% else %} + + {% endif %} + {% elif show_changelinks %} + + {% endif %} + + {% endfor %} +
+ + {{ app.name }} + +
+ + {{ model.name }} + + {{ model.name }} + + {% translate 'Add' %} + + + + {% translate 'View' %} + + + + {% translate 'Change' %} + +
+
+{% endfor %} +{% else %} +

+{% translate 'You don’t have permission to view or edit anything.' %} +

+{% endif %} diff --git a/tests/django_admin/admin/auth/user/add_form.html b/tests/django_admin/admin/auth/user/add_form.html new file mode 100644 index 0000000..f757af4 --- /dev/null +++ b/tests/django_admin/admin/auth/user/add_form.html @@ -0,0 +1,13 @@ +{% extends "admin/change_form.html" %} +{% load i18n %} +{% block form_top %} + {% if not is_popup %} +

+ {% translate 'First, enter a username and password. Then, you’ll be able to edit more user options.' %} +

+ {% else %} +

+ {% translate "Enter a username and password." %} +

+ {% endif %} +{% endblock %} diff --git a/tests/django_admin/admin/auth/user/change_password.html b/tests/django_admin/admin/auth/user/change_password.html new file mode 100644 index 0000000..9892bf5 --- /dev/null +++ b/tests/django_admin/admin/auth/user/change_password.html @@ -0,0 +1,85 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% load admin_urls %} +{% block extrastyle %} + {{ block.super }} + +{% endblock %} +{% block bodyclass %} + {{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form +{% endblock %} +{% if not is_popup %} + {% block breadcrumbs %} + + {% endblock %} +{% endif %} +{% block content %} +
+
+ {% csrf_token %} + {% block form_top %}{% endblock %} + +
+ {% if is_popup %} + + {% endif %} + {% if form.errors %} +

+ {% if form.errors.items|length == 1 %} + {% translate "Please correct the error below." %} + {% else %} + {% translate "Please correct the errors below." %} + {% endif %} +

+ {% endif %} +

+ {% blocktranslate with username=original %} + Enter a new password for the user + {{ username }} + . + {% endblocktranslate %} +

+
+
+ {{ form.password1.errors }} + {{ form.password1.label_tag }} {{ form.password1 }} + {% if form.password1.help_text %} +
+ {{ form.password1.help_text|safe }} +
+ {% endif %} +
+
+ {{ form.password2.errors }} + {{ form.password2.label_tag }} {{ form.password2 }} + {% if form.password2.help_text %} +
+ {{ form.password2.help_text|safe }} +
+ {% endif %} +
+
+
+ +
+
+
+
+{% endblock %} diff --git a/tests/django_admin/admin/base.html b/tests/django_admin/admin/base.html new file mode 100644 index 0000000..89852c9 --- /dev/null +++ b/tests/django_admin/admin/base.html @@ -0,0 +1,122 @@ +{% load i18n static %} + +{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} + + + {% block title %}{% endblock %} + + {% if not is_popup and is_nav_sidebar_enabled %} + + + {% endif %} + {% block extrastyle %}{% endblock %} + {% if LANGUAGE_BIDI %} + + {% endif %} + {% block extrahead %}{% endblock %} + {% block responsive %} + + + {% if LANGUAGE_BIDI %} + + {% endif %} + {% endblock %} + {% block blockbots %}{% endblock %} + + + +
+ {% if not is_popup %} + + {% block header %} + {% endblock %} + + {% block breadcrumbs %} + + {% endblock %}{% endif %} +
+ {% if not is_popup and is_nav_sidebar_enabled %} + {% block nav-sidebar %} + {% include "admin/nav_sidebar.html" %}{% endblock %}{% endif %} +
+ {% block messages %} + {% if messages %} +
    + {% for message in messages %} + {{ message|capfirst }} + + {% endfor %} +
+ {% endif %} + {% endblock messages %} + +
+ {% block pretitle %}{% endblock %} + {% block content_title %}{% if title %} +

{{ title }}

+ {% endif %}{% endblock %} + {% block content_subtitle %}{% if subtitle %} +

{{ subtitle }}

+ {% endif %}{% endblock %} + {% block content %} + {% block object-tools %}{% endblock %} + {{ content }} + {% endblock %} + {% block sidebar %}{% endblock %} +
+
+ + {% block footer %} + + {% endblock %} +
+
+
+ + + diff --git a/tests/django_admin/admin/base_site.html b/tests/django_admin/admin/base_site.html new file mode 100644 index 0000000..524ced2 --- /dev/null +++ b/tests/django_admin/admin/base_site.html @@ -0,0 +1,13 @@ +{% extends "admin/base.html" %} +{% block title %} + {% if subtitle %}{{ subtitle }} |{% endif %} + {{ title }} | {{ site_title|default:_('Django site admin') }} +{% endblock %} +{% block branding %} +

+ + {{ site_header|default:_('Django administration') }} + +

+{% endblock %} +{% block nav-global %}{% endblock %} diff --git a/tests/django_admin/admin/change_form.html b/tests/django_admin/admin/change_form.html new file mode 100644 index 0000000..48d5671 --- /dev/null +++ b/tests/django_admin/admin/change_form.html @@ -0,0 +1,97 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_urls static admin_modify %} +{% block extrahead %} + {{ block.super }} + + {{ media }} +{% endblock %} +{% block extrastyle %} + {{ block.super }} + +{% endblock %} +{% block coltype %}colM{% endblock %} +{% block bodyclass %} + {{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form +{% endblock %} +{% if not is_popup %} + {% block breadcrumbs %} + + {% endblock %}{% endif %} + {% block content %} +
+ {% block object-tools %} + {% if change %} + {% if not is_popup %} +
    + {% block object-tools-items %} + {% change_form_object_tools %} + {% endblock %} +
+ {% endif %} + {% endif %} + {% endblock %} +
+ {% csrf_token %}{% block form_top %}{% endblock %} +
+ {% if is_popup %} + + {% endif %} + {% if to_field %} + + {% endif %} + {% if save_on_top %} + {% block submit_buttons_top %} + {% submit_row %}{% endblock %}{% endif %} + {% if errors %} +

+ {% if errors|length == 1 %}{% translate "Please correct the error below." %}{% else %} + {% translate "Please correct the errors below." %}{% endif %} +

+ {{ adminform.form.non_field_errors }} + {% endif %} + {% block field_sets %} + {% for fieldset in adminform %} + {% include "admin/includes/fieldset.html" %}{% endfor %} + {% endblock %} + {% block after_field_sets %}{% endblock %} + {% block inline_field_sets %} + {% for inline_admin_formset in inline_admin_formsets %} + {% include inline_admin_formset.opts.template %}{% endfor %} + {% endblock %} + {% block after_related_objects %}{% endblock %} + {% block submit_buttons_bottom %} + {% submit_row %}{% endblock %} + {% block admin_change_form_document_ready %} + + {% endblock %} + {# JavaScript for prepopulated fields #} + {% prepopulated_fields_js %} +
+
+
+ {% endblock %} diff --git a/tests/django_admin/admin/change_form_object_tools.html b/tests/django_admin/admin/change_form_object_tools.html new file mode 100644 index 0000000..6772453 --- /dev/null +++ b/tests/django_admin/admin/change_form_object_tools.html @@ -0,0 +1,16 @@ +{% load i18n admin_urls %} +{% block object-tools-items %} +
  • + {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %} + + {% translate "History" %} + +
  • + {% if has_absolute_url %} +
  • + + {% translate "View on site" %} + +
  • + {% endif %} +{% endblock %} diff --git a/tests/django_admin/admin/change_list.html b/tests/django_admin/admin/change_list.html new file mode 100644 index 0000000..ececaa4 --- /dev/null +++ b/tests/django_admin/admin/change_list.html @@ -0,0 +1,113 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_urls static admin_list %} +{% block extrastyle %} + {{ block.super }} + + {% if cl.formset %} + + {% endif %} + {% if cl.formset or action_form %} + + {% endif %} + {{ media.css }} + {% if not actions_on_top and not actions_on_bottom %} + + {% endif %} +{% endblock %} +{% block extrahead %} + {{ block.super }} + {{ media.js }} +{% endblock %} +{% block bodyclass %} + {{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list +{% endblock %} +{% if not is_popup %} + {% block breadcrumbs %} + + {% endblock %} +{% endif %} +{% block coltype %}{% endblock %} +{% block content %} +
    + {% block object-tools %} +
      + {% block object-tools-items %} + {% change_list_object_tools %} + {% endblock %} +
    + {% endblock %} + {% if cl.formset and cl.formset.errors %} +

    + {% if cl.formset.total_error_count == 1 %} + {% translate "Please correct the error below." %} + {% else %} + {% translate "Please correct the errors below." %} + {% endif %} +

    + {{ cl.formset.non_form_errors }} + {% endif %} +
    +
    + {% block search %} + {% search_form cl %} + {% endblock %} + {% block date_hierarchy %} + {% if cl.date_hierarchy %} + {% date_hierarchy cl %} + {% endif %} + {% endblock %} +
    + {% csrf_token %} + {% if cl.formset %} +
    + {{ cl.formset.management_form }} +
    + {% endif %} + {% block result_list %} + {% if action_form and actions_on_top and cl.show_admin_actions %} + {% admin_actions %} + {% endif %} + {% result_list cl %} + {% if action_form and actions_on_bottom and cl.show_admin_actions %} + {% admin_actions %} + {% endif %} + {% endblock %} + {% block pagination %} + {% pagination cl %} + {% endblock %} +
    +
    + {% block filters %} + {% if cl.has_filters %} +
    +

    {% translate 'Filter' %}

    + {% if cl.has_active_filters %} +

    + + ✖ {% translate "Clear all filters" %} + +

    + {% endif %} + {% for spec in cl.filter_specs %} + {% admin_list_filter cl spec %} + {% endfor %} +
    + {% endif %} + {% endblock %} +
    +
    +{% endblock %} diff --git a/tests/django_admin/admin/change_list_object_tools.html b/tests/django_admin/admin/change_list_object_tools.html new file mode 100644 index 0000000..26b5d47 --- /dev/null +++ b/tests/django_admin/admin/change_list_object_tools.html @@ -0,0 +1,13 @@ +{% load i18n admin_urls %} +{% block object-tools-items %} + {% if has_add_permission %} +
  • + {% url cl.opts|admin_urlname:'add' as add_url %} + + {% blocktranslate with cl.opts.verbose_name as name %} + Add {{ name }} + {% endblocktranslate %} + +
  • + {% endif %} +{% endblock %} diff --git a/tests/django_admin/admin/change_list_results.html b/tests/django_admin/admin/change_list_results.html new file mode 100644 index 0000000..12ae1a6 --- /dev/null +++ b/tests/django_admin/admin/change_list_results.html @@ -0,0 +1,59 @@ +{% load i18n %} +{% if result_hidden_fields %} +
    + {# DIV for HTML validation #} + {% for item in result_hidden_fields %}{{ item }}{% endfor %} +
    +{% endif %} +{% if results %} +
    + + + + {% for header in result_headers %} + + {% endfor %} + + + + {% for result in results %} + {% if result.form and result.form.non_field_errors %} + + + + {% endif %} + + {% for item in result %}{{ item }}{% endfor %} + + {% endfor %} + +
    + {% if header.sortable %} + {% if header.sort_priority > 0 %} +
    + + {% if num_sorted_fields > 1 %} + + {{ header.sort_priority }} + + {% endif %} + +
    + {% endif %} + {% endif %} +
    + {% if header.sortable %} + + {{ header.text|capfirst }} + + {% else %} + {{ header.text|capfirst }} + {% endif %} +
    +
    +
    {{ result.form.non_field_errors }}
    +
    +{% endif %} diff --git a/tests/django_admin/admin/date_hierarchy.html b/tests/django_admin/admin/date_hierarchy.html new file mode 100644 index 0000000..3975689 --- /dev/null +++ b/tests/django_admin/admin/date_hierarchy.html @@ -0,0 +1,25 @@ +{% if show %} +
    + +
    +
    +{% endif %} diff --git a/tests/django_admin/admin/delete_confirmation.html b/tests/django_admin/admin/delete_confirmation.html new file mode 100644 index 0000000..96f86db --- /dev/null +++ b/tests/django_admin/admin/delete_confirmation.html @@ -0,0 +1,84 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_urls static %} +{% block extrahead %} + {{ block.super }} + {{ media }} + +{% endblock %} +{% block bodyclass %} + {{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} + {% if perms_lacking %} +

    + {% blocktranslate with escaped_object=object %} + Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects: + {% endblocktranslate %} +

    +
      + {% for obj in perms_lacking %} +
    • + {{ obj }} +
    • + {% endfor %} +
    + {% elif protected %} +

    + {% blocktranslate with escaped_object=object %} + Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects: + {% endblocktranslate %} +

    +
      + {% for obj in protected %} +
    • + {{ obj }} +
    • + {% endfor %} +
    + {% else %} +

    + {% blocktranslate with escaped_object=object %} + Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted: + {% endblocktranslate %} +

    + {% include "admin/includes/object_delete_summary.html" %} +

    {% translate "Objects" %}

    +
      + {{ deleted_objects|unordered_list }} +
    +
    + {% csrf_token %} +
    + + {% if is_popup %} + + {% endif %} + {% if to_field %} + + {% endif %} + + + {% translate "No, take me back" %} + +
    +
    + {% endif %} +{% endblock %} diff --git a/tests/django_admin/admin/delete_selected_confirmation.html b/tests/django_admin/admin/delete_selected_confirmation.html new file mode 100644 index 0000000..7b87bcb --- /dev/null +++ b/tests/django_admin/admin/delete_selected_confirmation.html @@ -0,0 +1,80 @@ +{% extends "admin/base_site.html" %} +{% load i18n l10n admin_urls static %} +{% block extrahead %} + {{ block.super }} + {{ media }} + +{% endblock %} +{% block bodyclass %} + {{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} + {% if perms_lacking %} +

    + {% blocktranslate %} + Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects: + {% endblocktranslate %} +

    +
      + {% for obj in perms_lacking %} +
    • + {{ obj }} +
    • + {% endfor %} +
    + {% elif protected %} +

    + {% blocktranslate %} + Deleting the selected {{ objects_name }} would require deleting the following protected related objects: + {% endblocktranslate %} +

    +
      + {% for obj in protected %} +
    • + {{ obj }} +
    • + {% endfor %} +
    + {% else %} +

    + {% blocktranslate %} + Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted: + {% endblocktranslate %} +

    + {% include "admin/includes/object_delete_summary.html" %} +

    {% translate "Objects" %}

    + {% for deletable_object in deletable_objects %} +
      + {{ deletable_object|unordered_list }} +
    + {% endfor %} +
    + {% csrf_token %} +
    + {% for obj in queryset %} + + {% endfor %} + + + + + {% translate "No, take me back" %} + +
    +
    + {% endif %} +{% endblock %} diff --git a/tests/django_admin/admin/edit_inline/stacked.html b/tests/django_admin/admin/edit_inline/stacked.html new file mode 100644 index 0000000..dacb1a4 --- /dev/null +++ b/tests/django_admin/admin/edit_inline/stacked.html @@ -0,0 +1,53 @@ +{% load i18n admin_urls %} +
    +
    + {% if inline_admin_formset.formset.max_num == 1 %} +

    {{ inline_admin_formset.opts.verbose_name|capfirst }}

    + {% else %} +

    {{ inline_admin_formset.opts.verbose_name_plural|capfirst }}

    + {% endif %} + {{ inline_admin_formset.formset.management_form }} + {{ inline_admin_formset.formset.non_form_errors }} + {% for inline_admin_form in inline_admin_formset %} +
    +

    + + {{ inline_admin_formset.opts.verbose_name|capfirst }}: + + + {% if inline_admin_form.original %} + {{ inline_admin_form.original }} + {% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} + + {% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %} + + {% endif %} + {% else %} + #{{ forloop.counter }} + {% endif %} + + {% if inline_admin_form.show_url %} + + {% translate "View on site" %} + + {% endif %} + {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %} + + {{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }} + + {% endif %} +

    + {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %} + {% for fieldset in inline_admin_form %} + {% include "admin/includes/fieldset.html" %}{% endfor %} + {% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %} + {% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %} +
    + {% endfor %} +
    +
    diff --git a/tests/django_admin/admin/edit_inline/tabular.html b/tests/django_admin/admin/edit_inline/tabular.html new file mode 100644 index 0000000..491868b --- /dev/null +++ b/tests/django_admin/admin/edit_inline/tabular.html @@ -0,0 +1,110 @@ +{% load i18n admin_urls static admin_modify %} +
    + +
    diff --git a/tests/django_admin/admin/filter.html b/tests/django_admin/admin/filter.html new file mode 100644 index 0000000..e13d963 --- /dev/null +++ b/tests/django_admin/admin/filter.html @@ -0,0 +1,17 @@ +{% load i18n %} +

    + {% blocktranslate with filter_title=title %} + By {{ filter_title }} + {% endblocktranslate %} +

    + diff --git a/tests/django_admin/admin/includes/fieldset.html b/tests/django_admin/admin/includes/fieldset.html new file mode 100644 index 0000000..4d36059 --- /dev/null +++ b/tests/django_admin/admin/includes/fieldset.html @@ -0,0 +1,37 @@ +
    + {% if fieldset.name %}

    {{ fieldset.name }}

    {% endif %} + {% if fieldset.description %} +
    + {{ fieldset.description|safe }} +
    + {% endif %} + {% for line in fieldset %} +
    + {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %} + {% for field in line %} +
    + {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %} + {% if field.is_checkbox %} + {{ field.field }}{{ field.label_tag }} + {% else %} + {{ field.label_tag }} + {% if field.is_readonly %} +
    + {{ field.contents }} +
    + {% else %} + {{ field.field }} + {% endif %} + {% endif %} + {% if field.field.help_text %} +
    + {{ field.field.help_text|safe }} +
    + {% endif %} +
    + {% endfor %} +
    + {% endfor %} +
    diff --git a/tests/django_admin/admin/includes/object_delete_summary.html b/tests/django_admin/admin/includes/object_delete_summary.html new file mode 100644 index 0000000..ac8a4f6 --- /dev/null +++ b/tests/django_admin/admin/includes/object_delete_summary.html @@ -0,0 +1,9 @@ +{% load i18n %} +

    {% translate "Summary" %}

    +
      + {% for model_name, object_count in model_count %} +
    • + {{ model_name|capfirst }}: {{ object_count }} +
    • + {% endfor %} +
    diff --git a/tests/django_admin/admin/index.html b/tests/django_admin/admin/index.html new file mode 100644 index 0000000..867311b --- /dev/null +++ b/tests/django_admin/admin/index.html @@ -0,0 +1,53 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% block extrastyle %} + {{ block.super }} + +{% endblock %} +{% block coltype %}colMS{% endblock %} +{% block bodyclass %}{{ block.super }} dashboard{% endblock %} +{% block breadcrumbs %}{% endblock %} +{% block nav-sidebar %}{% endblock %} +{% block content %} +
    + {% include "admin/app_list.html" with app_list=app_list show_changelinks=True %} +
    +{% endblock %} +{% block sidebar %} + +{% endblock %} diff --git a/tests/django_admin/admin/invalid_setup.html b/tests/django_admin/admin/invalid_setup.html new file mode 100644 index 0000000..affaa9c --- /dev/null +++ b/tests/django_admin/admin/invalid_setup.html @@ -0,0 +1,13 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +

    + {% translate 'Something’s wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user.' %} +

    +{% endblock %} diff --git a/tests/django_admin/admin/login.html b/tests/django_admin/admin/login.html new file mode 100644 index 0000000..af36a68 --- /dev/null +++ b/tests/django_admin/admin/login.html @@ -0,0 +1,64 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% block extrastyle %} + {{ block.super }} + + {{ form.media }} +{% endblock %} +{% block bodyclass %}{{ block.super }} login{% endblock %} +{% block usertools %}{% endblock %} +{% block nav-global %}{% endblock %} +{% block nav-sidebar %}{% endblock %} +{% block content_title %}{% endblock %} +{% block breadcrumbs %}{% endblock %} +{% block content %} + {% if form.errors and not form.non_field_errors %} +

    + {% if form.errors.items|length == 1 %} + {% translate "Please correct the error below." %} + {% else %} + {% translate "Please correct the errors below." %} + {% endif %} +

    + {% endif %} + {% if form.non_field_errors %} + {% for error in form.non_field_errors %} +

    + {{ error }} +

    + {% endfor %} + {% endif %} +
    + {% if user.is_authenticated %} +

    + {% blocktranslate trimmed %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? + {% endblocktranslate %} +

    + {% endif %} +
    + {% csrf_token %} +
    + {{ form.username.errors }} + {{ form.username.label_tag }} {{ form.username }} +
    +
    + {{ form.password.errors }} + {{ form.password.label_tag }} {{ form.password }} + +
    + {% url 'admin_password_reset' as password_reset_url %} + {% if password_reset_url %} + + {% endif %} +
    + +
    +
    +
    +{% endblock %} diff --git a/tests/django_admin/admin/nav_sidebar.html b/tests/django_admin/admin/nav_sidebar.html new file mode 100644 index 0000000..4764137 --- /dev/null +++ b/tests/django_admin/admin/nav_sidebar.html @@ -0,0 +1,11 @@ +{% load i18n %} + + diff --git a/tests/django_admin/admin/object_history.html b/tests/django_admin/admin/object_history.html new file mode 100644 index 0000000..a28f59f --- /dev/null +++ b/tests/django_admin/admin/object_history.html @@ -0,0 +1,53 @@ +{% extends "admin/base_site.html" %} +{% load i18n admin_urls %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +
    +
    + {% if action_list %} + + + + + + + + + + {% for action in action_list %} + + + + + + {% endfor %} + +
    {% translate 'Date/time' %}{% translate 'User' %}{% translate 'Action' %}
    {{ action.action_time|date:"DATETIME_FORMAT" }} + {{ action.user.get_username }} + {% if action.user.get_full_name %}({{ action.user.get_full_name }}){% endif %} + {{ action.get_change_message }}
    + {% else %} +

    + {% translate 'This object doesn’t have a change history. It probably wasn’t added via this admin site.' %} +

    + {% endif %} +
    +
    +{% endblock %} diff --git a/tests/django_admin/admin/pagination.html b/tests/django_admin/admin/pagination.html new file mode 100644 index 0000000..891bdd6 --- /dev/null +++ b/tests/django_admin/admin/pagination.html @@ -0,0 +1,23 @@ +{% load admin_list %} +{% load i18n %} +

    + {% if pagination_required %} + {% for i in page_range %} + {% paginator_number cl i %} + {% endfor %} + {% endif %} + {{ cl.result_count }} + {% if cl.result_count == 1 %} + {{ cl.opts.verbose_name }} + {% else %} + {{ cl.opts.verbose_name_plural }} + {% endif %} + {% if show_all_url %} + + {% translate 'Show all' %} + + {% endif %} + {% if cl.formset and cl.result_count %} + + {% endif %} +

    diff --git a/tests/django_admin/admin/popup_response.html b/tests/django_admin/admin/popup_response.html new file mode 100644 index 0000000..830bbc3 --- /dev/null +++ b/tests/django_admin/admin/popup_response.html @@ -0,0 +1,10 @@ +{% load i18n static %} + + + + {% translate 'Popup closing…' %} + + + + + diff --git a/tests/django_admin/admin/prepopulated_fields_js.html b/tests/django_admin/admin/prepopulated_fields_js.html new file mode 100644 index 0000000..c42ebcd --- /dev/null +++ b/tests/django_admin/admin/prepopulated_fields_js.html @@ -0,0 +1,2 @@ +{% load static %} + diff --git a/tests/django_admin/admin/search_form.html b/tests/django_admin/admin/search_form.html new file mode 100644 index 0000000..ec2f252 --- /dev/null +++ b/tests/django_admin/admin/search_form.html @@ -0,0 +1,44 @@ +{% load i18n static %} +{% if cl.search_fields %} +
    + +
    +{% endif %} diff --git a/tests/django_admin/admin/submit_line.html b/tests/django_admin/admin/submit_line.html new file mode 100644 index 0000000..dee59b6 --- /dev/null +++ b/tests/django_admin/admin/submit_line.html @@ -0,0 +1,32 @@ +{% load i18n admin_urls %} +
    + {% block submit-row %} + {% if show_save %} + + {% endif %} + {% if show_delete_link and original %} + {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} + + {% endif %} + {% if show_save_as_new %} + + {% endif %} + {% if show_save_and_add_another %} + + {% endif %} + {% if show_save_and_continue %} + + {% endif %} + {% if show_close %} + + {% translate 'Close' %} + + {% endif %} + {% endblock %} +
    diff --git a/tests/django_admin/admin/widgets/clearable_file_input.html b/tests/django_admin/admin/widgets/clearable_file_input.html new file mode 100644 index 0000000..c24d089 --- /dev/null +++ b/tests/django_admin/admin/widgets/clearable_file_input.html @@ -0,0 +1,21 @@ +{% if widget.is_initial %} +

    + {{ widget.initial_text }}: + {{ widget.value }} + {% if not widget.required %} + + + + + {% endif %} +
    + {{ widget.input_text }}: + {% endif %} + + {% if widget.is_initial %}

    {% endif %} diff --git a/tests/django_admin/admin/widgets/foreign_key_raw_id.html b/tests/django_admin/admin/widgets/foreign_key_raw_id.html new file mode 100644 index 0000000..ee61804 --- /dev/null +++ b/tests/django_admin/admin/widgets/foreign_key_raw_id.html @@ -0,0 +1,11 @@ +{% include 'django/forms/widgets/input.html' %} +{% if related_url %} + +{% endif %} +{% if link_label %} + + {% if link_url %}{% endif %} + {{ link_label }} + {% if link_url %}{% endif %} + +{% endif %} diff --git a/tests/django_admin/admin/widgets/many_to_many_raw_id.html b/tests/django_admin/admin/widgets/many_to_many_raw_id.html new file mode 100644 index 0000000..0dd0331 --- /dev/null +++ b/tests/django_admin/admin/widgets/many_to_many_raw_id.html @@ -0,0 +1 @@ +{% include 'admin/widgets/foreign_key_raw_id.html' %} diff --git a/tests/django_admin/admin/widgets/radio.html b/tests/django_admin/admin/widgets/radio.html new file mode 100644 index 0000000..780899a --- /dev/null +++ b/tests/django_admin/admin/widgets/radio.html @@ -0,0 +1 @@ +{% include "django/forms/widgets/multiple_input.html" %} diff --git a/tests/django_admin/admin/widgets/related_widget_wrapper.html b/tests/django_admin/admin/widgets/related_widget_wrapper.html new file mode 100644 index 0000000..176d89a --- /dev/null +++ b/tests/django_admin/admin/widgets/related_widget_wrapper.html @@ -0,0 +1,34 @@ +{% load i18n static %} + diff --git a/tests/django_admin/admin/widgets/split_datetime.html b/tests/django_admin/admin/widgets/split_datetime.html new file mode 100644 index 0000000..8d4f327 --- /dev/null +++ b/tests/django_admin/admin/widgets/split_datetime.html @@ -0,0 +1,7 @@ +

    + {{ date_label }} {% with widget=widget.subwidgets.0 %} + {% include widget.template_name %}{% endwith %} +
    + {{ time_label }} {% with widget=widget.subwidgets.1 %} + {% include widget.template_name %}{% endwith %} +

    diff --git a/tests/django_admin/admin/widgets/url.html b/tests/django_admin/admin/widgets/url.html new file mode 100644 index 0000000..2777d8a --- /dev/null +++ b/tests/django_admin/admin/widgets/url.html @@ -0,0 +1,9 @@ +{% if url_valid %} +

    + {{ current_label }} + {{ widget.value }} +
    + {{ change_label }} + {% endif %} + {% include "django/forms/widgets/input.html" %} + {% if url_valid %}

    {% endif %} diff --git a/tests/django_admin/registration/logged_out.html b/tests/django_admin/registration/logged_out.html new file mode 100644 index 0000000..be03861 --- /dev/null +++ b/tests/django_admin/registration/logged_out.html @@ -0,0 +1,16 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block nav-sidebar %}{% endblock %} +{% block content %} +

    + {% translate "Thanks for spending some quality time with the Web site today." %} +

    +

    + {% translate 'Log in again' %} +

    +{% endblock %} diff --git a/tests/django_admin/registration/password_change_done.html b/tests/django_admin/registration/password_change_done.html new file mode 100644 index 0000000..a035040 --- /dev/null +++ b/tests/django_admin/registration/password_change_done.html @@ -0,0 +1,24 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block userlinks %} + {% url 'django-admindocs-docroot' as docsroot %} + {% if docsroot %} + {% translate 'Documentation' %} + / + {% endif %} + {% translate 'Change password' %} / + + {% translate 'Log out' %} + +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +

    + {% translate 'Your password was changed.' %} +

    +{% endblock %} diff --git a/tests/django_admin/registration/password_change_form.html b/tests/django_admin/registration/password_change_form.html new file mode 100644 index 0000000..e445528 --- /dev/null +++ b/tests/django_admin/registration/password_change_form.html @@ -0,0 +1,71 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% block extrastyle %} + {{ block.super }} + +{% endblock %} +{% block userlinks %} + {% url 'django-admindocs-docroot' as docsroot %} + {% if docsroot %} + {% translate 'Documentation' %} + / + {% endif %} + {% translate 'Change password' %} / + + {% translate 'Log out' %} + +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +
    +
    + {% csrf_token %} +
    + {% if form.errors %} +

    + {% if form.errors.items|length == 1 %} + {% translate "Please correct the error below." %} + {% else %} + {% translate "Please correct the errors below." %} + {% endif %} +

    + {% endif %} +

    + {% translate 'Please enter your old password, for security’s sake, and then enter your new password twice so we can verify you typed it in correctly.' %} +

    +
    +
    + {{ form.old_password.errors }} + {{ form.old_password.label_tag }} {{ form.old_password }} +
    +
    + {{ form.new_password1.errors }} + {{ form.new_password1.label_tag }} {{ form.new_password1 }} + {% if form.new_password1.help_text %} +
    + {{ form.new_password1.help_text|safe }} +
    + {% endif %} +
    +
    + {{ form.new_password2.errors }} + {{ form.new_password2.label_tag }} {{ form.new_password2 }} + {% if form.new_password2.help_text %} +
    + {{ form.new_password2.help_text|safe }} +
    + {% endif %} +
    +
    +
    + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_admin/registration/password_reset_complete.html b/tests/django_admin/registration/password_reset_complete.html new file mode 100644 index 0000000..2ed2b87 --- /dev/null +++ b/tests/django_admin/registration/password_reset_complete.html @@ -0,0 +1,16 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +

    + {% translate "Your password has been set. You may go ahead and log in now." %} +

    +

    + {% translate 'Log in' %} +

    +{% endblock %} diff --git a/tests/django_admin/registration/password_reset_confirm.html b/tests/django_admin/registration/password_reset_confirm.html new file mode 100644 index 0000000..1f8c454 --- /dev/null +++ b/tests/django_admin/registration/password_reset_confirm.html @@ -0,0 +1,44 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% block extrastyle %} + {{ block.super }} + +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} + {% if validlink %} +

    + {% translate "Please enter your new password twice so we can verify you typed it in correctly." %} +

    +
    + {% csrf_token %} +
    + +
    + {{ form.new_password1.errors }} + + {{ form.new_password1 }} +
    +
    + {{ form.new_password2.errors }} + + {{ form.new_password2 }} +
    + +
    +
    + {% else %} +

    + {% translate "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %} +

    + {% endif %} +{% endblock %} diff --git a/tests/django_admin/registration/password_reset_done.html b/tests/django_admin/registration/password_reset_done.html new file mode 100644 index 0000000..c4dfd5f --- /dev/null +++ b/tests/django_admin/registration/password_reset_done.html @@ -0,0 +1,16 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +

    + {% translate 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %} +

    +

    + {% translate 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %} +

    +{% endblock %} diff --git a/tests/django_admin/registration/password_reset_email.html b/tests/django_admin/registration/password_reset_email.html new file mode 100644 index 0000000..da66e81 --- /dev/null +++ b/tests/django_admin/registration/password_reset_email.html @@ -0,0 +1,15 @@ +{% load i18n %} +{% autoescape off %} +{% blocktranslate %} + You're receiving this email because you requested a password reset for your user account at {{ site_name }}. +{% endblocktranslate %} +{% translate "Please go to the following page and choose a new password:" %} +{% block reset_link %} + {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} +{% endblock %} +{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }} +{% translate "Thanks for using our site!" %} +{% blocktranslate %} + The {{ site_name }} team +{% endblocktranslate %} +{% endautoescape %} diff --git a/tests/django_admin/registration/password_reset_form.html b/tests/django_admin/registration/password_reset_form.html new file mode 100644 index 0000000..82a204d --- /dev/null +++ b/tests/django_admin/registration/password_reset_form.html @@ -0,0 +1,30 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% block extrastyle %} + {{ block.super }} + +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +

    + {% translate 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %} +

    +
    + {% csrf_token %} +
    +
    + {{ form.email.errors }} + + {{ form.email }} +
    + +
    +
    +{% endblock %} diff --git a/tests/django_cms/admin/cms/extensions/change_form.html b/tests/django_cms/admin/cms/extensions/change_form.html new file mode 100644 index 0000000..13c2e7d --- /dev/null +++ b/tests/django_cms/admin/cms/extensions/change_form.html @@ -0,0 +1,17 @@ +{% extends "admin/change_form.html" %} +{% load i18n admin_urls %} +{% block submit_buttons_bottom %} +
    + + {% if not add %} + + {% endif %} +
    +{% endblock %} diff --git a/tests/django_cms/admin/cms/mail/base.html b/tests/django_cms/admin/cms/mail/base.html new file mode 100644 index 0000000..d1ce925 --- /dev/null +++ b/tests/django_cms/admin/cms/mail/base.html @@ -0,0 +1,73 @@ +{% load i18n %} + + + + {{ title }} + + + + + + + + + + + + +
    +
    +

    {{ title }}

    + {% block header %}{% endblock %} +
    + {% block content %}{% endblock %} +
    +

    + {% blocktrans %} + Log in to administration + here + . + {% endblocktrans %} +

    +

    + Generated by + + django cms + + {% now "d.m.Y H:i:s" %}. +

    +
    + + diff --git a/tests/django_cms/admin/cms/mail/base.txt b/tests/django_cms/admin/cms/mail/base.txt new file mode 100644 index 0000000..9e7d387 --- /dev/null +++ b/tests/django_cms/admin/cms/mail/base.txt @@ -0,0 +1,10 @@ +{% load i18n %} + +{{ title }} +-------------- +{% block header %}{% endblock %} +{% block content %}{% endblock %} + +{% blocktrans %}Login url: {{ login_url }}{% endblocktrans %} + +[Generated by: http://www.django-cms.org {% now "d.m.Y H:i:s" %}.] diff --git a/tests/django_cms/admin/cms/mail/page_user_change.html b/tests/django_cms/admin/cms/mail/page_user_change.html new file mode 100644 index 0000000..571e384 --- /dev/null +++ b/tests/django_cms/admin/cms/mail/page_user_change.html @@ -0,0 +1,14 @@ +{% extends 'admin/cms/mail/base.html' %} +{% load i18n %} +{% block content %} + + + + + + + + + +
    {% trans 'Username:' %}{{ user.username }}
    {% trans 'Password:' %}{{ password }}
    +{% endblock %} diff --git a/tests/django_cms/admin/cms/mail/page_user_change.txt b/tests/django_cms/admin/cms/mail/page_user_change.txt new file mode 100644 index 0000000..e901847 --- /dev/null +++ b/tests/django_cms/admin/cms/mail/page_user_change.txt @@ -0,0 +1,7 @@ +{% extends 'admin/cms/mail/base.txt' %} +{% load i18n %} + +{% block content %} + {% trans 'Username:' %} {{ user.username }} + {% trans 'Password:' %} {{ password }} +{% endblock %} diff --git a/tests/django_cms/admin/cms/page/change_form.html b/tests/django_cms/admin/cms/page/change_form.html new file mode 100644 index 0000000..53a51ad --- /dev/null +++ b/tests/django_cms/admin/cms/page/change_form.html @@ -0,0 +1,130 @@ +{% extends "admin/change_form.html" %} +{% load i18n admin_urls static admin_modify admin_urls cms_admin cms_static %} +{% block title %} + {% if add %} + {% trans 'Add a page' %} + {% else %} + {% trans "Change a page" %} + {% endif %} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block extrahead %} + + + + + {{ block.super }} +{% endblock %} +{% block content_title %} + {% if title %}

    {{ title }}

    {% endif %} + {% if not popup and not add %} + + {% endif %} +{% endblock %} +{% block content %} +
    + {% block object-tools %}{% endblock %} +
    + {% csrf_token %} + {% block form_top %}{% endblock %} +
    + {% if show_language_tabs and not show_permissions %} +
    + {% for lang_code, lang_name in language_tabs %} + + {% endfor %} +
    +
    + {% endif %} +
    + {% if is_popup %}{% endif %} + {% if save_on_top %}{% submit_row %}{% endif %} + {% if errors %} +

    + {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} +

    +
      {% for error in adminform.form.non_field_errors %}
    • {{ error }}
    • {% endfor %}
    + {% endif %} + {% for fieldset in adminform %} + {% include "admin/cms/page/includes/fieldset.html" %}{% endfor %} + {% for inline_admin_formset in inline_admin_formsets %} + {% include inline_admin_formset.opts.template %}{% endfor %} + {% if show_permissions %} + {% if CMS_PERMISSION and can_change_permissions %} +
    + +
    + {% endif %} + {% endif %} + {% block after_related_objects %}{% endblock %} + {% if add %} +
    + + +
    + {% else %} + {% page_submit_row %} + {% endif %} +
    +
    +
    + {% block admin_change_form_document_ready %} + {{ block.super }} + {% endblock %} + {% for url in unihandecode_urls %}{% endfor %} + {% if unihandecode_urls %} + + {% endif %} + {# JavaScript for prepopulated fields #} + {% prepopulated_fields_js %} + {% endblock %} diff --git a/tests/django_cms/admin/cms/page/close_frame.html b/tests/django_cms/admin/cms/page/close_frame.html new file mode 100644 index 0000000..dd8df67 --- /dev/null +++ b/tests/django_cms/admin/cms/page/close_frame.html @@ -0,0 +1,37 @@ +{% extends "admin/change_form.html" %} +{% load i18n l10n static cms_static %} +{% block title %} + {% trans "Change a page" %} +{% endblock %} +{% block content %} + {# trick for cms to understand that the plugin was actually correctly saved #} +
    +
    +
    + + +{% endblock %} diff --git a/tests/django_cms/admin/cms/page/includes/fieldset.html b/tests/django_cms/admin/cms/page/includes/fieldset.html new file mode 100644 index 0000000..e95a550 --- /dev/null +++ b/tests/django_cms/admin/cms/page/includes/fieldset.html @@ -0,0 +1 @@ +{% extends "admin/includes/fieldset.html" %} diff --git a/tests/django_cms/admin/cms/page/permissions.html b/tests/django_cms/admin/cms/page/permissions.html new file mode 100644 index 0000000..50034e2 --- /dev/null +++ b/tests/django_cms/admin/cms/page/permissions.html @@ -0,0 +1,75 @@ +{% load i18n cms_admin cms_tags admin_urls %} +{% if rows %} + + + + + + + + + + + + + + + + + + {% for row in rows %} + {% with permission=row.permission %} + + + + + + + + + + + + + + {% endwith %} + {% endfor %} + +
    {% trans "Page" %}{% trans "User" %}{% trans "Group" %}{% trans "Can edit" %}{% trans "Can add" %}{% trans "Can delete" %}{% trans "Can publish" %}{% trans "Can change permissions" %}{% trans "Can move" %}{% trans "Can view" %} + {% trans "Grant on" %} +
    + {% if row.is_global %} + {% if row.can_change %} + + {% trans "(global)" %} + + {% else %} + {% trans "(global)" %} + {% endif %} + {% else %} + {% if permission.page_id == page.id %} + {% trans "(current)" %} + {% else %} + {% if row.can_change %} + + {{ permission.page }} + + {% else %} + {{ permission.page }} + {% endif %} + {% endif %} + {% endif %} + {{ permission.user|default_if_none:"-" }}{{ permission.group|default_if_none:"-" }}{{ permission.can_change|boolean_icon }}{{ permission.can_add|boolean_icon }}{{ permission.can_delete|boolean_icon }}{{ permission.can_publish|boolean_icon }} + {{ permission.can_change_permissions|boolean_icon }} + {{ permission.can_move_page|boolean_icon }}{{ permission.can_view|boolean_icon }} + {% if row.is_global %} + {% trans "All" %} + {% else %} + {{ permission.get_grant_on_display }} + {% endif %} +
    +{% else %} +

    + {% trans "Page doesn't inherit any permissions." %} +

    +{% endif %} diff --git a/tests/django_cms/admin/cms/page/plugin/change_form.html b/tests/django_cms/admin/cms/page/plugin/change_form.html new file mode 100644 index 0000000..7ee17e1 --- /dev/null +++ b/tests/django_cms/admin/cms/page/plugin/change_form.html @@ -0,0 +1,16 @@ +{% extends "admin/change_form.html" %} +{% load cms_admin cms_static %} +{% block extrahead %} + {# in case plugins require widgets, they need to have bundle here #} + + + {{ block.super }} +{% endblock %} +{% block submit_buttons_bottom %} + {% submit_row_plugin %} +{% endblock %} diff --git a/tests/django_cms/admin/cms/page/plugin/confirm_form.html b/tests/django_cms/admin/cms/page/plugin/confirm_form.html new file mode 100644 index 0000000..abf89d7 --- /dev/null +++ b/tests/django_cms/admin/cms/page/plugin/confirm_form.html @@ -0,0 +1 @@ +{% extends "admin/cms/page/close_frame.html" %} diff --git a/tests/django_cms/admin/cms/page/plugin/delete_confirmation.html b/tests/django_cms/admin/cms/page/plugin/delete_confirmation.html new file mode 100644 index 0000000..e99f71e --- /dev/null +++ b/tests/django_cms/admin/cms/page/plugin/delete_confirmation.html @@ -0,0 +1,3 @@ +{% extends "admin/delete_confirmation.html" %} +{% load i18n admin_urls cms_tags %} +{% block breadcrumbs %}{% endblock %} diff --git a/tests/django_cms/admin/cms/page/plugin/error_form.html b/tests/django_cms/admin/cms/page/plugin/error_form.html new file mode 100644 index 0000000..e9fee09 --- /dev/null +++ b/tests/django_cms/admin/cms/page/plugin/error_form.html @@ -0,0 +1,17 @@ +{% extends "admin/change_form.html" %} +{% load i18n l10n static %} +{% block title %} + {% trans "Edit model" %} +{% endblock %} +{% block content %} +
    + {% csrf_token %} +
    +
    +
    + {{ message }} +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_cms/admin/cms/page/plugin/submit_line.html b/tests/django_cms/admin/cms/page/plugin/submit_line.html new file mode 100644 index 0000000..852a398 --- /dev/null +++ b/tests/django_cms/admin/cms/page/plugin/submit_line.html @@ -0,0 +1,22 @@ +{% load i18n admin_urls cms_tags %} +
    + {% if show_save %} + + {% endif %} + {% if show_delete_link %} + + {% endif %} + {% if show_save_as_new %} + + {% endif %} + {% if show_save_and_add_another %} + + {% endif %} + {% if show_save_and_continue %} + + {% endif %} +
    diff --git a/tests/django_cms/admin/cms/page/submit_row.html b/tests/django_cms/admin/cms/page/submit_row.html new file mode 100644 index 0000000..91199e8 --- /dev/null +++ b/tests/django_cms/admin/cms/page/submit_row.html @@ -0,0 +1,34 @@ +{% load i18n cms_tags admin_urls %} +
    + {% if show_save %} + + {% endif %} + +{% if show_save_as_new %} + +{% endif %} +{% if show_save_and_add_another %} + +{% endif %} +{% if show_save_and_continue %} + +{% endif %} +
    diff --git a/tests/django_cms/admin/cms/page/tree/actions_dropdown.html b/tests/django_cms/admin/cms/page/tree/actions_dropdown.html new file mode 100644 index 0000000..8f4fa55 --- /dev/null +++ b/tests/django_cms/admin/cms/page/tree/actions_dropdown.html @@ -0,0 +1,162 @@ +{% load i18n admin_urls %} +{% spaceless %} + + {% endspaceless %} diff --git a/tests/django_cms/admin/cms/page/tree/base.html.broken b/tests/django_cms/admin/cms/page/tree/base.html.broken new file mode 100644 index 0000000..891ca49 --- /dev/null +++ b/tests/django_cms/admin/cms/page/tree/base.html.broken @@ -0,0 +1,182 @@ +{% extends "admin/change_list.html" %} +{% load i18n admin_list static admin_urls cms_admin cms_js_tags cms_static cms_tags %} + +{# TODO might not need that #} +{% block title %}{% trans "List of pages" %}{% endblock %} +{% block bodyclass %}{{ block.super }} change-list cms-pagetree-wrapper{% endblock %} +{% block coltype %}flex{% endblock %} +{% block date_hierarchy %}{% endblock %} +{% block pagination %}{% endblock %} + +{% block extrahead %} + {{ block.super }} + {# INFO: we need to add styles here instead of "extrastyle" to avoid conflicts with adminstyle #} + + + + +{% endblock extrahead %} + +{% if not is_popup %} + {% block breadcrumbs %} + + {% endblock %} +{% endif %} + +{% block content_title %}{% endblock %} + +{% block content %} + {% spaceless %} +
    +
    +
    +
    +
    +
    +
    +

    + {% trans "Page Tree" %} ({{ tree.site.name }}) +

    +
    + + {% if tree.is_filtered or request.GET.q %} + {# INFO: show reset button when filtering is active #} + {% trans "Reset filter"|lower %} + {% endif %} +
    + +
    +
    + +
    + {# INFO: hidden search field with dynamic content #} +
    +
    + +
    +
    +
    + + {# INFO: dropdown for changing sites and recover deleted pages #} +
    + + + +
    + +
    + {# INFO: hidden site form when using the dropdown site switcher #} +
    + + {% csrf_token %} +
    +
    + + {# INFO: "new page" button #} + {% if has_add_permission %} + + {% blocktrans with opts.verbose_name|title as name %} + New {{ name }} + {% endblocktrans %} + + {% endif %} +
    +
    + +
    {% csrf_token %} +
    +

    {% trans "Main Navigation" %}

    +
    + {% if has_add_permission %} + + {% endif %} +
    +
    + + {# INFO: javascript is loaded from cms.pagetree.js #} + +
    + + {# INFO: used when copying nodes #} +
    +
    +
    + {% endspaceless %} +{% endblock content %} diff --git a/tests/django_cms/admin/cms/page/tree/copy_premissions.html b/tests/django_cms/admin/cms/page/tree/copy_premissions.html new file mode 100644 index 0000000..357da2f --- /dev/null +++ b/tests/django_cms/admin/cms/page/tree/copy_premissions.html @@ -0,0 +1,16 @@ +{% load i18n %} +
    +

    {% trans "Copy options" %}

    +

    + {% trans "Choose copy options" %} +

    +
    + {% csrf_token %} + {{ form.as_p }} +
    + + +
    +
    +
    +
    diff --git a/tests/django_cms/admin/cms/page/tree/filter.html b/tests/django_cms/admin/cms/page/tree/filter.html new file mode 100644 index 0000000..fdb9299 --- /dev/null +++ b/tests/django_cms/admin/cms/page/tree/filter.html @@ -0,0 +1,13 @@ +{% load i18n %} +

    {{ field.label }}

    + diff --git a/tests/django_cms/admin/cms/page/tree/legend.html b/tests/django_cms/admin/cms/page/tree/legend.html new file mode 100644 index 0000000..e098e66 --- /dev/null +++ b/tests/django_cms/admin/cms/page/tree/legend.html @@ -0,0 +1,77 @@ +{% load i18n %} +{% spaceless %} +
    + +
    + + + {% trans "Legend" %} + +
    +
    +
      +
    • + + + {% trans "Published" %} + +
    • +
    • + + + {% trans "Changed" %} + +
    • +
    • + + + {% trans "Unpublished" %} + +
    • +
    • + + + {% trans "Empty" %} + +
    • +
    • + + + {% trans "In menu" %} + +
    • +
    • + + + {% trans "Not in menu" %} + +
    • +
    • + + + {% trans "View page" %} + +
    • +
    • + + + {% trans "Home" %} + +
    • +
    • + + + {% trans "Softroot" %} + +
    • +
    • + + + {% trans "Apphook" %} + +
    • +
    +
    +
    +
    +{% endspaceless %} diff --git a/tests/django_cms/admin/cms/page/tree/menu.html.brocken b/tests/django_cms/admin/cms/page/tree/menu.html.brocken new file mode 100644 index 0000000..b2be5f5 --- /dev/null +++ b/tests/django_cms/admin/cms/page/tree/menu.html.brocken @@ -0,0 +1,282 @@ +{% load i18n cms_admin admin_urls %} + +{# INFO: columns are defined in base.html options #} +{% spaceless %} +
    + + + {% endif %} + {% if page.soft_root %} +
    +
    +
    + + + +
    +
    +
    + {% endif %} + {% if page.application_urls %} +
    +
    +
    + + + +
    +
    +
    + {% endif %} + {% endblock %} + + + ' + data-colpreview=' + + ' + {% for lang in site_languages %} + data-col{{ lang|lower|cut:'-' }}=' +
    +
    +
    + {% if has_publish_permission %} + + {# INFO: renders #} + {% tree_publish_row page lang %} + + +
    + +
    + {% else %} + + {% tree_publish_row page lang %} + + {% endif %} +
    +
    +
    + ' + {% endfor %} + data-colmenu=' + + ' + data-coloptions=' + + + + + ' + {% block extra_cols %}{% endblock %} + > + + {% language LANGUAGE_CODE %} + {{ page.get_admin_tree_title }} + {% endlanguage %} + + {# INFO render children #} + {% if descendants %} +
      + {% show_admin_menu_for_pages descendants depth=node.depth|add:1 %} +
    + {% endif %} + +{% endspaceless %} diff --git a/tests/django_cms/admin/cms/usersettings/change_form.html b/tests/django_cms/admin/cms/usersettings/change_form.html new file mode 100644 index 0000000..9874df8 --- /dev/null +++ b/tests/django_cms/admin/cms/usersettings/change_form.html @@ -0,0 +1,50 @@ +{% extends "admin/change_form.html" %} +{% load i18n cms_tags %} +{% block extrahead %} + {{ block.super }} + +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block object-tools %}{% endblock %} +{% block submit_buttons_bottom %} +
    + +
    +{% endblock %} diff --git a/tests/django_cms/cms/content.html b/tests/django_cms/cms/content.html new file mode 100644 index 0000000..cddd070 --- /dev/null +++ b/tests/django_cms/cms/content.html @@ -0,0 +1 @@ +{{ content }} diff --git a/tests/django_cms/cms/dummy.html b/tests/django_cms/cms/dummy.html new file mode 100644 index 0000000..f04fcf5 --- /dev/null +++ b/tests/django_cms/cms/dummy.html @@ -0,0 +1 @@ +{% extends template %} diff --git a/tests/django_cms/cms/plugins/alias.html b/tests/django_cms/cms/plugins/alias.html new file mode 100644 index 0000000..2982692 --- /dev/null +++ b/tests/django_cms/cms/plugins/alias.html @@ -0,0 +1,4 @@ +{% load cms_alias_tags %} +{% if request and not instance.is_recursive %} + {% render_alias_plugin instance %} +{% endif %} diff --git a/tests/django_cms/cms/toolbar/clipboard.html b/tests/django_cms/cms/toolbar/clipboard.html new file mode 100644 index 0000000..c923c45 --- /dev/null +++ b/tests/django_cms/cms/toolbar/clipboard.html @@ -0,0 +1,8 @@ +{% load i18n cms_admin %} +
    +
    +
    + {% if clipboard_plugin %} + {% include cms_toolbar.templates.drag_item_template with clipboard="true" plugin=clipboard_plugin %}{% endif %} +
    +
    diff --git a/tests/django_cms/cms/toolbar/content.html b/tests/django_cms/cms/toolbar/content.html new file mode 100644 index 0000000..4a428d2 --- /dev/null +++ b/tests/django_cms/cms/toolbar/content.html @@ -0,0 +1,2 @@ +{% if edit and placeholder %}{{ placeholder }}{% endif %} +{{ content }} diff --git a/tests/django_cms/cms/toolbar/dragbar.html b/tests/django_cms/cms/toolbar/dragbar.html new file mode 100644 index 0000000..841b57f --- /dev/null +++ b/tests/django_cms/cms/toolbar/dragbar.html @@ -0,0 +1,66 @@ +{% load i18n l10n cms_tags %} +
    +
    + +
    +
    +
    +
    + + {% for language in placeholder.get_filled_languages %} + {% if language.code != LANGUAGE_CODE %} + + {% endif %} + {% endfor %} + + + {% render_extra_menu_items placeholder %} +
    +
    +
    +
    + +
    + {# plugin child classes here #} +
    +
    + {{ placeholder.get_label }} + {% if placeholder.is_static %} + + + + {% endif %} + + + {% trans "Expand all" %} + + + {% trans "Collapse all" %} + + +
    +
    diff --git a/tests/django_cms/cms/toolbar/dragitem.html b/tests/django_cms/cms/toolbar/dragitem.html new file mode 100644 index 0000000..ef49b78 --- /dev/null +++ b/tests/django_cms/cms/toolbar/dragitem.html @@ -0,0 +1,77 @@ +{% load i18n l10n cms_tags %} +{% with allow_children=plugin.get_plugin_class.allow_children disable_child_plugins=plugin.get_plugin_class.disable_child_plugins %} +
    +
    +{% if not disabled_child %} +
    + +
    +
    + {% if not allow_children %} + + {% else %} + + {% endif %} +
    +
    +{% else %} +
    + +
    +{% endif %} +
    +
    + + + + + {% render_extra_menu_items plugin %} +
    +
    +{% if not clipboard %} +
    +
    + +
    + {# plugin child classes here #} +
    +{% endif %} + +{{ plugin.get_plugin_name }} +{{ plugin.get_short_description }} + +
    +
    +{% if plugin.child_plugin_instances %} +{% for child in plugin.child_plugin_instances %} +{% include cms_toolbar.templates.drag_item_template with plugin=child disabled_child=disable_child_plugins %}{% endfor %} +{% endif %} +
    +
    +{% endwith %} diff --git a/tests/django_cms/cms/toolbar/dragitem_extra_menu.html b/tests/django_cms/cms/toolbar/dragitem_extra_menu.html new file mode 100644 index 0000000..623feec --- /dev/null +++ b/tests/django_cms/cms/toolbar/dragitem_extra_menu.html @@ -0,0 +1,20 @@ +{% load i18n %} + +{% for item in items %} + +{% endfor %} diff --git a/tests/django_cms/cms/toolbar/dragitem_menu.html b/tests/django_cms/cms/toolbar/dragitem_menu.html new file mode 100644 index 0000000..d25c4ef --- /dev/null +++ b/tests/django_cms/cms/toolbar/dragitem_menu.html @@ -0,0 +1,22 @@ +{% load i18n %} +{% regroup plugin_menu by module as module_list %} +{% for module in module_list %} +
    + + {% if module.grouper %} + {{ module.grouper|capfirst }} + {% else %} + {% trans "Available plugins" %} + {% endif %} + +
    + {% for p in module.list %} + {% if p.value != 'AliasPlugin' and p.value != 'PlaceholderPlugin' %} + + {% endif %} + {% endfor %} +{% endfor %} diff --git a/tests/django_cms/cms/toolbar/items/break.html b/tests/django_cms/cms/toolbar/items/break.html new file mode 100644 index 0000000..b457173 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/break.html @@ -0,0 +1,3 @@ +
  • + ----- +
  • diff --git a/tests/django_cms/cms/toolbar/items/button.html b/tests/django_cms/cms/toolbar/items/button.html new file mode 100644 index 0000000..edf5d49 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/button.html @@ -0,0 +1,4 @@ + +{{ name }} + diff --git a/tests/django_cms/cms/toolbar/items/button_list.html b/tests/django_cms/cms/toolbar/items/button_list.html new file mode 100644 index 0000000..bd11efb --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/button_list.html @@ -0,0 +1,16 @@ +{% load i18n %} +{% if 'cms-toolbar-item-cms-mode-switcher' in extra_classes %} +
    + + + +
    +{% else %} +
    + {% for button in buttons %}{{ button.render }}{% endfor %} +
    +{% endif %} diff --git a/tests/django_cms/cms/toolbar/items/button_modal.html b/tests/django_cms/cms/toolbar/items/button_modal.html new file mode 100644 index 0000000..bf4c3c5 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/button_modal.html @@ -0,0 +1,5 @@ + +{{ name }} + diff --git a/tests/django_cms/cms/toolbar/items/button_sideframe.html b/tests/django_cms/cms/toolbar/items/button_sideframe.html new file mode 100644 index 0000000..f92d38a --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/button_sideframe.html @@ -0,0 +1,5 @@ + +{{ name }} + diff --git a/tests/django_cms/cms/toolbar/items/dropdown.html b/tests/django_cms/cms/toolbar/items/dropdown.html new file mode 100644 index 0000000..2cea9cb --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/dropdown.html @@ -0,0 +1,20 @@ +
    + {% if primary_button.has_no_action %} + {{ primary_button.render }} + {% else %} +
    + {{ primary_button.render }} + + + +
    + {% endif %} +
      + {% for button in buttons %} +
    • + {{ button.render }} +
    • + {% endfor %} +
    +
    diff --git a/tests/django_cms/cms/toolbar/items/dropdown_button.html b/tests/django_cms/cms/toolbar/items/dropdown_button.html new file mode 100644 index 0000000..a593b1e --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/dropdown_button.html @@ -0,0 +1,5 @@ + +{{ name }} + + diff --git a/tests/django_cms/cms/toolbar/items/item_ajax.html b/tests/django_cms/cms/toolbar/items/item_ajax.html new file mode 100644 index 0000000..264d07c --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/item_ajax.html @@ -0,0 +1,13 @@ +
  • + + + {{ name }} + + + +
  • diff --git a/tests/django_cms/cms/toolbar/items/item_link.html b/tests/django_cms/cms/toolbar/items/item_link.html new file mode 100644 index 0000000..31f85ee --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/item_link.html @@ -0,0 +1,10 @@ +
  • + + + {{ name }} + + + +
  • diff --git a/tests/django_cms/cms/toolbar/items/item_modal.html b/tests/django_cms/cms/toolbar/items/item_modal.html new file mode 100644 index 0000000..bb50b80 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/item_modal.html @@ -0,0 +1,12 @@ +
  • + + + {{ name }} + + + +
  • diff --git a/tests/django_cms/cms/toolbar/items/item_sideframe.html b/tests/django_cms/cms/toolbar/items/item_sideframe.html new file mode 100644 index 0000000..918a904 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/item_sideframe.html @@ -0,0 +1,12 @@ +
  • + + + {{ name }} + + + +
  • diff --git a/tests/django_cms/cms/toolbar/items/live_draft.html b/tests/django_cms/cms/toolbar/items/live_draft.html new file mode 100644 index 0000000..81c448b --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/live_draft.html @@ -0,0 +1,16 @@ +{% load i18n %} +{% spaceless %} +
    + {% if cms_toolbar.edit_mode_active %} + + {% trans "View published" %} + + {% else %} + + {% trans "Edit" %} + + {% endif %} +
    +{% endspaceless %} diff --git a/tests/django_cms/cms/toolbar/items/login.html b/tests/django_cms/cms/toolbar/items/login.html new file mode 100644 index 0000000..fb0f3a6 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/login.html @@ -0,0 +1,26 @@ +{% load i18n sekizai_tags cms_tags %} +{% url 'logout' as logout_url %} + diff --git a/tests/django_cms/cms/toolbar/items/logo.html b/tests/django_cms/cms/toolbar/items/logo.html new file mode 100644 index 0000000..0001196 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/logo.html @@ -0,0 +1,6 @@ +{% load i18n %} + diff --git a/tests/django_cms/cms/toolbar/items/menu.html b/tests/django_cms/cms/toolbar/items/menu.html new file mode 100644 index 0000000..c213ca2 --- /dev/null +++ b/tests/django_cms/cms/toolbar/items/menu.html @@ -0,0 +1,15 @@ +
  • + + + {{ title }} + + + +{% if items %} +
      + {% for item in items %}{{ item.render }}{% endfor %} +
    +{% endif %} +
  • diff --git a/tests/django_cms/cms/toolbar/plugin.html b/tests/django_cms/cms/toolbar/plugin.html new file mode 100644 index 0000000..0592900 --- /dev/null +++ b/tests/django_cms/cms/toolbar/plugin.html @@ -0,0 +1,44 @@ +{% spaceless %} + {% load i18n l10n sekizai_tags static cms_tags %} + +{% endspaceless %} +{% if content %} + {{ content }}{% elif render_model_icon %} + + {% elif render_model_add %} + + {% else %} + {{ rendered_content }} + {% endif %} + {% spaceless %} + + {% addtoblock "js" %} + +CMS._plugins.push(['cms-plugin-{% if generic %}{{ generic.app_label }}-{{ generic.model_name }}-{% if attribute_name %}{{ attribute_name|slugify }}-{% endif %}{% endif %}{{ instance.pk|unlocalize }}', { + type: {% if generic %}'generic'{% else %}'plugin'{% endif %}, + placeholder_id: '{{ instance.placeholder_id|unlocalize }}', + plugin_name: '{{ instance.get_plugin_name|default:"" }}', + plugin_type: '{{ instance.plugin_type }}', + plugin_id: '{{ instance.pk|unlocalize }}', + plugin_language: '{{ instance.language|default:"" }}', + {% if instance.node_id %} + plugin_parent: '{{ instance.parent_page.pk|unlocalize }}', + {% else %} + plugin_parent: '{{ instance.parent_id|unlocalize }}', + {% endif %} + plugin_order: '{{ instance.plugin_order }}',{% language request.toolbar.toolbar_language %} + plugin_restriction: [{% for cls in allowed_child_classes %}"{{ cls }}"{% if not forloop.last %},{% endif %}{% endfor %}], + plugin_parent_restriction: [{% for cls in allowed_parent_classes %}"{{ cls }}"{% if not forloop.last %},{% endif %}{% endfor %}], + onClose: {% if refresh_page %}'REFRESH_PAGE'{% else %}{% if redirect_on_close %}'{{ redirect_on_close }}'{% else %}false{% endif %}{% endif %}, + addPluginHelpTitle: '{% trans "Add plugin to" %} {{ instance.get_plugin_name|escapejs }}', + urls: { + add_plugin: '{% if add_url %}{{ add_url }}{% else %}{% cms_admin_url "cms_page_add_plugin" %}{% endif %}', + edit_plugin: '{% if edit_url %}{{ edit_url }}{% elif instance %}{% cms_admin_url "cms_page_edit_plugin" instance.pk %}{% endif %}', + move_plugin: '{% if move_url %}{{ move_url }}{% else %}{% cms_admin_url "cms_page_move_plugin" %}{% endif %}', + delete_plugin: '{% if delete_url %}{{ delete_url }}{% elif instance %}{% cms_admin_url "cms_page_delete_plugin" instance.pk %}{% endif %}', + copy_plugin: '{% if copy_url %}{{ copy_url }}{% else %}{% cms_admin_url "cms_page_copy_plugins" %}{% endif %}' + } {% endlanguage %} +}]); + + {% endaddtoblock %} + {% endspaceless %} diff --git a/tests/django_cms/cms/toolbar/structure.html b/tests/django_cms/cms/toolbar/structure.html new file mode 100644 index 0000000..031284d --- /dev/null +++ b/tests/django_cms/cms/toolbar/structure.html @@ -0,0 +1,16 @@ +{% load cms_tags cms_js_tags i18n sekizai_tags %} + + + + + {{ object.get_page_title }} + {% render_block "css" %} + + + {% cms_toolbar %} + {% render_block "js" %} + {% language cms_toolbar.toolbar_language %} + {% render_cms_structure_js cms_toolbar.structure_renderer object %} + {% endlanguage %} + + diff --git a/tests/django_cms/cms/toolbar/toolbar.html b/tests/django_cms/cms/toolbar/toolbar.html new file mode 100644 index 0000000..c14909c --- /dev/null +++ b/tests/django_cms/cms/toolbar/toolbar.html @@ -0,0 +1,39 @@ +{% load i18n l10n cms_tags cms_js_tags %} +
    +{% block toolbar_top %}{% endblock toolbar_top %} + {# start: toolbar #} +
    +
    +
    + {% include "cms/toolbar/items/logo.html" %} + {% if not user.is_authenticated %} + {% include "cms/toolbar/items/login.html" %} + {% else %} + + {% endif %} +
    +
    + {% for item in cms_toolbar.get_right_items %} + {{ item.render }} + {% endfor %} +
    +
    + {# end: toolbar #} + {% block toolbar_bottom %}{% endblock toolbar_bottom %} +
    diff --git a/tests/django_cms/cms/toolbar/toolbar_javascript.html b/tests/django_cms/cms/toolbar/toolbar_javascript.html new file mode 100644 index 0000000..aebe60f --- /dev/null +++ b/tests/django_cms/cms/toolbar/toolbar_javascript.html @@ -0,0 +1,150 @@ +{% load i18n l10n sekizai_tags static cms_tags cms_js_tags cms_static %} +{% addtoblock "css" %} + +{% endaddtoblock %} +{% for css in cms_toolbar.media.render_css %} + {% addtoblock "css" %} + {{ css }} + {% endaddtoblock %} +{% endfor %} +{% addtoblock "js" %} + + +{% endaddtoblock %} +{% if cms_toolbar.clipboard_plugin %}{% render_plugin_init_js cms_toolbar.clipboard_plugin %}{% endif %} +{% for js in cms_toolbar.media.render_js %} + {% addtoblock "js" %}{{ js }}{% endaddtoblock %} + {% endfor %} diff --git a/tests/django_cms/cms/toolbar/toolbar_with_structure.html b/tests/django_cms/cms/toolbar/toolbar_with_structure.html new file mode 100644 index 0000000..a6e9f35 --- /dev/null +++ b/tests/django_cms/cms/toolbar/toolbar_with_structure.html @@ -0,0 +1,106 @@ +{% extends "cms/toolbar/toolbar.html" %} +{% load i18n l10n %} +{% block toolbar_top %} +
    + {% trans "Double-click to edit" %} + +
    +
    + {% trans "Tap to edit" %} + +
    +{% endblock %} +{% block toolbar_bottom %} + {# start: messages #} +
    +
    + +
    +
    +
    + {# end: messages #} +
    +
    +
    +
    +
    + {% spaceless %} +
    +
    + + +
    +
    + +
    +
    + {% endspaceless %} +
    + {% if cms_toolbar.edit_mode_active %} + {% include 'cms/toolbar/clipboard.html' with clipboard_plugin=cms_toolbar.clipboard_plugin %}{% endif %} +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + {# start: structure #} +
    +
    + {% if cms_renderer.load_structure %} + {% for placeholder in cms_renderer.get_rendered_editable_placeholders %} +
    + {% include cms_toolbar.templates.dragbar_template with placeholder=placeholder %} +
    +
    + {% trans "Drop a plugin here" %} +
    + {% for plugin in placeholder.get_cached_plugins %} + {% include cms_toolbar.templates.drag_item_template with plugin=plugin %}{% endfor %} +
    +
    + {% endfor %} + {% endif %} +
    +
    + {# end: structure #} + {% if cms_toolbar.redirect_url %} +
    +
    +

    {% trans "This page has no preview!" %}

    +

    + {% trans "It is being redirected to:" %} + + {{ cms_toolbar.redirect_url }} + +

    +
    +
    + {% endif %} + + {% endblock toolbar_bottom %} diff --git a/tests/django_cms/cms/welcome.html b/tests/django_cms/cms/welcome.html new file mode 100644 index 0000000..f7ca4b9 --- /dev/null +++ b/tests/django_cms/cms/welcome.html @@ -0,0 +1,127 @@ + +{% load i18n static cms_tags cms_static sekizai_tags %} + + + + + {% trans "django CMS" %} + + + {% render_block "css" %} + + + + + {% cms_toolbar %} + {% language request.toolbar.toolbar_language %} +
    +
    +

    + + {% trans "Installation successful!" %} +

    + +
    + {{ request.version }} +
    +

    + {% if user.is_authenticated %} + {% trans "Add your first page" %} + {% else %} + {% trans "Please log in" %} + {% endif %} +

    +

    + {% blocktrans %} + Welcome to django CMS version + {{ cms_version }} + . + {% endblocktrans %} +

    +

    + {% url "admin:cms_page_add" as admin_add_page %} + {% if user.is_authenticated %} + {% blocktrans %} + + Add the first page + + to the system to continue. + {% endblocktrans %} + {% else %} + {% blocktrans %} + JavaScript seems to be disabled so please + + add a page + + manually. + {% endblocktrans %} + {% endif %} +

    +
    +
    +

    {% trans "Installation Notes" %}

    + + {% blocktrans %} +

    + If you don't see the django CMS logo at the top, make sure + you linked the + + static/cms + + folder to your + static files. +

    + {% endblocktrans %} + {% if django_debug %} + {% blocktrans %} +

    + You're seeing this message because you have + + DEBUG = True + + in your django settings file and + haven't added any pages yet. +

    + {% endblocktrans %} + {% endif %} +
    +
    + {% endlanguage %} + {% render_block "js" %} + {% language request.toolbar.toolbar_language %} + + {% endlanguage %} + + diff --git a/tests/django_cms/cms/widgets/applicationconfigselect.html b/tests/django_cms/cms/widgets/applicationconfigselect.html new file mode 100644 index 0000000..f46061e --- /dev/null +++ b/tests/django_cms/cms/widgets/applicationconfigselect.html @@ -0,0 +1,8 @@ +{% load i18n static %} +{% include 'django/forms/widgets/select.html' %} +{{ widget.script_init|safe }} + diff --git a/tests/django_cms/cms/widgets/pageselectwidget.html b/tests/django_cms/cms/widgets/pageselectwidget.html new file mode 100644 index 0000000..db16509 --- /dev/null +++ b/tests/django_cms/cms/widgets/pageselectwidget.html @@ -0,0 +1,2 @@ +{% include 'django/forms/widgets/multiwidget.html' %} +{{ widget.script_init|safe }} diff --git a/tests/django_cms/cms/widgets/pagesmartlinkwidget.html b/tests/django_cms/cms/widgets/pagesmartlinkwidget.html new file mode 100644 index 0000000..81514a1 --- /dev/null +++ b/tests/django_cms/cms/widgets/pagesmartlinkwidget.html @@ -0,0 +1,2 @@ +{% include 'django/forms/widgets/text.html' %} +{{ widget.script_init|safe }} diff --git a/tests/django_cms/cms/wizards/base.html b/tests/django_cms/cms/wizards/base.html new file mode 100755 index 0000000..26d901c --- /dev/null +++ b/tests/django_cms/cms/wizards/base.html @@ -0,0 +1,18 @@ +{% extends "admin/base_site.html" %} +{% load static cms_static %} +{% block extrastyle %}{{ block.super }}{% endblock %} +{% block bodyclass %}cms-admin cms-admin-modal{% endblock %} +{% block content %} +
    + {% block wizard %}{% endblock %}
    {% endblock %} + {% block extrahead %} + {{ block.super }} + + + {{ form.media }} + {% endblock %} diff --git a/tests/django_cms/cms/wizards/create.html b/tests/django_cms/cms/wizards/create.html new file mode 100755 index 0000000..8b5f654 --- /dev/null +++ b/tests/django_cms/cms/wizards/create.html @@ -0,0 +1,28 @@ +{% extends "cms/wizards/base.html" %} +{% load i18n admin_urls %} +{% block wizard %} +

    {% trans "Create" %} {{ wizard_entry.title }}

    +
    + {% csrf_token %} + {{ wizard.management_form }} + {% if form.errors %} +

    + {% blocktrans count form.errors|length as counter %} + Please correct the error below.{% plural %}Please correct the errors below. + {% endblocktrans %} +

    + {% endif %} +
    + {% include "cms/wizards/includes/form_fields.html" %} +
    +
    + + +
    +
    +{% endblock %} diff --git a/tests/django_cms/cms/wizards/done.html b/tests/django_cms/cms/wizards/done.html new file mode 100644 index 0000000..56215f7 --- /dev/null +++ b/tests/django_cms/cms/wizards/done.html @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/tests/django_cms/cms/wizards/includes/form_fields.html b/tests/django_cms/cms/wizards/includes/form_fields.html new file mode 100755 index 0000000..f2c075d --- /dev/null +++ b/tests/django_cms/cms/wizards/includes/form_fields.html @@ -0,0 +1,32 @@ +{% load i18n %} +{% csrf_token %} +{{ inlineformset.management_form }} +{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %} +
    + {% for field in form.visible_fields %} +
    + {% if field.errors %} +
      + {% for error in field.errors %} +
    • + {{ error }} +
    • + {% endfor %} +
    + {% endif %} +
    + + {{ field }} + {% if field.help_text %} +

    + {{ field.help_text }} +

    + {% endif %} +
    +
    +{% endfor %} +
    diff --git a/tests/django_cms/cms/wizards/start.html b/tests/django_cms/cms/wizards/start.html new file mode 100755 index 0000000..eb8bd61 --- /dev/null +++ b/tests/django_cms/cms/wizards/start.html @@ -0,0 +1,22 @@ +{% extends "cms/wizards/base.html" %} +{% load i18n %} +{% block wizard %} +

    {% trans "Create" %}

    + +{% endblock %} diff --git a/tests/django_cms/cms/wizards/wizardoptionwidget.html b/tests/django_cms/cms/wizards/wizardoptionwidget.html new file mode 100644 index 0000000..a9164da --- /dev/null +++ b/tests/django_cms/cms/wizards/wizardoptionwidget.html @@ -0,0 +1,11 @@ +{% for group, entries, index in widget.optgroups %} + {% for entry in entries %} + +{% endfor %} +{% endfor %} diff --git a/tests/django_ledger/account_create.html b/tests/django_ledger/account_create.html new file mode 100644 index 0000000..82ebda5 --- /dev/null +++ b/tests/django_ledger/account_create.html @@ -0,0 +1,24 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/account_create_child.html b/tests/django_ledger/account_create_child.html new file mode 100644 index 0000000..d29a58f --- /dev/null +++ b/tests/django_ledger/account_create_child.html @@ -0,0 +1,30 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +

    + {{ page_title }} +

    +

    + {{ account }} +

    +
    + {% csrf_token %} + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/account_detail.html b/tests/django_ledger/account_detail.html new file mode 100644 index 0000000..f4d0472 --- /dev/null +++ b/tests/django_ledger/account_detail.html @@ -0,0 +1,29 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block aux_menu %} + {% period_navigation 'account-detail' %} +{% endblock %} +{% block view_content %} +
    +
    +

    + {{ account.code }}: {{ account.name }} +

    +

    + {% trans 'Account Transaction List Report' %} +

    +

    + {% if view_date %} + {{ from_date | date:'m/d/Y' }} + {% else %} + {{ from_date | date:'m/d/Y' }} - {{ to_date | date:'m/d/Y' }} + {% endif %} +

    +
    +
    + {% account_txs_table transactions %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/account_list.html b/tests/django_ledger/account_list.html new file mode 100644 index 0000000..aa126eb --- /dev/null +++ b/tests/django_ledger/account_list.html @@ -0,0 +1,19 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    + + {% trans 'Create Account' %} + + + {% trans 'Back' %} + + {% accounts_table asset_accounts 'Asset Accounts' %} + {% accounts_table liability_accounts 'Liability Accounts' %} + {% accounts_table equity_accounts 'Equity Accounts' %} +
    +{% endblock %} diff --git a/tests/django_ledger/account_update.html b/tests/django_ledger/account_update.html new file mode 100644 index 0000000..64508ba --- /dev/null +++ b/tests/django_ledger/account_update.html @@ -0,0 +1,23 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/auth/login.html b/tests/django_ledger/auth/login.html new file mode 100644 index 0000000..e10579f --- /dev/null +++ b/tests/django_ledger/auth/login.html @@ -0,0 +1,52 @@ +{% extends 'django_ledger/base.html' %} +{% load static %} +{% block nav %}{% endblock %} +{% block header %}{% endblock %} +{% block content %} +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +{# +

    + #} + {# Hero title#} +{# +

    + #} +{# +

    + #} + {# Hero subtitle#} +{# +

    + #} +
    + {% csrf_token %} +
    +
    + {{ form }} +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +{% endblock %} +{% block footer %}{% endblock %} diff --git a/tests/django_ledger/balance_sheet.html b/tests/django_ledger/balance_sheet.html new file mode 100644 index 0000000..8514cb6 --- /dev/null +++ b/tests/django_ledger/balance_sheet.html @@ -0,0 +1,78 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block aux_menu %} + {% if entity %} +
    + {% period_navigation 'entity-bs' %} +
    + {% elif ledger %} +
    + {% period_navigation 'ledger-bs' %} +
    + {% elif unit_model %} +
    + {% period_navigation 'unit-bs' %} +
    + {% endif %} +{% endblock %} +{% block view_content %} +
    +
    +
    +
    +
    + {% if entity %} +

    + {% session_entity_name %} +

    + {% elif ledger %} +

    + {{ ledger.name }} +

    + {% elif unit_model %} +

    + {{ ledger.name }} +

    + {% endif %} +

    + {% trans 'Balance Sheet' %} +

    + {% if unit_model %} +

    + {{ unit_model.name }} {% trans 'Unit' %} +

    + {% endif %} +

    + {% if quarter %} + {{ year }} | Q{{ quarter }} + {% elif month %}{{ from_date | date:'F, Y' }} + {% else %} + {% trans 'Fiscal Year' %} {{ year }} + {% endif %} +

    +

    + As Of {{ to_date | date:'m/d/Y' }} +

    +
    +
    +
    + {% balance_sheet_table io_model=object to_date=to_date %} + {% if entity %} + + {% trans 'Go Back' %} + + {% elif ledger %} + + {% trans 'Go Back' %} + + {% endif %} + + {% trans 'By Unit' %} + +
    +
    +{% endblock %} diff --git a/tests/django_ledger/bank_account_create.html b/tests/django_ledger/bank_account_create.html new file mode 100644 index 0000000..e720948 --- /dev/null +++ b/tests/django_ledger/bank_account_create.html @@ -0,0 +1,24 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/bank_account_list.html b/tests/django_ledger/bank_account_list.html new file mode 100644 index 0000000..128fc39 --- /dev/null +++ b/tests/django_ledger/bank_account_list.html @@ -0,0 +1,20 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    + + {% bank_account_table bank_accounts %} +
    +{% endblock %} diff --git a/tests/django_ledger/bank_account_update.html b/tests/django_ledger/bank_account_update.html new file mode 100644 index 0000000..709d44f --- /dev/null +++ b/tests/django_ledger/bank_account_update.html @@ -0,0 +1,36 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    {{ bank_account.name }}

    +

    + {% trans 'Account' %}: {{ bank_account.account_number }} +

    +

    + {% trans 'Routing' %}: {{ bank_account.routing_number }} +

    +

    {% trans 'ABA' %}: {{ bank_account.aba_number }}

    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/base.html b/tests/django_ledger/base.html new file mode 100644 index 0000000..11822ea --- /dev/null +++ b/tests/django_ledger/base.html @@ -0,0 +1,40 @@ +{% load static %} +{% load django_ledger %} +{% load cache %} + + + + + + {% session_entity_name %} | {{ page_title }} + + + + + {% block nav %} + {% include 'django_ledger/includes/nav.html' %}{% endblock %} + {% block header %} + {% include 'django_ledger/includes/page_header.html' with header_title=header_title %}{% endblock %} + {% block breadcrumbs %}{% endblock %} + {% block messages %} + {% include 'django_ledger/includes/messages.html' with messages=messages %}{% endblock %} + {% block content %}{% endblock %} + {% block footer %} + {% include 'django_ledger/includes/footer.html' %}{% endblock %} + {% block script_bottom %} + + + {% endblock %} + + diff --git a/tests/django_ledger/bill_create.html b/tests/django_ledger/bill_create.html new file mode 100644 index 0000000..6c1b696 --- /dev/null +++ b/tests/django_ledger/bill_create.html @@ -0,0 +1,117 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    + {% csrf_token %} + {% if po_model %} +
    +

    {% trans 'Bill for' %} {{ po_model.po_number }}

    +

    + {% trans 'Bill for' %} {{ po_model.po_title }} +

    + {% for po_item in po_items %} +

    + {{ po_item }} +

    + {% endfor %} +
    + {% endif %} +
    +
    +
    +
    +
    +

    + {% trans 'Vendor Information' %} +

    +
    +
    +
    +
    + {{ form.vendor }} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    + {% trans 'Bill Amount & Terms' %} +

    +
    +
    +
    +
    + {{ form.xref }} +
    +
    +
    +
    + {{ form.date }} +
    +
    +
    + +
    + {{ form.terms }} +
    +
    +
    +
    +
    +
    +
    +
    +

    + {% trans 'Connected Accounts' %} +

    +
    +
    +
    + +
    + {{ form.cash_account }} +
    +
    +
    + +
    + {{ form.prepaid_account }} +
    +
    +
    + +
    + {{ form.unearned_account }} +
    +
    +
    +
    +
    +
    + + + Back + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/bill_delete.html b/tests/django_ledger/bill_delete.html new file mode 100644 index 0000000..08b0aef --- /dev/null +++ b/tests/django_ledger/bill_delete.html @@ -0,0 +1,39 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {% csrf_token %} +
    +
    +

    + Are you sure you want to delete + Bill {{ bill.bill_number }} +

    +
    +
    +

    + All transactions associated with this Bill will be deleted. + If you want to void the bill instead, click + + here + +

    +
    +
    + + {% trans 'Go Back' %} + + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/bill_detail.html b/tests/django_ledger/bill_detail.html new file mode 100644 index 0000000..e715783 --- /dev/null +++ b/tests/django_ledger/bill_detail.html @@ -0,0 +1,172 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% include 'django_ledger/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %} +
    +
    + {% include 'django_ledger/includes/card_vendor.html' with vendor=bill.vendor %} +
    + +
    +
    +
    +
    + {% if bill.is_configured %} +
    + +
    + {% endif %} +
    +
    +
    +

    + {% icon 'grommet-icons:transaction' 36 %} + {% trans 'Bill Items' %} +

    +
    +
    +
    + + + + + + + + + + + + + {% for bill_item in bill_items %} + + + + + + + + + {% endfor %} + + + + + + + + + + + +
    {% trans 'Item' %}{% trans 'Entity Unit' %}{% trans 'Unit Cost' %}{% trans 'Quantity' %}{% trans 'Total' %}{% trans 'PO' %}
    {{ bill_item.item_model }} + {% if bill_item.entity_unit %}{{ bill_item.entity_unit }}{% endif %} + {% currency_symbol %}{{ bill_item.unit_cost | currency_format }}{{ bill_item.quantity }}{% currency_symbol %}{{ bill_item.total_amount | currency_format }} + {% if bill_item.po_model_id %} + + {% trans 'View PO' %} + + {% endif %} +
    + {% trans 'Total' %} + + {% currency_symbol %}{{ total_amount_due | currency_format }} +
    +
    +
    +
    +
    +
    +
    +
    +

    + {% icon 'grommet-icons:transaction' 36 %} + {% trans 'Bill Transactions' %} +

    +
    +
    + {% bill_txs_table bill %} +
    +
    +
    +
    +
    +
    + {% endblock %} diff --git a/tests/django_ledger/bill_list.html b/tests/django_ledger/bill_list.html new file mode 100644 index 0000000..0ecf282 --- /dev/null +++ b/tests/django_ledger/bill_list.html @@ -0,0 +1,127 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    + {% if month %} +

    + {{ month | date:'F Y' }} +

    + {% elif year %} +

    + Year {{ year | date:'Y' }} + Bills +

    + {% else %} +

    + {% trans 'Latest Bills' %} +

    + {% endif %} +
    + +
    +
    + {% if previous_month %} + + {% endif %} + {% if next_month %} + + {% endif %} + {% if previous_year %} + + {% endif %} + {% if next_year %} + + {% endif %} + {% if page_obj %} + {% if page_obj.has_previous %} + + {% endif %} +
    +

    + page {{ page_obj.number }} + of {{ page_obj.paginator.num_pages }} +

    +
    + {% if page_obj.has_next %} + + {% endif %} + {% endif %} +
    +
    + {% bill_table bills %} + {% if year %} +
    {% trans 'Go to month:' %}
    +

    + + {% trans 'All' %} | + + {% for date in date_list %} + + {{ date | date:'F' }} + {% if not forloop.last %}>{% endif %} + + {% endfor %} +

    + {% else %} +
    {% trans 'Go to year:' %}
    +

    + + {% trans 'All' %} | + + {% for date in date_list %} + + {{ date.year }} + {% if not forloop.last %}>{% endif %} + + {% endfor %} +

    + {% endif %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/bill_update.html b/tests/django_ledger/bill_update.html new file mode 100644 index 0000000..c98bcb2 --- /dev/null +++ b/tests/django_ledger/bill_update.html @@ -0,0 +1,234 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    + {% if form.errors %}{{ form.errors }}{% endif %} + {% csrf_token %} +
    +
    + {% include 'django_ledger/includes/card_vendor.html' with vendor=bill.vendor %} +
    +
    +
    +
    +

    + {% trans 'Bill Amount & Terms' %} +

    +
    +
    +
    +

    + Bill Amount: + ${{ bill.amount_due | currency_format }} + +

    + +

    Bill Date: {{ bill.date }}

    +

    Terms: {{ bill.get_terms_display }}

    +

    + External Reference: {{ bill.xref }} + +

    +

    Accrue Bill: {{ form.accrue }}

    + +
    +
    +
    +
    +
    +
    +
    +

    + {% trans 'Bill State' %} +

    +
    +
    +
    + + {% csrf_token %} +
    + +
    + {{ form.amount_paid }} +
    +
    +
    + +
    +
    + +
    + {{ form.paid_date }} +
    +
    +
    + +
    + {{ form.progress }} +
    +
    + + + {% trans 'Bill List' %} + + + {% trans 'Dashboard' %} + + +
    +
    +
    +
    + {% if bill.is_configured %} +
    +
    +
    +

    + {% trans 'Bill State' %} +

    +
    +
    +
    +
    +
    +

    {% trans 'Bill State' %}

    +

    + {{ bill.cash_account }}: + ${{ bill.get_amount_cash | currency_format }} +

    +

    + {{ bill.prepaid_account }}: + ${{ bill.get_amount_receivable | currency_format }} +

    +

    + {{ bill.unearned_account }}: + ${{ bill.get_amount_payable | currency_format }} +

    +

    + {{ bill.earnings_account }}: + ${{ bill.get_amount_earned | currency_format }} +

    +
    +
    +

    {% trans 'Ledger State' %}

    +

    + {{ bill.cash_account }}: ${{ bill.amount_paid | currency_format }} +

    +

    + {{ bill.prepaid_account }}: + ${{ bill.amount_receivable | currency_format }} +

    +

    + {{ bill.unearned_account }}: + ${{ bill.amount_unearned | currency_format }} +

    +

    + {{ bill.earnings_account }}: + ${{ bill.amount_earned | currency_format }} +

    +
    + {% now "Y" as current_year %} + {% now "m" as current_month %} + + + +
    +
    +
    +
    +
    + {% else %} +
    +
    +
    +

    + {% trans 'Bill Configuration' %} +

    +
    +
    +
    +
    +
    + + {{ form.cash_account }} +
    +
    +
    +
    + + {{ form.prepaid_account }} +
    +
    +
    +
    + + {{ form.unearned_account }} +
    +
    +
    +
    +
    +
    + {% endif %} +
    + + {% bill_item_formset_table item_formset %} +{% endblock %} diff --git a/tests/django_ledger/bill_void.html b/tests/django_ledger/bill_void.html new file mode 100644 index 0000000..2c9b678 --- /dev/null +++ b/tests/django_ledger/bill_void.html @@ -0,0 +1,36 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {% csrf_token %} +
    +
    +

    + Are you sure you want to void + Bill {{ bill.bill_number }}? +

    +
    +
    +

    + All transactions associated with this Bill will be reversed as of today + {% now "jS F Y" %}. +

    +
    +
    + + {% trans 'Go Back' %} + + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/coa_update.html b/tests/django_ledger/coa_update.html new file mode 100644 index 0000000..e77e146 --- /dev/null +++ b/tests/django_ledger/coa_update.html @@ -0,0 +1,23 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/customer_create.html b/tests/django_ledger/customer_create.html new file mode 100644 index 0000000..1d5e617 --- /dev/null +++ b/tests/django_ledger/customer_create.html @@ -0,0 +1,22 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {{ form.as_p }} + {% csrf_token %} +
    +
    + + + {% trans 'Go Back' %} + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/customer_list.html b/tests/django_ledger/customer_list.html new file mode 100644 index 0000000..8b45b3c --- /dev/null +++ b/tests/django_ledger/customer_list.html @@ -0,0 +1,21 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} + + +{% endblock %} diff --git a/tests/django_ledger/customer_update.html b/tests/django_ledger/customer_update.html new file mode 100644 index 0000000..d7eb630 --- /dev/null +++ b/tests/django_ledger/customer_update.html @@ -0,0 +1,23 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {{ form.as_p }} + {% csrf_token %} +
    +
    + + + {% trans 'Go Back' %} + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/data_import_job_list.html b/tests/django_ledger/data_import_job_list.html new file mode 100644 index 0000000..7ed07cf --- /dev/null +++ b/tests/django_ledger/data_import_job_list.html @@ -0,0 +1,17 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    + + {% trans 'Import OFX File' %} + + + {% trans 'Back' %} + + {% data_import_job_list_table %} +
    +{% endblock %} diff --git a/tests/django_ledger/data_import_job_txs.html b/tests/django_ledger/data_import_job_txs.html new file mode 100644 index 0000000..366bfa3 --- /dev/null +++ b/tests/django_ledger/data_import_job_txs.html @@ -0,0 +1,23 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +

    Pending Transactions

    + {% data_import_job_txs_pending %} +
    +
    +

    Imported Transactions

    + {% data_import_job_txs_imported %} +
    + +
    +
    +{% endblock %} diff --git a/tests/django_ledger/data_import_ofx.html b/tests/django_ledger/data_import_ofx.html new file mode 100644 index 0000000..3bae24a --- /dev/null +++ b/tests/django_ledger/data_import_ofx.html @@ -0,0 +1,54 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +
    + {% csrf_token %} +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +{% endblock %} +{% block script_bottom %} + {{ block.super }} + +{% endblock %} diff --git a/tests/django_ledger/entitiy_list.html b/tests/django_ledger/entitiy_list.html new file mode 100644 index 0000000..85c08f9 --- /dev/null +++ b/tests/django_ledger/entitiy_list.html @@ -0,0 +1,40 @@ +{% extends 'django_ledger/base.html' %} +{% load i18n %} +{% load static %} +{% block content %} +
    +
    +
    +
    +
    +
    +
    + {% trans 'My Entities' %} +
    +
    +
    + + + {% trans 'New Entity' %} + +
    +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/entity_create.html b/tests/django_ledger/entity_create.html new file mode 100644 index 0000000..f71c84c --- /dev/null +++ b/tests/django_ledger/entity_create.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_2.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    + {% csrf_token %} +
    +
    +
    +

    + + + + {% trans 'New Entity Information' %} +

    +
    +
    + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/entity_dashboard.html b/tests/django_ledger/entity_dashboard.html new file mode 100644 index 0000000..62b89a5 --- /dev/null +++ b/tests/django_ledger/entity_dashboard.html @@ -0,0 +1,120 @@ +{% extends 'django_ledger/base.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block content %} +
    +
    +
    +
    +
    +
    + {% if view.kwargs.unit_slug or request.GET.unit %} + {% period_navigation 'unit-dashboard' %} + {% else %} + {% period_navigation 'entity-dashboard' %} + {% endif %} +
    +
    + {% navigation_menu 'desktop' %} +
    +
    +
    +
    +
    +
    + {% include 'django_ledger/includes/widget_bs.html' with tx_digest=tx_digest %} +
    +
    + {% include 'django_ledger/includes/widget_ic.html' with tx_digest=equity_digest %} +
    +
    +
    + {% chart_container pnl_chart_id pnl_chart_endpoint %} +
    +
    +
    + {% include 'django_ledger/includes/widget_ratios.html' with tx_digest=tx_digest %} +
    +
    +
    +
    +
    +
    + {# RECEIVABLES SECTION START #} +
    +
    +
    +

    {% trans 'Receivables' %}

    +

    + {% icon "ic:baseline-business" 16 %} + {{ entity.name }} +

    +
    +
    +
    +
    +
    +
    + {% if invoices %} +
    +
    + {% chart_container receivables_chart_id receivables_chart_endpoint %} +
    +
    + {% endif %} + {% for invoice in invoices %} +
    + {% include 'django_ledger/includes/card_invoice.html' with invoice=invoice entity_slug=entity.slug style='dashboard' %} +
    + {% endfor %} +
    + {% include 'django_ledger/includes/card_invoice.html' with create_invoice=True entity_slug=entity.slug %} +
    +
    +
    +
    + {# RECEIVABLES SECTION END #} + {# PAYABLES SECTION START #} +
    +
    +
    +

    {% trans 'Payables' %}

    +

    + {% icon "ic:baseline-business" 16 %} + {{ entity.name }} +

    +
    +
    +
    +
    +
    +
    + {% if bills %} +
    +
    + {% chart_container payables_chart_id payables_chart_endpoint %} +
    +
    + {% endif %} + {% for bill in bills %} +
    + {% include 'django_ledger/includes/card_bill.html' with bill=bill entity_slug=entity.slug style='dashboard' %} +
    + {% endfor %} +
    + {% include 'django_ledger/includes/card_bill.html' with create_bill=True entity_slug=entity.slug style='dashboard' %} +
    +
    +
    +
    + {# PAYABLES SECTION END #} +{% endblock %} +{% block script_bottom %} + {{ block.super }} + +{% endblock %} diff --git a/tests/django_ledger/entity_delete.html b/tests/django_ledger/entity_delete.html new file mode 100644 index 0000000..829e054 --- /dev/null +++ b/tests/django_ledger/entity_delete.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_2.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {% csrf_token %} +
    +
    +

    + Are you sure you want to delete + Entity {{ entity.name }}? +

    +
    +
    +

    + All data associated with this entity will be deleted. +

    +
    +
    + + {% trans 'Go Back' %} + + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/entity_update.html b/tests/django_ledger/entity_update.html new file mode 100644 index 0000000..26e5cf5 --- /dev/null +++ b/tests/django_ledger/entity_update.html @@ -0,0 +1,24 @@ +{% extends 'django_ledger/base.html' %} +{% load i18n %} +{% load static %} +{% block content %} +
    +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/expense_create.html b/tests/django_ledger/expense_create.html new file mode 100644 index 0000000..36dd25d --- /dev/null +++ b/tests/django_ledger/expense_create.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/expense_list.html b/tests/django_ledger/expense_list.html new file mode 100644 index 0000000..b465560 --- /dev/null +++ b/tests/django_ledger/expense_list.html @@ -0,0 +1,27 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'The Things I Pay For' %} +

    +
    + +
    +
    + {% expense_item_table expense_list %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/expense_update.html b/tests/django_ledger/expense_update.html new file mode 100644 index 0000000..cfcbd76 --- /dev/null +++ b/tests/django_ledger/expense_update.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/home.html b/tests/django_ledger/home.html new file mode 100644 index 0000000..6ef2d21 --- /dev/null +++ b/tests/django_ledger/home.html @@ -0,0 +1,27 @@ +{% extends 'django_ledger/base.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block content %} +
    +
    +
    + {% for entity in entities %} +
    + {% include 'django_ledger/includes/card_entity.html' with entity=entity %} +
    + {% endfor %} + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/includes/breadcrumbs.html b/tests/django_ledger/includes/breadcrumbs.html new file mode 100644 index 0000000..72ec318 --- /dev/null +++ b/tests/django_ledger/includes/breadcrumbs.html @@ -0,0 +1,8 @@ +{% load django_ledger %} +
    +
    +
    + {% nav_breadcrumbs %} +
    +
    +
    diff --git a/tests/django_ledger/includes/card_bill.html b/tests/django_ledger/includes/card_bill.html new file mode 100644 index 0000000..cd1b24e --- /dev/null +++ b/tests/django_ledger/includes/card_bill.html @@ -0,0 +1,189 @@ +{% load django_ledger %} +{% load i18n %} +{% if not create_bill %} + {% if style == 'dashboard' %} +
    +
    +

    + {% icon "ri:bill-line" 16 %} + {% trans 'Bill' %} +

    +

    + {{ bill.vendor.vendor_name }} +

    +

    + {{ bill.vendor.address_1 }} +

    + {% if not bill.is_past_due %} +

    + Due in: {{ bill.due_date | timeuntil }} +

    + {% else %} +

    + Past Due: {{ bill.due_date | timesince }} ago +

    + {% endif %} + {% if bill.progressible %} +

    + Is Accrued: + {% icon 'ant-design:check-circle-filled' 24 %} + {% else %} +

    + Is Progressible: + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} +

    + You Still Owe: + {% currency_symbol %}{{ bill.get_amount_open | currency_format }} +

    +

    + Amount Paid: {% currency_symbol %}{{ bill.amount_paid | currency_format }} +

    +

    + Progressed: {{ bill.get_progress | percentage }} +

    +
    + + {{ bill.get_progress | percentage }} + + {# MARK AS PAID MODAL #} + {% mark_as_paid bill %} +
    + +
    + {% elif style == 'bill-detail' %} +
    +
    +

    + {% icon 'uil:bill' 36 %} + {% trans 'Bill Info' %} +

    +
    +
    + {% if bill.paid %} +

    + Is Paid + + {% icon 'ant-design:check-circle-filled' 48 %} + +

    +

    + Amount Paid: + + {% currency_symbol %}{{ bill.amount_paid | currency_format }} + +

    + {% else %} + {% if not bill.void %} +

    + Bill Amount: + + {% currency_symbol %}{{ bill.amount_due | currency_format }} + +

    + {% if not bill.is_past_due %} +

    + Due in: {{ bill.due_date | timeuntil }} +

    + {% else %} +

    + Due in: {{ bill.due_date | date }} +

    +

    + Past + Due: {{ bill.due_date | timesince }} ago +

    + {% endif %} +

    + You Still Owe: + {% currency_symbol %}{{ bill.get_amount_open | currency_format }} +

    + {% if bill.accrue %} +

    + Is Accrued: + {% icon 'ant-design:check-circle-filled' 24 %} +

    + {% else %} +

    + Is Accrued: + + {% icon 'maki:roadblock-11' 24 %} + +

    + {% endif %} +

    + Amount Paid: {% currency_symbol %}{{ bill.amount_paid | currency_format }} +

    +

    + Progressed: {{ bill.get_progress | percentage }} +

    +
    + + {{ bill.get_progress | percentage }} + + + {# MARK AS PAID MODAL #} + {% mark_as_paid bill %} + {% else %} +

    + Bill Amount: + + {% currency_symbol %}{{ bill.amount_due | currency_format }} + +

    +

    + VOIDED {{ bill.void_date | date }} +

    + {% endif %} + {% endif %} +
    +
    + {% endif %} + {% else %} + + {% endif %} diff --git a/tests/django_ledger/includes/card_customer.html b/tests/django_ledger/includes/card_customer.html new file mode 100644 index 0000000..7c4cc69 --- /dev/null +++ b/tests/django_ledger/includes/card_customer.html @@ -0,0 +1,47 @@ +{% load i18n %} +{% load django_ledger %} +
    +
    +

    + {% icon 'bi:person-lines-fill' 36 %} + {% trans 'Customer Information' %} +

    +
    +
    +
    +

    {{ customer.customer_name }}

    +

    + {% if customer.address_1 %} + {{ customer.address_1 }} +
    + {% endif %} + {% if customer.address_2 %} + {{ customer.address_2 }} +
    + {% endif %} + {% if customer.get_cszc %} + {{ customer.get_cszc }} +
    + {% endif %} + {% if customer.phone %} + {{ customer.phone }} +
    + {% endif %} + {% if customer.email %} + {{ customer.email }} +
    + {% endif %} + {% if customer.website %} + {{ customer.website }} +
    + {% endif %} +

    +
    +
    + +
    diff --git a/tests/django_ledger/includes/card_entity.html b/tests/django_ledger/includes/card_entity.html new file mode 100644 index 0000000..9be7184 --- /dev/null +++ b/tests/django_ledger/includes/card_entity.html @@ -0,0 +1,27 @@ +{% load django_ledger %} +{% now "Y" as current_year %} +
    +
    +

    + {% icon "ic:baseline-business" 36 %} + {{ entity.name }} +

    +

    + {{ entity.address_1 }} +

    +

    + Created: {{ entity.created | timesince }} ago +

    +
    + +
    diff --git a/tests/django_ledger/includes/card_invoice.html b/tests/django_ledger/includes/card_invoice.html new file mode 100644 index 0000000..71aa559 --- /dev/null +++ b/tests/django_ledger/includes/card_invoice.html @@ -0,0 +1,169 @@ +{% load django_ledger %} +{% load i18n %} +{% if not create_invoice %} + {% if style == 'dashboard' %} +
    +
    +

    + {% icon "bi:cash-stack" 16 %} + {% trans 'Invoice' %} +

    +

    + {{ invoice.customer.customer_name }} +

    +

    + {{ invoice.customer.address_1 }} +

    + {% if not invoice.is_past_due %} +

    + Due in: {{ invoice.due_date | timeuntil }} +

    + {% else %} +

    + Past + Due: {{ invoice.due_date | timesince }} ago +

    + {% endif %} + {% if invoice.progressible %} +

    + Is Progressible: + {% icon 'ant-design:check-circle-filled' 24 %} + {% else %} +

    + Is Progressible: + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} +

    + Owed to You: {% currency_symbol %}{{ invoice.get_amount_open | currency_format }} +

    +

    + Amount Paid: {% currency_symbol %}{{ invoice.amount_paid | currency_format }} +

    +

    + Progressed: {{ invoice.get_progress | percentage }} +

    +
    + + {{ invoice.get_progress | percentage }} + + {# MARK AS PAID MODAL #} + {% mark_as_paid invoice %} +
    + +
    + {% elif style == 'invoice-detail' %} +
    +
    +

    + {% icon 'uil:bill' 36 %} + {% trans 'Invoice Info' %} +

    +
    +
    + {% if invoice.paid %} +

    + Is Paid + + {% icon 'ant-design:check-circle-filled' 48 %} + +

    +

    + Amount Paid: + + {% currency_symbol %}{{ invoice.amount_paid | currency_format }} + +

    + {% else %} +

    + Invoice Amount: + + {% currency_symbol %}{{ invoice.amount_due | currency_format }} + +

    + {% if not invoice.is_past_due %} +

    + Due in: {{ invoice.due_date | timeuntil }} +

    + {% else %} +

    + Past + Due: {{ invoice.due_date | timesince }} ago +

    + {% endif %} +

    + Owed to You: {% currency_symbol %}{{ invoice.get_amount_open | currency_format }} +

    + {% if invoice.progressible %} +

    + Is Progressible: + {% icon 'ant-design:check-circle-filled' 24 %} +

    + {% else %} +

    + Is Progressible: + + {% icon 'maki:roadblock-11' 24 %} + +

    + {% endif %} +

    + Amount Paid: {% currency_symbol %}{{ invoice.amount_paid | currency_format }} +

    +

    + Progressed: {{ invoice.get_progress_percent }}% +

    +
    + + {{ invoice.get_progress | percentage }} + + {% endif %} + {# MARK AS PAID MODAL #} + {% mark_as_paid invoice %} +
    + +
    + {% endif %} + {% else %} + + {% endif %} diff --git a/tests/django_ledger/includes/card_markdown.html b/tests/django_ledger/includes/card_markdown.html new file mode 100644 index 0000000..8095004 --- /dev/null +++ b/tests/django_ledger/includes/card_markdown.html @@ -0,0 +1,30 @@ +{% load trans from i18n %} +{% load django_ledger %} +{% if style == 'card_1' %} +
    +
    +
    +

    + {% if title %} + {{ title }} + {% else %} + {% trans 'Notes' %} + {% endif %} +

    +
    +
    +
    +
    + {% if notes_html %} + {% autoescape off %} + {{ notes_html | safe }} + {% endautoescape %} + {% else %} +

    + {% trans 'No available notes to display...' %} +

    + {% endif %} +
    +
    +
    +{% endif %} diff --git a/tests/django_ledger/includes/card_po.html b/tests/django_ledger/includes/card_po.html new file mode 100644 index 0000000..cb4f0d5 --- /dev/null +++ b/tests/django_ledger/includes/card_po.html @@ -0,0 +1,69 @@ +{% load i18n %} +{% load django_ledger %} +{% if not create_po %} + {% if style == 'po-detail' %} +
    +
    +

    + {% icon 'uil:bill' 36 %} + {% trans 'Purchase Order Info' %} +

    +
    +
    +

    {{ po_model.po_number }}

    +

    + Status: + + {{ po_model.get_po_status_display }} + +

    +

    + Inventory Purchase: + {% if po_model.for_inventory %} + {% icon 'ant-design:check-circle-filled' 24 %} + {% else %} + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} +

    +

    + Fulfilled: + {% if po_model.fulfilled %} + {% icon 'ant-design:check-circle-filled' 24 %} + {{ po_model.fulfillment_date | date }} + {% else %} + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} +

    +
    + +
    +{% endif %} +{% else %} + +{% endif %} diff --git a/tests/django_ledger/includes/card_vendor.html b/tests/django_ledger/includes/card_vendor.html new file mode 100644 index 0000000..db5e206 --- /dev/null +++ b/tests/django_ledger/includes/card_vendor.html @@ -0,0 +1,47 @@ +{% load i18n %} +{% load django_ledger %} +
    +
    +

    + {% icon 'bi:person-lines-fill' 36 %} + {% trans 'Vendor Info' %} +

    +
    +
    +
    +

    {{ vendor.vendor_name }}

    +

    + {% if vendor.address_1 %} + {{ vendor.address_1 }} +
    + {% endif %} + {% if vendor.address_2 %} + {{ vendor.address_2 }} +
    + {% endif %} + {% if vendor.get_cszc %} + {{ vendor.get_cszc }} +
    + {% endif %} + {% if vendor.phone %} + {{ vendor.phone }} +
    + {% endif %} + {% if vendor.email %} + {{ vendor.email }} +
    + {% endif %} + {% if vendor.website %} + {{ vendor.website }} +
    + {% endif %} +

    +
    +
    + +
    diff --git a/tests/django_ledger/includes/footer.html b/tests/django_ledger/includes/footer.html new file mode 100644 index 0000000..a526f4f --- /dev/null +++ b/tests/django_ledger/includes/footer.html @@ -0,0 +1,20 @@ + diff --git a/tests/django_ledger/includes/messages.html b/tests/django_ledger/includes/messages.html new file mode 100644 index 0000000..2c3fa2a --- /dev/null +++ b/tests/django_ledger/includes/messages.html @@ -0,0 +1,11 @@ +{% if messages %} + {# Messages Container #} +
    + {% for msg in messages %} +
    + + {{ msg | safe }} +
    + {% endfor %} +
    +{% endif %} diff --git a/tests/django_ledger/includes/nav.html b/tests/django_ledger/includes/nav.html new file mode 100644 index 0000000..77269b6 --- /dev/null +++ b/tests/django_ledger/includes/nav.html @@ -0,0 +1,39 @@ +{% load static %} +{% load django_ledger %} +{% load cache %} +{% load i18n %} +{% now "Y" as current_year %} + diff --git a/tests/django_ledger/includes/page_header.html b/tests/django_ledger/includes/page_header.html new file mode 100644 index 0000000..abf81a8 --- /dev/null +++ b/tests/django_ledger/includes/page_header.html @@ -0,0 +1,54 @@ +{% load static %} +{% load i18n %} +{% load django_ledger %} +{% if not header_style %} +
    +
    +
    +
    + {% if header_subtitle_icon %} +
    + {% icon header_subtitle_icon 36 %} +
    +
    + {% icon header_subtitle_icon 48 %} +
    +
    + {% icon header_subtitle_icon 60 %} +
    + {% endif %} +
    +

    + {{ header_title }} +

    + {% if header_subtitle %}

    {{ header_subtitle }}

    {% endif %} +
    +
    +
    +
    + {% else %} +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    + {% if header_title %} +
    +
    +

    + {{ header_title }} +

    +
    +
    + {% endif %} +
    +
    +
    + {% endif %} diff --git a/tests/django_ledger/includes/widget_bs.html b/tests/django_ledger/includes/widget_bs.html new file mode 100644 index 0000000..ea64d64 --- /dev/null +++ b/tests/django_ledger/includes/widget_bs.html @@ -0,0 +1,28 @@ +{% load django_ledger %} +{% load i18n %} +
    +

    + {% trans 'Assets' %} +

    +

    + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_ASSETS | currency_format }} +

    +

    + {% trans 'Liabilities' %} +

    +

    + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_LIABILITIES | currency_format }} +

    +

    + {% trans 'Equity' %} +

    +

    + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EQUITY | currency_format }} +

    +

    + {% trans 'Cash' %} +

    +

    + {% currency_symbol %}{{ tx_digest.role_balance.ASSET_CA_CASH | currency_format }} +

    +
    diff --git a/tests/django_ledger/includes/widget_ic.html b/tests/django_ledger/includes/widget_ic.html new file mode 100644 index 0000000..aa03c25 --- /dev/null +++ b/tests/django_ledger/includes/widget_ic.html @@ -0,0 +1,34 @@ +{% load django_ledger %} +{% load i18n %} +
    +

    + {% trans 'Revenue' %} +

    +

    + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_INCOME | currency_format }} +

    +

    + {% trans 'Expenses' %} +

    +

    + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EXPENSES | reverse_sing | currency_format }} +

    +

    + {% trans 'Earnings (Loss)' %} +

    +

    + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EARNINGS | currency_format }} +

    +

    + {% trans 'Accounting Period' %} +

    + {% if not has_date %} +

    + {{ from_date | date }} + {% trans 'thru' %} + {{ to_date | date }} +

    + {% else %} +

    {{ from_date | date }}

    + {% endif %} +
    diff --git a/tests/django_ledger/includes/widget_ratios.html b/tests/django_ledger/includes/widget_ratios.html new file mode 100644 index 0000000..8159e55 --- /dev/null +++ b/tests/django_ledger/includes/widget_ratios.html @@ -0,0 +1,72 @@ +{% load django_ledger %} +
    +

    + Financial Analysis +

    +

    Solvency:

    +
    + Current + Ratio: {{ tx_digest.ratios.current_ratio | currency_format }} +
    + + {{ tx_digest.ratios.current_ratio }} + +
    + Quick + Ratio: {{ tx_digest.ratios.quick_ratio | currency_format }} +
    + + {{ tx_digest.ratios.current_ratio }} + +

    Leverage:

    +
    + Debt to + Equity: {{ tx_digest.ratios.debt_to_equity | currency_format }} +
    + + {{ tx_digest.ratios.debt_to_equity }} + +

    Profitability:

    +
    + Return on + Equity: {{ tx_digest.ratios.return_on_equity | percentage }} +
    + + {{ tx_digest.ratios.return_on_equity }} + +
    + Return on + Assets: {{ tx_digest.ratios.return_on_assets | percentage }} +
    + + {{ tx_digest.ratios.return_on_assets }} + +
    + Net Profit + Margin: {{ tx_digest.ratios.net_profit_margin | percentage }} +
    + + {{ tx_digest.ratios.net_profit_margin }} + +
    + Gross Profit + Margin: {{ tx_digest.ratios.gross_profit_margin | percentage }} +
    + + {{ tx_digest.ratios.gross_profit_margin }} + +
    diff --git a/tests/django_ledger/income_statement.html b/tests/django_ledger/income_statement.html new file mode 100644 index 0000000..93db5f3 --- /dev/null +++ b/tests/django_ledger/income_statement.html @@ -0,0 +1,76 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block aux_menu %} + {% if unit_model %} +
    + {% period_navigation 'unit-ic' %} +
    + {% elif entity %} +
    + {% period_navigation 'entity-ic' %} +
    + {% elif ledger %} +
    + {% period_navigation 'ledger-ic' %} +
    + {% endif %} +{% endblock %} +{% block view_content %} +
    +
    +
    +
    +
    + {% if entity %} +

    + {% session_entity_name %} +

    + {% elif ledger %} +

    + {{ ledger.name }} +

    + {% endif %} + {% if unit_model %} +

    + {{ unit_model.name }} {% trans 'Unit' %} +

    + {% endif %} +

    + {% trans 'Income Statement' %} +

    +

    + {% if quarter %} + {{ year }} | Q{{ quarter }} + {% elif month %}{{ start_date | date:'F, Y' }} + {% else %} + Fiscal Year {{ year }} + {% endif %} +

    +

    + {{ from_date | date:'m/d/Y' }} - {{ to_date | date:'m/d/Y' }} +

    +
    +
    +
    + {% income_statement_table io_model=object from_date=from_date to_date=to_date %} + {% if ledger %} + + Go + Back + + {% elif entity %} + + Go + Back + + {% endif %} + + {% trans 'By Unit' %} + +
    +
    +{% endblock %} diff --git a/tests/django_ledger/inventory_item_create.html b/tests/django_ledger/inventory_item_create.html new file mode 100644 index 0000000..8911619 --- /dev/null +++ b/tests/django_ledger/inventory_item_create.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/inventory_item_list.html b/tests/django_ledger/inventory_item_list.html new file mode 100644 index 0000000..500e2b9 --- /dev/null +++ b/tests/django_ledger/inventory_item_list.html @@ -0,0 +1,27 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'My Inventory Items' %} +

    +
    + +
    +
    + {% inventory_item_table inventory_item_list %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/inventory_item_update.html b/tests/django_ledger/inventory_item_update.html new file mode 100644 index 0000000..add90ae --- /dev/null +++ b/tests/django_ledger/inventory_item_update.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/invoice_create.html b/tests/django_ledger/invoice_create.html new file mode 100644 index 0000000..4341f2c --- /dev/null +++ b/tests/django_ledger/invoice_create.html @@ -0,0 +1,104 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    + {% csrf_token %} +
    +
    +
    +
    +
    +

    + {% trans 'Customer Information' %} +

    +
    +
    +
    +
    + {{ form.customer }} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    + {% trans 'Invoice Amount & Terms' %} +

    +
    +
    +
    +
    + {{ form.date }} +
    +
    +
    +
    + {{ form.amount_due }} +
    +
    +
    + +
    + {{ form.terms }} +
    +
    +
    +
    +
    +
    +
    +
    +

    + {% trans 'Connected Accounts' %} +

    +
    +
    +
    + +
    + {{ form.cash_account }} +
    +
    +
    + +
    + {{ form.prepaid_account }} +
    +
    +
    + +
    + {{ form.unearned_account }} +
    +
    +
    +
    +
    +
    + + + Back + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/invoice_delete.html b/tests/django_ledger/invoice_delete.html new file mode 100644 index 0000000..c2c7dee --- /dev/null +++ b/tests/django_ledger/invoice_delete.html @@ -0,0 +1,37 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {% csrf_token %} +
    +
    +

    + Are you sure you want to delete + Invoice {{ invoice.invoice_number }} +

    +
    +
    +

    + All transactions associated with this invoice will be deleted. + If you want to void the invoice instead, click here +

    +
    +
    + + {% trans 'Go Back' %} + + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/invoice_detail.html b/tests/django_ledger/invoice_detail.html new file mode 100644 index 0000000..2b5d02d --- /dev/null +++ b/tests/django_ledger/invoice_detail.html @@ -0,0 +1,156 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% include 'django_ledger/includes/card_invoice.html' with invoice=invoice entity_slug=view.kwargs.entity_slug style='invoice-detail' %} +
    +
    + {% include 'django_ledger/includes/card_customer.html' with customer=invoice.customer %} +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    + {% icon 'grommet-icons:transaction' 36 %} + {% trans 'Invoice Items' %} +

    +
    + {# todo: make this table a template... #} +
    +
    + + + + + + + + + + + {% for invoice_item in invoice_items %} + + + + + + + {% endfor %} + + + + + + + + + +
    {% trans 'Item' %}{% trans 'Unit Cost' %}{% trans 'Quantity' %}{% trans 'Total' %}
    {{ invoice_item.item_model }}{% currency_symbol %}{{ invoice_item.unit_cost | currency_format }}{{ invoice_item.quantity }}{% currency_symbol %}{{ invoice_item.total_amount | currency_format }}
    + {% trans 'Total' %} + + {% currency_symbol %}{{ total_amount_due | currency_format }} +
    +
    +
    +
    +
    +
    +
    +
    +

    + {% icon 'grommet-icons:transaction' 36 %} + {% trans 'Invoice Transactions' %} +

    +
    +
    + {% invoice_txs_table invoice %} +
    +
    +
    +
    +
    +
    + {% endblock %} diff --git a/tests/django_ledger/invoice_list.html b/tests/django_ledger/invoice_list.html new file mode 100644 index 0000000..8027bd2 --- /dev/null +++ b/tests/django_ledger/invoice_list.html @@ -0,0 +1,127 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    + {% if month %} +

    + {{ month | date:'F Y' }} +

    + {% elif year %} +

    + Year {{ year | date:'Y' }} + {% trans 'Invoices' %} +

    + {% else %} +

    + {% trans 'Latest Invoices' %} +

    + {% endif %} +
    + +
    +
    + {% if previous_month %} + + {% endif %} + {% if next_month %} + + {% endif %} + {% if previous_year %} + + {% endif %} + {% if next_year %} + + {% endif %} + {% if page_obj %} + {% if page_obj.has_previous %} + + {% endif %} +
    +

    + page {{ page_obj.number }} + of {{ page_obj.paginator.num_pages }} +

    +
    + {% if page_obj.has_next %} + + {% endif %} + {% endif %} +
    +
    + {% invoice_table %} + {% if year %} +
    Go to month:
    +

    + + {% trans 'All' %} | + + {% for date in date_list %} + + {{ date | date:'F' }} + {% if not forloop.last %}>{% endif %} + + {% endfor %} +

    + {% else %} +
    Go to year:
    +

    + + {% trans 'All' %} | + + {% for date in date_list %} + + {{ date.year }} + {% if not forloop.last %}>{% endif %} + + {% endfor %} +

    + {% endif %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/invoice_update.html b/tests/django_ledger/invoice_update.html new file mode 100644 index 0000000..311eb87 --- /dev/null +++ b/tests/django_ledger/invoice_update.html @@ -0,0 +1,202 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    + {% if form.errors %}{{ form.errors }}{% endif %} + {% csrf_token %} +
    +
    + {% include 'django_ledger/includes/card_customer.html' with customer=invoice.customer %} +
    +
    +
    +
    +

    + {% trans 'Invoice Amount & Terms' %} +

    +
    +
    +
    +

    + {% trans 'Invoice Amount:' %} + ${{ invoice.amount_due | currency_format }} + +

    + +

    Invoice Date: {{ object.date }}

    +

    Terms: {{ object.get_terms_display }}

    +

    Accrue Invoice: {{ form.accrue }}

    +
    +
    +
    +
    +
    +
    +
    +

    + {% trans 'Invoice State' %} +

    +
    +
    +
    + + {% csrf_token %} +
    + +
    + {{ form.amount_paid }} +
    +
    +
    + +
    +
    + +
    + {{ form.paid_date }} +
    +
    +
    + +
    + {{ form.progress }} +
    +
    + + + {% trans 'Invoice List' %} + + + {% trans 'Dashboard' %} + + +
    +
    +
    +
    +
    + {# todo: change the format of the state... show only account balances, move to detail view? #} +
    +
    +

    + {% trans 'Invoice State' %} +

    +
    +
    +
    +
    +
    +

    {% trans 'Ledger State' %}

    +

    + {{ invoice.cash_account }}: + ${{ invoice.get_amount_cash | currency_format }} +

    +

    + {{ invoice.prepaid_account }}: + ${{ invoice.get_amount_receivable | currency_format }} +

    +

    + {{ invoice.unearned_account }}: + ${{ invoice.get_amount_payable | currency_format }} +

    +

    + {{ invoice.earnings_account }}: + ${{ invoice.get_amount_earned | currency_format }} +

    +
    +
    +

    {% trans 'Invoice State' %}

    +

    + {{ invoice.cash_account }}: ${{ invoice.amount_paid | currency_format }} +

    +

    + {{ invoice.prepaid_account }}: + ${{ invoice.amount_receivable | currency_format }} +

    +

    + {{ invoice.unearned_account }}: + ${{ invoice.amount_unearned | currency_format }} +

    +

    + {{ invoice.earnings_account }}: + ${{ invoice.amount_earned | currency_format }} +

    +
    +
    +

    + Ledger is Posted: + {% if invoice.ledger.posted %} + {% icon 'ant-design:check-circle-filled' 24 %} + {% else %} + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} +

    +

    + Ledger Locked: + {% if invoice.ledger.locked %} + {% icon 'bi:lock-fill' 24 %} + {% else %} + {% icon 'bx:bx-lock-open-alt' 24 %} + {% endif %} +

    +
    + {% now "Y" as current_year %} + {% now "m" as current_month %} + + + +
    +
    +
    +
    +
    +
    + + {% invoice_item_formset_table item_formset %} +{% endblock %} diff --git a/tests/django_ledger/je_create.html b/tests/django_ledger/je_create.html new file mode 100644 index 0000000..03c1496 --- /dev/null +++ b/tests/django_ledger/je_create.html @@ -0,0 +1,23 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/je_detail.html b/tests/django_ledger/je_detail.html new file mode 100644 index 0000000..67f2195 --- /dev/null +++ b/tests/django_ledger/je_detail.html @@ -0,0 +1,22 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {% journal_entry_txs_table journal_entry %} + + Edit + Txs + + + Back + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/je_list.html b/tests/django_ledger/je_list.html new file mode 100644 index 0000000..26792aa --- /dev/null +++ b/tests/django_ledger/je_list.html @@ -0,0 +1,21 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + + Add + + + Back + + {% jes_table %} +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/je_update.html b/tests/django_ledger/je_update.html new file mode 100644 index 0000000..6161f69 --- /dev/null +++ b/tests/django_ledger/je_update.html @@ -0,0 +1,23 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/layouts/content_layout_1.html b/tests/django_ledger/layouts/content_layout_1.html new file mode 100644 index 0000000..d256ce0 --- /dev/null +++ b/tests/django_ledger/layouts/content_layout_1.html @@ -0,0 +1,24 @@ +{% extends 'django_ledger/base.html' %} +{% load navigation_menu from django_ledger %} +{% block content %} +
    +
    +
    + {# SIDE MENU #} + {% if not hide_menu %} +
    +
    + {% block aux_menu %}{% endblock %} +
    + {% navigation_menu 'desktop' %} +
    +
    +
    + {% endif %} +
    + {% block view_content %}{% endblock %} +
    +
    +
    +
    +{% endblock content %} diff --git a/tests/django_ledger/layouts/content_layout_2.html b/tests/django_ledger/layouts/content_layout_2.html new file mode 100644 index 0000000..6f8cb99 --- /dev/null +++ b/tests/django_ledger/layouts/content_layout_2.html @@ -0,0 +1,12 @@ +{% extends 'django_ledger/base.html' %} +{% block content %} +
    +
    +
    +
    + {% block view_content %}{% endblock %} +
    +
    +
    +
    +{% endblock content %} diff --git a/tests/django_ledger/ledger_create.html b/tests/django_ledger/ledger_create.html new file mode 100644 index 0000000..c3a8bc5 --- /dev/null +++ b/tests/django_ledger/ledger_create.html @@ -0,0 +1,24 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/ledger_list.html b/tests/django_ledger/ledger_list.html new file mode 100644 index 0000000..158c482 --- /dev/null +++ b/tests/django_ledger/ledger_list.html @@ -0,0 +1,16 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    + + Add + + + Back + + {% ledgers_table %} +
    +{% endblock %} diff --git a/tests/django_ledger/ledger_update.html b/tests/django_ledger/ledger_update.html new file mode 100644 index 0000000..4f6d842 --- /dev/null +++ b/tests/django_ledger/ledger_update.html @@ -0,0 +1,24 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + Back + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/pns_list.html b/tests/django_ledger/pns_list.html new file mode 100644 index 0000000..6c2e053 --- /dev/null +++ b/tests/django_ledger/pns_list.html @@ -0,0 +1,27 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'Products & Services List' %} +

    +
    + +
    +
    + {% items_table pns_list %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/po_create.html b/tests/django_ledger/po_create.html new file mode 100644 index 0000000..ddff223 --- /dev/null +++ b/tests/django_ledger/po_create.html @@ -0,0 +1,17 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    + {% csrf_token %} +
    + {{ form }} + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/po_delete.html b/tests/django_ledger/po_delete.html new file mode 100644 index 0000000..f64ee0b --- /dev/null +++ b/tests/django_ledger/po_delete.html @@ -0,0 +1,37 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {% csrf_token %} +
    +
    +

    + Are you sure you want to delete + Purchase Order {{ po_model.po_number }} +

    +
    +
    +

    + All transactions associated with this Purchase Order will be deleted. + If you want to void the PO instead, click here +

    +
    +
    + + {% trans 'Go Back' %} + + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/po_detail.html b/tests/django_ledger/po_detail.html new file mode 100644 index 0000000..2e99aaf --- /dev/null +++ b/tests/django_ledger/po_detail.html @@ -0,0 +1,111 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load trans from i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% include 'django_ledger/includes/card_po.html' with po_model=po_model entity_slug=view.kwargs.entity_slug style='po-detail' %} +
    + +
    +
    +
    + +
    +
    +

    + {{ po_model.po_title }} +

    +
    +
    +
    + + + + + + + + + + + + + {% for item in po_items %} + + + + + + + + + {% endfor %} + + + + + + + + + + + +
    {% trans 'Item' %}{% trans 'Quantity' %}{% trans 'Unit Cost' %}{% trans 'Total Cost' %}{% trans 'Status' %}{% trans 'Billed' %}
    {{ item.item_model }}{{ item.quantity }}{{ item.unit_cost }} + {% currency_symbol %}{{ item.total_amount | currency_format }} + + {% if item.po_item_status %}{{ item.get_po_item_status_display }}{% endif %} + + {% if item.bill_model_id %} + + View Bill + + {% endif %} +
    + Total PO Amount + + {% currency_symbol %}{{ total_amount_due | currency_format }} +
    +
    +
    +
    + {% include 'django_ledger/includes/card_markdown.html' with style='card_1' title='PO Notes' notes_html=po_model.notes_html %} +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/po_list.html b/tests/django_ledger/po_list.html new file mode 100644 index 0000000..b536cfd --- /dev/null +++ b/tests/django_ledger/po_list.html @@ -0,0 +1,127 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    + {% if month %} +

    + {{ month | date:'F Y' }} +

    + {% elif year %} +

    + Year {{ year | date:'Y' }} + Bills +

    + {% else %} +

    + {% trans 'Latest Purchase Orders' %} +

    + {% endif %} +
    + +
    +
    + {% if previous_month %} + + {% endif %} + {% if next_month %} + + {% endif %} + {% if previous_year %} + + {% endif %} + {% if next_year %} + + {% endif %} + {% if page_obj %} + {% if page_obj.has_previous %} + + {% endif %} +
    +

    + page {{ page_obj.number }} + of {{ page_obj.paginator.num_pages }} +

    +
    + {% if page_obj.has_next %} + + {% endif %} + {% endif %} +
    +
    + {% po_table po_list %} + {% if year %} +
    {% trans 'Go to month:' %}
    +

    + + {% trans 'All' %} | + + {% for date in date_list %} + + {{ date | date:'F' }} + {% if not forloop.last %}>{% endif %} + + {% endfor %} +

    + {% else %} +
    {% trans 'Go to year:' %}
    +

    + + {% trans 'All' %} | + + {% for date in date_list %} + + {{ date.year }} + {% if not forloop.last %}>{% endif %} + + {% endfor %} +

    + {% endif %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/po_update.html b/tests/django_ledger/po_update.html new file mode 100644 index 0000000..a0fb82f --- /dev/null +++ b/tests/django_ledger/po_update.html @@ -0,0 +1,99 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +

    + {% trans 'Update Purchase Order' %} +

    +

    {{ po_model.po_number }}

    +
    +
    +
    + {% csrf_token %} + {% if form.errors %}{{ form.errors }}{% endif %} +
    +
    +
    + +
    + {{ form.po_title }} +
    +
    +
    + +
    + {{ form.po_date }} +
    +
    +
    + +
    + {{ form.po_status }} +
    +
    +
    + +
    + {{ form.fulfillment_date }} +
    +
    +
    + +
    + {{ form.fulfilled }} +
    +
    +
    +
    +
    + + {{ form.markdown_notes }} +
    +
    + +
    +

    + {% trans 'Purchase Order Amount' %}: + {% currency_symbol %}{{ po_model.po_amount | currency_format }} +

    +

    + {% trans 'Received Amount' %}: + {% currency_symbol %}{{ po_model.po_amount_received | currency_format }} +

    +
    +
    +
    +
    + {% po_item_formset_table item_formset %} +{% endblock %} diff --git a/tests/django_ledger/product_create.html b/tests/django_ledger/product_create.html new file mode 100644 index 0000000..947dcff --- /dev/null +++ b/tests/django_ledger/product_create.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/product_list.html b/tests/django_ledger/product_list.html new file mode 100644 index 0000000..b418a8e --- /dev/null +++ b/tests/django_ledger/product_list.html @@ -0,0 +1,27 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'Products & Services List' %} +

    +
    + +
    +
    + {% pns_table pns_list %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/product_update.html b/tests/django_ledger/product_update.html new file mode 100644 index 0000000..f5677c1 --- /dev/null +++ b/tests/django_ledger/product_update.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/tags/account_txs_table.html b/tests/django_ledger/tags/account_txs_table.html new file mode 100644 index 0000000..c443b66 --- /dev/null +++ b/tests/django_ledger/tags/account_txs_table.html @@ -0,0 +1,63 @@ +{% load django_ledger %} +{% load trans from i18n %} +
    + + + + + + + + + {% for tx in transactions %} + + + + + + + + {% endfor %} + + + + + + + +
    DateCreditDebitDescriptionActions
    {{ tx.journal_entry.date }} + {% if tx.tx_type == 'credit' %}${{ tx.amount | currency_format }}{% endif %} + + {% if tx.tx_type == 'debit' %}${{ tx.amount | currency_format }}{% endif %} + {{ tx.description }} + +
    Total${{ total_credits | currency_format }}${{ total_debits | currency_format }}
    +
    diff --git a/tests/django_ledger/tags/accounts_table.html b/tests/django_ledger/tags/accounts_table.html new file mode 100644 index 0000000..ea528cf --- /dev/null +++ b/tests/django_ledger/tags/accounts_table.html @@ -0,0 +1,120 @@ +{% load i18n %} +{% load django_ledger %} +
    + + + {% if title %} + + + + + + + + + + + {% endif %} + + + + + + + + + + + + + {% for account in accounts %} + + + + + + + + + + + {% endfor %} +
    +

    + {{ title }} +

    +
    {% trans 'Role' %}{% trans 'Parent' %}{% trans 'Code' %} + {% trans 'Account Name' %} + + {% trans 'Balance Type' %} + + {% trans 'Active' %} + + {% trans 'Locked' %} + + {% trans 'Actions' %} +
    + {{ account.get_role_display }} + + {{ account.parent.code }} + + {{ account.code }} + + {{ account.name }} + + {% if account.is_debit %} + + {% icon 'bi:arrow-bar-down' 24 %} + + {% elif account.is_credit %} + + {% icon 'bi:arrow-bar-up' 24 %} + + {% endif %} + + {% if account.active %} + + {% icon 'ant-design:check-circle-filled' 24 %} + + {% endif %} + + {% if account.locked %} + + {% icon 'bi:lock-fill' 24 %} + + {% elif not account.locked %} + + {% icon 'bx:bx-lock-open-alt' 24 %} + + {% endif %} + + +
    +
    diff --git a/tests/django_ledger/tags/activity_form.html b/tests/django_ledger/tags/activity_form.html new file mode 100644 index 0000000..9fa937b --- /dev/null +++ b/tests/django_ledger/tags/activity_form.html @@ -0,0 +1,24 @@ +{% load i18n %} +
    +
    +
    + +
    +
    +
    +
    +
    + {{ activity_form.activity }} +
    +
    +
    + +
    +
    +
    +
    +
    diff --git a/tests/django_ledger/tags/balance_sheet.html b/tests/django_ledger/tags/balance_sheet.html new file mode 100644 index 0000000..36efb8b --- /dev/null +++ b/tests/django_ledger/tags/balance_sheet.html @@ -0,0 +1,192 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + {% if by_unit %} + + {% endif %} + + + + + + + + + {% if by_unit %}{% endif %} + + + + {# ASSETS #} + {% for acc in tx_digest.group_account.GROUP_ASSETS %} + + + + {% if by_unit %} + + {% endif %} + + + + {% endfor %} + + + + {% if by_unit %}{% endif %} + + + + + + + {% if by_unit %}{% endif %} + + + + {# LIABILITIES #} + {% for acc in tx_digest.group_account.GROUP_LIABILITIES %} + + + + {% if by_unit %} + + {% endif %} + + + + {% endfor %} + + + + {% if by_unit %}{% endif %} + + + + + + + {% if by_unit %}{% endif %} + + + + {# CAPITAL #} + {% for acc in tx_digest.group_account.GROUP_CAPITAL %} + + + + {% if by_unit %} + + {% endif %} + + + + {% endfor %} + + + + {% if by_unit %}{% endif %} + + + + + + + {% if by_unit %}{% endif %} + + + + + + + {% if by_unit %} + + {% endif %} + + + + + + + {% if by_unit %} + + {% endif %} + + + + +
    {% trans 'Account Number' %}{% trans 'Account Name' %}{% trans 'Unit' %}{% trans 'Balance Type' %}{% trans 'Balance' %}
    +

    {% trans 'Assets' %}

    +
    {{ acc.code }} + {{ acc.name }} + + {% if acc.unit_name %}{{ acc.unit_name }}{% endif %} + + {% if acc.balance_type == 'debit' %} + {% icon 'bi:arrow-bar-down' 24 %} + {% elif acc.balance_type == 'credit' %} + {% icon 'bi:arrow-bar-up' 24 %} + {% endif %} + + {% currency_symbol %}{{ acc.balance | currency_format }} +
    + {% trans 'Total Assets' %} + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_ASSETS | currency_format }} +
    +

    {% trans 'Liabilities' %}

    +
    + {{ acc.code }} + + {{ acc.name }} + + {% if acc.unit_name %}{{ acc.unit_name }}{% endif %} + + {% if acc.balance_type == 'debit' %} + {% icon 'bi:arrow-bar-down' 24 %} + {% elif acc.balance_type == 'credit' %} + {% icon 'bi:arrow-bar-up' 24 %} + {% endif %} + + {% currency_symbol %}{{ acc.balance | currency_format }} +
    + {% trans 'Total Liabilities' %} + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_LIABILITIES | currency_format }} +
    +

    {% trans 'Equity' %}

    +
    + {{ acc.code }} + + {{ acc.name }} + + {% if acc.unit_name %}{{ acc.unit_name }}{% endif %} + + {% if acc.balance_type == 'debit' %} + {% icon 'bi:arrow-bar-down' 24 %} + {% elif acc.balance_type == 'credit' %} + {% icon 'bi:arrow-bar-up' 24 %} + {% endif %} + + {% currency_symbol %}{{ acc.balance | currency_format }} +
    + {% trans 'Total Capital' %} + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_CAPITAL | currency_format }} +
    + {% trans 'Retained Earnings' %} + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EARNINGS | currency_format }} +
    + {% trans 'Total Equity' %} + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EQUITY | currency_format }} +
    + {% trans 'Total Equity + Liabilities' %} + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_LIABILITIES_EQUITY | currency_format }} +
    +
    diff --git a/tests/django_ledger/tags/bank_accounts_table.html b/tests/django_ledger/tags/bank_accounts_table.html new file mode 100644 index 0000000..37c5050 --- /dev/null +++ b/tests/django_ledger/tags/bank_accounts_table.html @@ -0,0 +1,57 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + + + + {% for bank_acc in bank_account_qs %} + + + + + + + + + + {% endfor %} + +
    NameAccount NumberRouting NumberTypeCash AccountActiveActions
    {{ bank_acc.name }}{{ bank_acc.account_number | last_four }}{{ bank_acc.routing_number | last_four }}{{ bank_acc.get_account_type_display }}{{ bank_acc.cash_account }} + {% if bank_acc.active %} + {% icon 'ant-design:check-circle-filled' 24 %} + {% else %} + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} + + +
    +
    diff --git a/tests/django_ledger/tags/bill_item_formset.html b/tests/django_ledger/tags/bill_item_formset.html new file mode 100644 index 0000000..494884a --- /dev/null +++ b/tests/django_ledger/tags/bill_item_formset.html @@ -0,0 +1,71 @@ +{% load trans from i18n %} +{% load django_ledger %} +
    +
    +
    +

    {% trans 'Bill Items' %}

    +
    +
    +
    + {% csrf_token %} + {{ item_formset.non_form_errors }} + {{ item_formset.management_form }} + + + + + + + + + + + + + {% for f in item_formset %} + + + + + + + + + {% endfor %} + + + + + + + + + + + +
    {% trans 'Item' %}{% trans 'Unit Cost' %}{% trans 'Quantity' %}{% trans 'Unit' %}{% trans 'Total' %}{% trans 'Delete' %}
    + {% for hidden_field in f.hidden_fields %} + {{ hidden_field }} + {% endfor %} + {{ f.item_model }} + + {{ f.unit_cost }} + + {{ f.quantity }} + {{ f.entity_unit }} + {% currency_symbol %}{{ f.instance.total_amount | currency_format }} + + {% if item_formset.can_delete %}{{ f.DELETE }}{% endif %} +
    {% trans 'Total' %} + {% currency_symbol %}{{ total_amount_due | currency_format }} +
    +
    +
    +
    + + {% trans 'New Item' %} + + +
    +
    +
    diff --git a/tests/django_ledger/tags/bill_table.html b/tests/django_ledger/tags/bill_table.html new file mode 100644 index 0000000..38a386c --- /dev/null +++ b/tests/django_ledger/tags/bill_table.html @@ -0,0 +1,94 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + + + + + {% for bill in bills %} + + + + + + + + + + + {% endfor %} + +
    Bill NumberBill DateBill FromAmountPaymentsIs Paid?Past Due?Actions
    {{ bill.bill_number }}{{ bill.date }} + {{ bill.vendor.vendor_name }} + + ${{ bill.amount_due | currency_format }} + + ${{ bill.amount_paid | currency_format }} + + {% if bill.paid %} + + {% icon 'bi:check-circle-fill' 24 %} + + {% else %} + + {% icon 'clarity:no-access-solid' 24 %} + + {% endif %} + + {% if bill.is_past_due %} + + {% icon 'bi:check-circle-fill' 24 %} + + {% else %} + + {% icon 'clarity:no-access-solid' 24 %} + + {% endif %} + + +
    +
    diff --git a/tests/django_ledger/tags/breadcrumbs.html b/tests/django_ledger/tags/breadcrumbs.html new file mode 100644 index 0000000..d1e1b82 --- /dev/null +++ b/tests/django_ledger/tags/breadcrumbs.html @@ -0,0 +1,38 @@ + diff --git a/tests/django_ledger/tags/chart_container.html b/tests/django_ledger/tags/chart_container.html new file mode 100644 index 0000000..2d66ad2 --- /dev/null +++ b/tests/django_ledger/tags/chart_container.html @@ -0,0 +1,3 @@ +
    + +
    diff --git a/tests/django_ledger/tags/customer_table.html b/tests/django_ledger/tags/customer_table.html new file mode 100644 index 0000000..245c19a --- /dev/null +++ b/tests/django_ledger/tags/customer_table.html @@ -0,0 +1,41 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + {% for customer in customers %} + + + + + + {% endfor %} + +
    CustomerAddressActions
    {{ customer.customer_name }}{{ customer.address_1 }} + +
    +
    diff --git a/tests/django_ledger/tags/data_import_job_list_table.html b/tests/django_ledger/tags/data_import_job_list_table.html new file mode 100644 index 0000000..ff004d4 --- /dev/null +++ b/tests/django_ledger/tags/data_import_job_list_table.html @@ -0,0 +1,60 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + + + {% for job in import_jobs %} + + + + + + + + + {% endfor %} + +
    StatusDescriptionLedgerCreatedCompletedActions
    {{ job.status }}{{ job.description }}{{ job.ledger }}{{ job.created }} + {% if job.completed %} + + + + {% else %} + + + + {% endif %} + + +
    +
    diff --git a/tests/django_ledger/tags/data_import_job_txs_imported.html b/tests/django_ledger/tags/data_import_job_txs_imported.html new file mode 100644 index 0000000..38cf19e --- /dev/null +++ b/tests/django_ledger/tags/data_import_job_txs_imported.html @@ -0,0 +1,32 @@ +
    + + + + + + + + + + + + + {% for imported_tx in imported_txs %} + + + + + + + + + {% endfor %} + +
    Dated PostedDescriptionAmountMap ToTXActions
    {{ imported_tx.date_posted }}{{ imported_tx.name }} + ${{ imported_tx.amount }} + {{ imported_tx.earnings_account }}{{ imported_tx.tx }} + + View + +
    +
    diff --git a/tests/django_ledger/tags/data_import_job_txs_table.html b/tests/django_ledger/tags/data_import_job_txs_table.html new file mode 100644 index 0000000..83a36a8 --- /dev/null +++ b/tests/django_ledger/tags/data_import_job_txs_table.html @@ -0,0 +1,53 @@ +{% load i18n %} +
    + {{ staged_txs_formset.non_form_errors }} + {% if staged_txs_formset.errors %}{{ staged_txs_formset.errors }}{% endif %} + {{ staged_txs_formset.management_form }} + {% csrf_token %} +
    + + + + + + + + + {# + + #} + + + + {% for txf in staged_txs_formset %} + + {% for hidden_field in txf.hidden_fields %} + {{ hidden_field }} + {% endfor %} + + + + + + + {% endfor %} + +
    Dated PostedDescriptionAmountMap ToCommit TXTX
    {{ txf.date_posted.value }}{{ txf.name.value }} + ${{ txf.amount.value }} + {{ txf.earnings_account }}{{ txf.tx_import }}
    +
    +
    +
    + +
    + +
    +
    diff --git a/tests/django_ledger/tags/date_picker.html b/tests/django_ledger/tags/date_picker.html new file mode 100644 index 0000000..cbe5666 --- /dev/null +++ b/tests/django_ledger/tags/date_picker.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% if date_navigation_url %} + +{% endif %} diff --git a/tests/django_ledger/tags/default_entity.html b/tests/django_ledger/tags/default_entity.html new file mode 100644 index 0000000..1a61d95 --- /dev/null +++ b/tests/django_ledger/tags/default_entity.html @@ -0,0 +1,10 @@ +
    + {% csrf_token %} +
    +
    +
    + {{ default_entity_form.entity_model }} +
    +
    +
    +
    diff --git a/tests/django_ledger/tags/expense_item_table.html b/tests/django_ledger/tags/expense_item_table.html new file mode 100644 index 0000000..1e7c423 --- /dev/null +++ b/tests/django_ledger/tags/expense_item_table.html @@ -0,0 +1,43 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + {% for expense_item in expense_list %} + + + + + + + {% endfor %} + +
    ItemUOMExpense AccountActions
    {{ expense_item.name }}{{ expense_item.uom }}{{ expense_item.expense_account }} + +
    +
    diff --git a/tests/django_ledger/tags/feedback_button.html b/tests/django_ledger/tags/feedback_button.html new file mode 100644 index 0000000..7a91393 --- /dev/null +++ b/tests/django_ledger/tags/feedback_button.html @@ -0,0 +1,87 @@ +{% load i18n %} +{% load icon from django_ledger %} + +{# BUG MODAL #} + +{# FEATURE MODAL #} + diff --git a/tests/django_ledger/tags/filters.html b/tests/django_ledger/tags/filters.html new file mode 100644 index 0000000..8c5d44d --- /dev/null +++ b/tests/django_ledger/tags/filters.html @@ -0,0 +1,11 @@ +{% load django_ledger %} +
    +
    +

    + Filters +

    +
    +
    + {% activity_filter %} +
    +
    diff --git a/tests/django_ledger/tags/icon.html b/tests/django_ledger/tags/icon.html new file mode 100644 index 0000000..0e7d770 --- /dev/null +++ b/tests/django_ledger/tags/icon.html @@ -0,0 +1 @@ + diff --git a/tests/django_ledger/tags/income_statement.html b/tests/django_ledger/tags/income_statement.html new file mode 100644 index 0000000..fdcc6d7 --- /dev/null +++ b/tests/django_ledger/tags/income_statement.html @@ -0,0 +1,112 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + {% if by_unit %}{% endif %} + + + + + + + {% if by_unit %}{% endif %} + + + + {% for acc in tx_digest.group_account.GROUP_INCOME %} + + + + {% if by_unit %} + + {% endif %} + + + + {% endfor %} + + + + {% if by_unit %}{% endif %} + + + + + + + + {% if by_unit %}{% endif %} + + + {% for acc in tx_digest.group_account.GROUP_EXPENSES %} + + + + {% if by_unit %} + + {% endif %} + + + + {% endfor %} + + + + {% if by_unit %}{% endif %} + + + + + + + {% if by_unit %}{% endif %} + + + +
    Account NumberDescriptionUnitBalance TypeBalance
    +

    {% trans 'Income' %}

    +
    {{ acc.code }} + {{ acc.name }} + + {% if acc.unit_name %}{{ acc.unit_name }}{% endif %} + + {% if acc.balance_type == 'debit' %} + {% icon 'bi:arrow-bar-down' 24 %} + {% elif acc.balance_type == 'credit' %} + {% icon 'bi:arrow-bar-up' 24 %} + {% endif %} + + {% currency_symbol %}{{ acc.balance | currency_format }} +
    + Total Income + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_INCOME | currency_format }} +
    +

    {% trans 'Expenses' %}

    +
    + {{ acc.code }} + + {{ acc.name }} + + {% if acc.unit_name %}{{ acc.unit_name }}{% endif %} + + {% if acc.balance_type == 'debit' %} + {% icon 'bi:arrow-bar-down' 24 %} + {% elif acc.balance_type == 'credit' %} + {% icon 'bi:arrow-bar-up' 24 %} + {% endif %} + + {% currency_symbol %}{{ acc.balance | reverse_sing | currency_format }} +
    + Total Expenses + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EXPENSES | reverse_sing | currency_format }} +
    + Total Income (Loss) + + {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EARNINGS | currency_format }} +
    +
    diff --git a/tests/django_ledger/tags/inventory_item_table.html b/tests/django_ledger/tags/inventory_item_table.html new file mode 100644 index 0000000..8a1dc40 --- /dev/null +++ b/tests/django_ledger/tags/inventory_item_table.html @@ -0,0 +1,45 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + + {% for inv_item in inventory_item_list %} + + + + + + + + {% endfor %} + +
    ItemUOMInventory AccountCOGS AccountActions
    {{ inv_item.name }}{{ inv_item.uom }}{{ inv_item.inventory_account }}{{ inv_item.cogs_account }} + +
    +
    diff --git a/tests/django_ledger/tags/invoice_item_formset.html b/tests/django_ledger/tags/invoice_item_formset.html new file mode 100644 index 0000000..9140c47 --- /dev/null +++ b/tests/django_ledger/tags/invoice_item_formset.html @@ -0,0 +1,69 @@ +{% load trans from i18n %} +{% load django_ledger %} +
    +
    +
    +

    {% trans 'Invoice Items' %}

    +
    +
    +
    + {% csrf_token %} + {{ item_formset.non_form_errors }} + {{ item_formset.management_form }} + + + + + + + + + + + + {% for f in item_formset %} + + + + + + + + {% endfor %} + + + + + + + + + + +
    {% trans 'Item' %}{% trans 'Unit Cost' %}{% trans 'Quantity' %}{% trans 'Total' %}{% trans 'Delete' %}
    + {% for hidden_field in f.hidden_fields %} + {{ hidden_field }} + {% endfor %} + {{ f.item_model }} + + {{ f.unit_cost }} + + {{ f.quantity }} + + {% currency_symbol %}{{ f.instance.total_amount | currency_format }} + + {% if item_formset.can_delete %}{{ f.DELETE }}{% endif %} +
    {% trans 'Total' %} + {% currency_symbol %}{{ total_amount_due | currency_format }} +
    +
    +
    +
    + + {% trans 'New Item' %} + + +
    +
    +
    diff --git a/tests/django_ledger/tags/invoice_table.html b/tests/django_ledger/tags/invoice_table.html new file mode 100644 index 0000000..1c00ede --- /dev/null +++ b/tests/django_ledger/tags/invoice_table.html @@ -0,0 +1,94 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + + + + + {% for invoice in invoices %} + + + + + + + + + + + {% endfor %} + +
    Invoice NumberInvoice DateInvoiced ToAmountPaymentsIs Paid?Past Due?Actions
    {{ invoice.invoice_number }}{{ invoice.date }} + {{ invoice.customer.customer_name }} + + ${{ invoice.amount_due | currency_format }} + + ${{ invoice.amount_paid | currency_format }} + + {% if invoice.paid %} + + {% icon 'bi:check-circle-fill' 24 %} + + {% else %} + + {% icon 'clarity:no-access-solid' 24 %} + + {% endif %} + + {% if invoice.is_past_due %} + + {% icon 'bi:check-circle-fill' 24 %} + + {% else %} + + {% icon 'clarity:no-access-solid' 24 %} + + {% endif %} + + +
    +
    diff --git a/tests/django_ledger/tags/jes_table.html b/tests/django_ledger/tags/jes_table.html new file mode 100644 index 0000000..4eaac25 --- /dev/null +++ b/tests/django_ledger/tags/jes_table.html @@ -0,0 +1,78 @@ +{% load django_ledger %} +
    + + + + + + + + + + + + + + {% for je in jes %} + + + + + + + + + + {% endfor %} + +
    DescriptionActivityJE DatePostedLockedCreatedActions
    {{ je.description }}{{ je.get_activity_display }}{{ je.date }} + {% if je.posted %} + {% icon 'ant-design:check-circle-filled' 24 %} + {% else %} + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} + + {% if je.locked %} + + {% icon 'bi:lock-fill' 24 %} + + {% else %} + + {% icon 'bx:bx-lock-open-alt' 24 %} + + {% endif %} + + {{ je.created | timesince }} + + +
    +
    diff --git a/tests/django_ledger/tags/ledgers_table.html b/tests/django_ledger/tags/ledgers_table.html new file mode 100644 index 0000000..890ef6d --- /dev/null +++ b/tests/django_ledger/tags/ledgers_table.html @@ -0,0 +1,67 @@ +{% now "Y" as current_year %} +{% load icon from django_ledger %} +
    + + + + + + + + + + + + + + {% for ledger in ledgers %} + + + + + + + + + + {% endfor %} + +
    NameDetailBalance SheetIncome StatementPostedLockedActions
    {{ ledger.name }} + + Journal + Entries + + + + Balance + Sheet + + + + Income + Statement + + + {% if ledger.posted %} + {% icon 'ant-design:check-circle-filled' 24 %} + {% else %} + + {% icon 'maki:roadblock-11' 24 %} + + {% endif %} + + {% if ledger.locked %} + {% icon 'bi:lock-fill' 24 %} + {% else %} + {% icon 'bx:bx-lock-open-alt' 24 %} + {% endif %} + + + Edit + +
    +
    diff --git a/tests/django_ledger/tags/menu.html b/tests/django_ledger/tags/menu.html new file mode 100644 index 0000000..cb777a4 --- /dev/null +++ b/tests/django_ledger/tags/menu.html @@ -0,0 +1,56 @@ +{% load django_ledger %} +{% load trans from i18n %} +{% if style == 'desktop' %} +
    + +
    + {# A menu that renders only on mobile devices when the burger menu is opened #} +{% elif style == 'mobile' %} + +{% endif %} diff --git a/tests/django_ledger/tags/modals.html b/tests/django_ledger/tags/modals.html new file mode 100644 index 0000000..05f2e0f --- /dev/null +++ b/tests/django_ledger/tags/modals.html @@ -0,0 +1,29 @@ +{% load i18n %} + diff --git a/tests/django_ledger/tags/period_navigator.html b/tests/django_ledger/tags/period_navigator.html new file mode 100644 index 0000000..849408f --- /dev/null +++ b/tests/django_ledger/tags/period_navigator.html @@ -0,0 +1,54 @@ +{% load django_ledger %} +{% load trans from i18n %} +
    +
    +
    +

    + {% if has_month %}{{ to_date | date:"F Y" }}{% endif %} + {% if has_quarter %}Q{{ quarter }} {{ year }}{% endif %} + {% if has_date %}{{ to_date | date }}{% endif %} +

    +
    +

    + Year: + + << {{ previous_year }} + + | + {{ year }} + | + {{ next_year }} >> +

    +

    + Quarter: + {% for q_url in quarter_urls %} + {{ q_url.quarter_name }} + {% if not forloop.last %}|{% endif %} + {% endfor %} +

    +

    + Month: + {% for m_url in month_urls %} + {{ m_url.month_abbr }} + {% if not forloop.last %}|{% endif %} + {% endfor %} +

    +
    + {% if has_date %} +

    + {{ from_date | date:"m/d/Y" }} +

    + {% else %} +

    + {{ from_date | date:"m/d/Y" }} + {% trans 'thru' %} + {{ to_date | date:"m/d/Y" }} +

    + {% endif %} + {% trans 'Go To Current Month' %} +
    +
    + {% date_picker date_navigation_url %} +
    +
    +
    diff --git a/tests/django_ledger/tags/pns_table.html b/tests/django_ledger/tags/pns_table.html new file mode 100644 index 0000000..dc8b602 --- /dev/null +++ b/tests/django_ledger/tags/pns_table.html @@ -0,0 +1,51 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + + + {% for pns in pns_list %} + + + + + + + + + {% endfor %} + +
    ItemUOMSKUUPCEarnings AccountActions
    {{ pns.name }}{{ pns.uom }}{{ pns.sku }}{{ pns.upc }} + {{ pns.earnings_account }} + + +
    +
    diff --git a/tests/django_ledger/tags/po_item_formset.html b/tests/django_ledger/tags/po_item_formset.html new file mode 100644 index 0000000..d002cb4 --- /dev/null +++ b/tests/django_ledger/tags/po_item_formset.html @@ -0,0 +1,91 @@ +{% load trans from i18n %} +{% load django_ledger %} +
    +
    +
    +

    {% trans 'Purchase Order Items' %}

    +
    +
    +
    + {% csrf_token %} + {{ item_formset.non_form_errors }} + {{ item_formset.management_form }} + + + + + + + + + + {% if item_formset.can_delete %} + + {% endif %} + + + + + {% for f in item_formset %} + + + + + + + + {% if item_formset.can_delete %}{% endif %} + + + {% endfor %} + + + + + + + + + + {% if item_formset.can_delete %}{% endif %} + + + +
    {% trans 'Item' %}{% trans 'Unit Cost' %}{% trans 'Quantity' %}{% trans 'Unit' %}{% trans 'Total' %}{% trans 'Status' %}{% trans 'Delete' %}{% trans 'Create Bill' %}
    + {% for hidden_field in f.hidden_fields %} + {{ hidden_field }} + {% endfor %} + {{ f.item_model }} + {% if f.errors %}{{ f.errors }}{% endif %} + + {{ f.unit_cost }} + + {{ f.quantity }} + {{ f.entity_unit }} + {% currency_symbol %}{{ f.instance.total_amount | currency_format }} + {{ f.po_item_status }}{{ f.DELETE }} + {% if f.instance.can_create_bill %} + {{ f.create_bill }} + {% elif f.instance.bill_model %} + + View + Bill + + {# +{% else %} + #} + {% endif %} +
    {% trans 'Total' %} + {% currency_symbol %}{{ total_amount_due | currency_format }} +
    +
    +
    +
    + + {% trans 'New Item' %} + + +
    +
    +
    diff --git a/tests/django_ledger/tags/po_table.html b/tests/django_ledger/tags/po_table.html new file mode 100644 index 0000000..98c6f3e --- /dev/null +++ b/tests/django_ledger/tags/po_table.html @@ -0,0 +1,61 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + + + + + {% for po in po_list %} + + + + + + + + + + {% endfor %} + +
    PO NumberDescriptionPO DatePO StatusFulfilment DatePO AmountActions
    {{ po.po_number }}{{ po.po_title }}{{ po.po_date }} + {{ po.get_po_status_display }} + + {% if po.fulfillment_date %}{{ po.fulfillment_date }}{% endif %} + + {% currency_symbol %}{{ po.po_amount | currency_format }} + + +
    +
    diff --git a/tests/django_ledger/tags/txs_table.html b/tests/django_ledger/tags/txs_table.html new file mode 100644 index 0000000..4f9f43e --- /dev/null +++ b/tests/django_ledger/tags/txs_table.html @@ -0,0 +1,46 @@ +{% load django_ledger %} +
    + + + + + + + + + + + {% for tx in txs %} + + + + + + + + + + {% endfor %} + + + + + + + + + +
    DateAccountAccount NameUnitCreditDebitDescription
    {{ tx.journal_entry.date }}{{ tx.account.code }}{{ tx.account.name }} + {% if tx.journal_entry.entity_unit %}{{ tx.journal_entry.entity_unit }}{% endif %} + + {% if tx.tx_type == 'credit' %}${{ tx.amount | currency_format }}{% endif %} + + {% if tx.tx_type == 'debit' %}${{ tx.amount | currency_format }}{% endif %} + + {{ tx.description }} +
    Total + {% currency_symbol %}{{ total_credits | currency_format }} + + {% currency_symbol %}{{ total_debits | currency_format }} +
    +
    diff --git a/tests/django_ledger/tags/uom_table.html b/tests/django_ledger/tags/uom_table.html new file mode 100644 index 0000000..5d4f5e8 --- /dev/null +++ b/tests/django_ledger/tags/uom_table.html @@ -0,0 +1,53 @@ +{% load trans from i18n %} +{% load icon from django_ledger %} +
    + + + + + + + + + + + {% for uom in uom_list %} + + + + + + + {% endfor %} + +
    {% trans 'UOM' %}{% trans 'Abbreviation' %}{% trans 'Active' %}{% trans 'Actions' %}
    {{ uom.name }}{{ uom.unit_abbr }} + {% if uom.is_active %} + + {% icon 'bi:check-circle-fill' 24 %} + + {% else %} + + {% icon 'clarity:no-access-solid' 24 %} + + {% endif %} + + +
    +
    diff --git a/tests/django_ledger/tags/vendor_table.html b/tests/django_ledger/tags/vendor_table.html new file mode 100644 index 0000000..7ebf2fa --- /dev/null +++ b/tests/django_ledger/tags/vendor_table.html @@ -0,0 +1,46 @@ +{% load django_ledger %} +{% load i18n %} +
    + + + + + + + + + + {% for vendor in vendors %} + + + + + + {% endfor %} + +
    VendorAddressActions
    {{ vendor.vendor_name }}{{ vendor.address_1 }} + +
    +
    diff --git a/tests/django_ledger/txs.html b/tests/django_ledger/txs.html new file mode 100644 index 0000000..f8a3717 --- /dev/null +++ b/tests/django_ledger/txs.html @@ -0,0 +1,51 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% block view_content %} +
    +
    + {% csrf_token %} +
    +
    + {{ txs_formset.non_form_errors }} + {{ txs_formset.management_form }} +
    +
    + + + + + + + {% if txs_formset.can_delete %}{% endif %} + + {% for f in txs_formset %} + + + + + + + + {% endfor %} +
    AccountTX TypeAmountDescriptionDelete
    + {% for hidden_field in f.hidden_fields %} + {{ hidden_field }} + {% endfor %} + {{ f.account }} + {{ f.tx_type }}{{ f.amount }}{{ f.description }} + {% if txs_formset.can_delete %}{{ f.DELETE }}{% endif %} +
    +
    +
    + + + Done + +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/unit_create.html b/tests/django_ledger/unit_create.html new file mode 100644 index 0000000..74da145 --- /dev/null +++ b/tests/django_ledger/unit_create.html @@ -0,0 +1,33 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'Create Entity Unit' %} +

    +
    +
    +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/unit_detail.html b/tests/django_ledger/unit_detail.html new file mode 100644 index 0000000..0e679f1 --- /dev/null +++ b/tests/django_ledger/unit_detail.html @@ -0,0 +1,38 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    + +
    +{% endblock %} diff --git a/tests/django_ledger/unit_list.html b/tests/django_ledger/unit_list.html new file mode 100644 index 0000000..206026f --- /dev/null +++ b/tests/django_ledger/unit_list.html @@ -0,0 +1,62 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'Entity Units List' %} +

    +
    + +
    +
    +
    + {% for unit in unit_list %} +
    +
    +
    +{# +

    + #} +{# +{% icon "bi:cash-stack" 16 %} + #} +{# {% trans 'Unit' %} +

    + #} +

    + {{ unit.name }} +

    +
    + +
    +
    +{% endfor %} +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/unit_update.html b/tests/django_ledger/unit_update.html new file mode 100644 index 0000000..184e79b --- /dev/null +++ b/tests/django_ledger/unit_update.html @@ -0,0 +1,33 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'Update Entity Unit' %} +

    +
    +
    +
    +
    +
    +
    + {% csrf_token %} + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/uom_create.html b/tests/django_ledger/uom_create.html new file mode 100644 index 0000000..b97b964 --- /dev/null +++ b/tests/django_ledger/uom_create.html @@ -0,0 +1,32 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/uom_list.html b/tests/django_ledger/uom_list.html new file mode 100644 index 0000000..40233ef --- /dev/null +++ b/tests/django_ledger/uom_list.html @@ -0,0 +1,27 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    +
    +

    + {% trans 'Unit of Measures List' %} +

    +
    + +
    +
    + {% uom_table uom_list %} +
    +
    +{% endblock %} diff --git a/tests/django_ledger/uom_update.html b/tests/django_ledger/uom_update.html new file mode 100644 index 0000000..97c22b6 --- /dev/null +++ b/tests/django_ledger/uom_update.html @@ -0,0 +1,34 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    +
    + {% csrf_token %} +
    +

    + + {% icon 'ic:baseline-production-quantity-limits' 36 %} + + {{ page_title }} +

    +
    +
    + {{ form.as_p }} + + + {% trans 'Back' %} + +
    +
    +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/vendor_create.html b/tests/django_ledger/vendor_create.html new file mode 100644 index 0000000..6f02e8c --- /dev/null +++ b/tests/django_ledger/vendor_create.html @@ -0,0 +1,22 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {{ form.as_p }} + {% csrf_token %} +
    +
    + + + {% trans 'Go Back' %} + +
    +
    +
    +{% endblock %} diff --git a/tests/django_ledger/vendor_list.html b/tests/django_ledger/vendor_list.html new file mode 100644 index 0000000..c8962de --- /dev/null +++ b/tests/django_ledger/vendor_list.html @@ -0,0 +1,20 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load static %} +{% load django_ledger %} +{% block view_content %} + +{% endblock %} diff --git a/tests/django_ledger/vendor_update.html b/tests/django_ledger/vendor_update.html new file mode 100644 index 0000000..c1c42fe --- /dev/null +++ b/tests/django_ledger/vendor_update.html @@ -0,0 +1,23 @@ +{% extends 'django_ledger/layouts/content_layout_1.html' %} +{% load i18n %} +{% load django_ledger %} +{% block view_content %} +
    +
    +
    + {{ form.as_p }} + {% csrf_token %} +
    +
    + + + {% trans 'Go Back' %} + +
    +
    +
    +{% endblock %} diff --git a/tests/django_oscar/flatpages/default.html b/tests/django_oscar/flatpages/default.html new file mode 100644 index 0000000..08a80e0 --- /dev/null +++ b/tests/django_oscar/flatpages/default.html @@ -0,0 +1,33 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% block title %}{{ flatpage.title }} | {{ block.super }}{% endblock %} +{% block header %} + +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block content %} +
    + {{ flatpage.content }} +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/403.html b/tests/django_oscar/oscar/403.html new file mode 100644 index 0000000..af016f7 --- /dev/null +++ b/tests/django_oscar/oscar/403.html @@ -0,0 +1,13 @@ +{% extends "oscar/error.html" %} +{% load i18n %} +{% block title %} + {% trans 'Permission denied!' %} | {{ block.super }} +{% endblock %} +{% block error_heading %} + {% trans "Permission denied!" %} +{% endblock %} +{% block error_message %} +

    + {% trans "We're sorry but you are not permitted to access this page." %} +

    +{% endblock %} diff --git a/tests/django_oscar/oscar/404.html b/tests/django_oscar/oscar/404.html new file mode 100644 index 0000000..0946e84 --- /dev/null +++ b/tests/django_oscar/oscar/404.html @@ -0,0 +1,13 @@ +{% extends "oscar/error.html" %} +{% load i18n %} +{% block title %} + {% trans 'Page not found' %} | {{ block.super }} +{% endblock %} +{% block error_heading %} + {% trans "Page not found!" %} +{% endblock %} +{% block error_message %} +

    + {% trans "We're sorry but the page you are looking for can't be found." %} +

    +{% endblock %} diff --git a/tests/django_oscar/oscar/500.html b/tests/django_oscar/oscar/500.html new file mode 100644 index 0000000..5841d00 --- /dev/null +++ b/tests/django_oscar/oscar/500.html @@ -0,0 +1,24 @@ + + + + Server error! + + + + +

    Server error!

    +

    + We're sorry but something went terribly wrong and we've been unable to generate the page you requested. +

    +

    + This incident has been logged and will be addressed by an engineer as soon as possible. +

    +

    + + Return to previous page + +
    + Go to homepage +

    + + diff --git a/tests/django_oscar/oscar/README.rst b/tests/django_oscar/oscar/README.rst new file mode 100644 index 0000000..2738fe9 --- /dev/null +++ b/tests/django_oscar/oscar/README.rst @@ -0,0 +1,68 @@ +================== +Template Structure +================== + +Markup +------ + +Template markup for the most part has been written in accordance with Twitter Bootstrap. +Documentation on Bootstrap HTML markup and classes used see (http://twitter.github.com/bootstrap/index.html). + +Layouts +------- + +Currently there are 5 different layouts that extend the base.html + +layout.html : + For single column layouts +* detail.html +* basket.html +* flatpages/default.html + +layout_2_col.html : + For two column layouts whereby first column is subservient (aside) to the main column +* home.html +* browse.html + +layout_3_col.html : + For three column layouts whereby first and third columns are subservient (aside) to the main middlecolumn +* Currently NOT used + +checkout/layout.html : + For the checkout pages, removes the main navigation and uses a single column by default +* checkout.html +* gateway.html +* thank_you.html + +dashboard/layout.html : + For dashboard section specifically different from the other frontend features: +* separate css +* separate js +* single column 100% page width + +Forms +----- + +Forms are rendered using either of these two partial templates + +* form_fields.html +* form_fields_inline.html + +form_fields.html : + This is used for the majority of the forms in the frontend and dashboard, using a horizontal label / field stack + +form_fields_inline.html : + Used for smaller forms to reduced screen space (mainly in the dashboard section for search forms) + +Partials form_fields:: + + 'include "oscar/partials/form_fields.html" with form=form' + +Partials form_fields_inline:: + + 'include "oscar/partials/form_fields_inline.html" with form=form' + +Conventions +----------- + +Template names should use underscores, not hyphens. diff --git a/tests/django_oscar/oscar/base.html b/tests/django_oscar/oscar/base.html new file mode 100644 index 0000000..b325658 --- /dev/null +++ b/tests/django_oscar/oscar/base.html @@ -0,0 +1,47 @@ +{% load i18n %} +{% load static %} + + + + + {% block title %}{{ shop_name }} - {{ shop_tagline }}{% endblock %} + + + + + + {% block favicon %} + + {% endblock %} + {# Block where global CSS will go. #} + {% block styles %}{% endblock %} + {# Additional CSS - specific to certain pages #} + {% block extrastyles %}{% endblock %} + {% block extrahead %}{% endblock %} + {% block tracking %} + {# Default to using Google analytics #} + {% include "oscar/partials/google_analytics.html" %}{% endblock %} + + + {# Main content goes in this 'layout' block #} + {% block layout %}{% endblock %} + {# Scripts loaded from a CDN. #} + {% block cdn_scripts %} + + + + {% endblock %} + {# Local scripts #} + {% block scripts %}{% endblock %} + {# Additional JS scripts #} + {% block extrascripts %}{% endblock %} + {# Block for body onload functions #} + + {# Page meta-data - this is populated by the 'metadata' template context processor #} + + diff --git a/tests/django_oscar/oscar/basket/basket.html b/tests/django_oscar/oscar/basket/basket.html new file mode 100644 index 0000000..a42c3ff --- /dev/null +++ b/tests/django_oscar/oscar/basket/basket.html @@ -0,0 +1,33 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% block title %} + {% trans "Basket" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{# Hide mini-basket so we don't have two baskets to keep in sync #} +{% block mini_basket %}{% endblock %} +{% block headertext %} + {% trans "Basket" %} +{% endblock %} +{% block content %} + {# Use a partial template so that AJAX can be used to re-render basket #} + {% include 'oscar/basket/partials/basket_content.html' %}{% endblock content %} + {% block onbodyload %} + {{ block.super }} + {# We pass in the URL to send AJAX requests to #} + var options = { + 'basketURL': '{% url 'basket:summary' %}' + }; + oscar.basket.init(options); + {% endblock %} diff --git a/tests/django_oscar/oscar/basket/messages/addition.html b/tests/django_oscar/oscar/basket/messages/addition.html new file mode 100644 index 0000000..073db55 --- /dev/null +++ b/tests/django_oscar/oscar/basket/messages/addition.html @@ -0,0 +1,14 @@ +{% load i18n %} +{% if quantity == 1 %} + {% blocktrans with title=product.get_title %} + {{ title }} + has been added to your basket. + {% endblocktrans %} +{% else %} + {% blocktrans with title=product.get_title quantity=quantity %} + {{ quantity }} + copies of + {{ title }} + have been added to your basket. + {% endblocktrans %} +{% endif %} diff --git a/tests/django_oscar/oscar/basket/messages/line_restored.html b/tests/django_oscar/oscar/basket/messages/line_restored.html new file mode 100644 index 0000000..10f321c --- /dev/null +++ b/tests/django_oscar/oscar/basket/messages/line_restored.html @@ -0,0 +1,5 @@ +{% load i18n %} +{% blocktrans with title=line.product.get_title %} + {{ title }} + has been moved back to your basket. +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/basket/messages/line_saved.html b/tests/django_oscar/oscar/basket/messages/line_saved.html new file mode 100644 index 0000000..c67cf7d --- /dev/null +++ b/tests/django_oscar/oscar/basket/messages/line_saved.html @@ -0,0 +1,5 @@ +{% load i18n %} +{% blocktrans with title=line.product.get_title %} + {{ title }} + has been saved for later +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/basket/messages/new_total.html b/tests/django_oscar/oscar/basket/messages/new_total.html new file mode 100644 index 0000000..c8d0720 --- /dev/null +++ b/tests/django_oscar/oscar/basket/messages/new_total.html @@ -0,0 +1,26 @@ +{% load i18n %} +{% load currency_filters %} +{% if basket.is_empty %} + {% trans "Your basket is now empty" %} +{% else %} + {% if basket.is_tax_known %} + {% blocktrans with total=basket.total_incl_tax|currency:basket.currency %} + Your basket total is now + {{ total }} + {% endblocktrans %} + {% else %} + {% blocktrans with total=basket.total_excl_tax|currency:basket.currency %} + Your basket total is now + {{ total }} + {% endblocktrans %} + {% endif %} +{% endif %} +{% if include_buttons %} +
    + + {% trans "View basket" %} + + + {% trans "Checkout now" %} + +{% endif %} diff --git a/tests/django_oscar/oscar/basket/messages/offer_gained.html b/tests/django_oscar/oscar/basket/messages/offer_gained.html new file mode 100644 index 0000000..c9f9cdd --- /dev/null +++ b/tests/django_oscar/oscar/basket/messages/offer_gained.html @@ -0,0 +1,6 @@ +{% load i18n %} +{% blocktrans with name=offer.name %} + Your basket now qualifies for the + {{ name }} + offer. +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/basket/messages/offer_lost.html b/tests/django_oscar/oscar/basket/messages/offer_lost.html new file mode 100644 index 0000000..3852d17 --- /dev/null +++ b/tests/django_oscar/oscar/basket/messages/offer_lost.html @@ -0,0 +1,6 @@ +{% load i18n %} +{% blocktrans with name=offer.name %} + Your basket no longer qualifies for the + {{ name }} + offer. +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/basket/partials/basket_content.html b/tests/django_oscar/oscar/basket/partials/basket_content.html new file mode 100644 index 0000000..7a5c7a3 --- /dev/null +++ b/tests/django_oscar/oscar/basket/partials/basket_content.html @@ -0,0 +1,277 @@ +{% load i18n %} +{% load image_tags %} +{% load currency_filters %} +{% load purchase_info_tags %} +{% load widget_tweaks %} +{% if basket_warnings %} +
    {% trans "Important messages about items in your basket" %}
    + {% for warning in basket_warnings %} +
    + {{ warning }} +
    + {% endfor %} +{% endif %} +{% if upsell_messages %} +
    +

    {% trans "You could be missing out on offers!" %}

    + {% for upsell in upsell_messages %} + {% blocktrans with message=upsell.message url=upsell.offer.get_absolute_url offer_name=upsell.offer.name %} +
    + {{ message }} to qualify for the + {{ offer_name }} + special offer +
    + {% endblocktrans %} + {% endfor %} +
    +{% endif %} +{% if not basket.is_empty %} + {% block basket_form_headers %} +
    +
    +

    {% trans "Items to buy now" %}

    +

    {% trans "Quantity" %}

    +

    {% trans "Price" %}

    +

    {% trans "Total" %}

    +
    +
    + {% endblock %} + {% block basket_form_main %} +
    + {% csrf_token %} + {{ formset.management_form }} + {% for form in formset %} + {% with line=form.instance product=form.instance.product %} + {% purchase_info_for_line request line as session %} +
    +
    +
    + {{ form.id }} + {% with image=product.primary_image %} + {% oscar_thumbnail image.original "100x100" upscale=False as thumb %} + + {{ product.get_title }} + + {% endwith %} +
    +
    +

    + + {{ line.description }} + +

    +

    + {{ session.availability.message }} +

    +
    +
    +
    +
    + {% render_field form.quantity class+="form-control" %} +
    + +
    +
    +
    +
    + + {% trans "Remove" %} + + {% if user.is_authenticated %} + | + + {% trans "Save for later" %} + + {% endif %} +
    + {{ form.save_for_later }} + {{ form.DELETE }} +
    + {% for field_errors in form.errors.values %} + {% for error in field_errors %} + + + {{ error }} + + {% endfor %} + {% endfor %} +
    +
    +
    + {% if not line.unit_price_incl_tax and not line.unit_tax_excl_tax %} +

    + — +

    + {% else %} +

    + {% trans "Price" %}: + {% if line.is_tax_known %} + {{ line.unit_price_incl_tax|currency:line.price_currency }} + {% else %} + {{ line.unit_price_excl_tax|currency:line.price_currency }} + {% endif %} +

    + {% endif %} +
    +
    + {% if not line.line_price_incl_tax and not line_price_excl_tax %} +

    + — +

    + {% else %} +

    + {% trans "Total" %}: + {% if line.is_tax_known %} + {{ line.line_price_incl_tax|currency:line.price_currency }} + {% else %} + {{ line.line_price_excl_tax|currency:line.price_currency }} + {% endif %} +

    + {% endif %} +
    +
    +
    + {% endwith %} +{% endfor %} +
    +{% endblock %} +
    +{% block vouchers %} +{# Hide the entire section if a custom BasketView doesn't pass in a voucher form #} +{% if voucher_form %} +
    +
    +

    {% trans "Voucher/promo code" %}

    +
    + + +
    +{% endif %} +{% endblock vouchers %} +{% block baskettotals %} +
    +
    +

    {% trans "Totals" %}

    +
    + {% include 'oscar/basket/partials/basket_totals.html' with editable=1 %} +
    +{% endblock baskettotals %} +
    +{% block formactions %} + +{% endblock formactions %} +{% else %} +{% block emptybasket %} +

    +{% trans "Your basket is empty." %} +{% trans "Continue shopping" %} +

    +{% endblock %} +{% endif %} +{% block savedbasket %} +{% if user.is_authenticated and saved_formset %} +
    +
    +

    {% trans "Items to buy later" %}

    +
    +
    +
    + {% trans "Items" %} +
    +
    + {% trans "Price" %} +
    +
    +   +
    +
    +
    + {% csrf_token %} + {{ saved_formset.management_form }} + {% for form in saved_formset %} + {% purchase_info_for_product request form.instance.product as session %} +
    +
    +
    + {{ form.id }} + {% with image=form.instance.product.primary_image %} + {% oscar_thumbnail image.original "100x100" upscale=False as thumb %} + + {{ form.instance.product.get_title }} + + {% endwith %} +
    +
    +

    + + {{ form.instance.description }} + +

    +

    + {{ session.availability.message }} +

    + + {% trans "Remove" %} + +
    + {{ form.move_to_basket }} + {{ form.DELETE }} +
    +
    + {% purchase_info_for_product request form.instance.product as saved %} +
    +

    + {% if saved.price.is_tax_known %} + {{ saved.price.incl_tax|currency:saved.price.currency }} + {% else %} + {{ saved.price.excl_tax|currency:saved.price.currency }} + {% endif %} +

    +
    + +
    +
    + {% endfor %} +
    +
    +{% endif %} +{% endblock %} diff --git a/tests/django_oscar/oscar/basket/partials/basket_quick.html b/tests/django_oscar/oscar/basket/partials/basket_quick.html new file mode 100644 index 0000000..3afa05f --- /dev/null +++ b/tests/django_oscar/oscar/basket/partials/basket_quick.html @@ -0,0 +1,69 @@ +{% load history_tags %} +{% load basket_tags %} +{% load currency_filters %} +{% load image_tags %} +{% load i18n %} +
      + {% if request.basket.num_lines %} + {% for line in request.basket.all_lines %} +
    • +
      +
      +
      + {% with image=line.product.primary_image %} + {% oscar_thumbnail image.original "100x100" upscale=False as thumb %} + + {{ line.product.get_title }} + + {% endwith %} +
      +
      + +
      + {% trans "Qty" %} + {{ line.quantity }} +
      +
      + {{ line.unit_price_excl_tax|currency:request.basket.currency }} +
      +
      +
    • + {% endfor %} +
    • +

      + {% if request.basket.is_tax_known %} + + {% trans "Total:" %} {{ request.basket.total_incl_tax|currency:request.basket.currency }} + + {% else %} + + {% trans "Total:" %} {{ request.basket.total_excl_tax|currency:request.basket.currency }} + + {% endif %} +

      + + {% trans "View basket" %} + + + + {% trans "Checkout" %} + +
    • + {% else %} +
    • +

      + {% trans "Your basket is empty." %} +

      +
    • + {% endif %} +
    diff --git a/tests/django_oscar/oscar/basket/partials/basket_totals.html b/tests/django_oscar/oscar/basket/partials/basket_totals.html new file mode 100644 index 0000000..807b08d --- /dev/null +++ b/tests/django_oscar/oscar/basket/partials/basket_totals.html @@ -0,0 +1,291 @@ +{% load i18n %} +{% load currency_filters %} +{% load shipping_tags %} +
    + + + {% block basket_header %} + + + + {% endblock %} + {% with offer_discounts=basket.offer_discounts voucher_discounts=basket.grouped_voucher_discounts %} + {% block discount_totals %} + {% if offer_discounts or voucher_discounts %} + {# Basket total will be discounted so we show a before and after version #} + + + + + {% for discount in offer_discounts %} + + + + + {% endfor %} + {% if voucher_discounts %} + + + + {% for discount in voucher_discounts %} + + + + + {% endfor %} + {% endif %} + {% endif %} + {% endblock %} + {% block basket_total %} + {% if offer_discounts or voucher_discounts %} + + + + + {% else %} + {# No discounts to basket #} + + + + + {% endif %} + {% endblock %} + {% endwith %} + {% block shipping_totals %} + + + + + + + + {% if not shipping_method.is_discounted %} + + + + + {% else %} + {% shipping_charge_discount shipping_method basket as shipping_discount %} + {% shipping_charge_excl_discount shipping_method basket as shipping_charge_excl_discount %} + {# As shipping is discounted, we break it down into its original charge and a discount #} + + + + + + + + + {# This section needs adjustment to when taxes are shown separately #} + + + + + + + + + {% endif %} + {% endblock %} + {% block surcharges %} + {% if surcharges %} + + + + + + + + {% for surcharge in surcharges %} + + + + + {% endfor %} + {% endif %} + {% endblock %} + {% block tax_totals %} + {% if show_tax_separately %} + + + + + + + + + + + + + + + + {% endif %} + {% endblock %} + {% block post_order_action_totals %} + {% if basket.post_order_actions %} + + + + + + + + + {% for discount in basket.post_order_actions %} + + + + {% endfor %} + {% endif %} + {% endblock %} + {% block order_total %} + + + + + + + + + {% if not order_total.is_tax_known %} + + + + {% endif %} + {% endblock %} + +
    +

    {% trans "Basket" %}

    +
    {% trans "Basket total (before discounts)" %} + {% if basket.is_tax_known and not show_tax_separately %} + {{ basket.total_incl_tax_excl_discounts|currency:basket.currency }} + {% else %} + {{ basket.total_excl_tax_excl_discounts|currency:basket.currency }} + {% endif %} +
    + {% trans "Discount" %} + {{ discount.name }} + {% if discount.description %} +
    + + {{ discount.description }} + + {% endif %} +
    -{{ discount.discount|currency:basket.currency }}
    +

    {% trans "Vouchers" %}

    +
    + {{ discount.voucher.name }} ({{ discount.voucher.code }}) + {% if editable %} +
    + {% csrf_token %} + +
    + {% endif %} +
    -{{ discount.discount|currency:basket.currency }}
    {% trans "Basket total (after discounts)" %} + {% if not show_tax_separately and basket.is_tax_known %} + {{ basket.total_incl_tax|currency:basket.currency }} + {% else %} + {{ basket.total_excl_tax|currency:basket.currency }} + {% endif %} +
    {% trans "Basket total" %} + {% if not show_tax_separately and basket.is_tax_known %} + {{ basket.total_incl_tax|currency:basket.currency }} + {% else %} + {{ basket.total_excl_tax|currency:basket.currency }} + {% endif %} +
     
    +

    {% trans "Shipping" %}

    + {% if shipping_methods|length > 1 and editable %} + + {% trans "Alternative shipping methods can be chosen during checkout" %} + + {% endif %} +
    {{ shipping_method.name }} + {% if not show_tax_separately and shipping_charge.is_tax_known %} + {{ shipping_charge.incl_tax|currency:basket.currency }} + {% else %} + {{ shipping_charge.excl_tax|currency:basket.currency }} + {% endif %} +
    {% trans "Shipping method" %}{{ shipping_method.name }}
    {% trans "Shipping total (before discounts)" %} + {% if not show_tax_separately and shipping_charge_excl_discount.is_tax_known %} + {{ shipping_charge_excl_discount.incl_tax|currency:basket.currency }} + {% else %} + {{ shipping_charge_excl_discount.excl_tax|currency:basket.currency }} + {% endif %} +
    + {% trans "Discount" %} + {{ shipping_method.discount_name }} + -{{ shipping_discount|currency:basket.currency }}
    + {% trans "Shipping total (after discounts)" %} + + {% if not show_tax_separately and shipping_charge.is_tax_known %} + {{ shipping_charge.incl_tax|currency:basket.currency }} + {% else %} + {{ shipping_charge.excl_tax|currency:basket.currency }} + {% endif %} +
     
    +

    {% trans "Surcharges" %}

    +
    + {{ surcharge.surcharge.name }} + + {% if not show_tax_separately and surcharge.price.is_tax_known %} + {{ surcharge.price.incl_tax|currency:basket.currency }} + {% else %} + {{ surcharge.price.excl_tax|currency:basket.currency }} + {% endif %} +
    +   +
    +

    + {% trans "Tax" %} +

    +
    + {% trans "Basket" %} + + {{ basket.total_tax|currency:basket.currency }} +
    + {% trans "Shipping" %} + + {{ shipping_charge.tax|currency:basket.currency }} +
    +   +
    +

    + {% trans "Post order actions" %} +

    + + {% trans "These will be applied once your order is placed." %} + +
    + + {{ discount.name }} + +
    +

    + {{ discount.description }} +

    +
    +   +
    +

    + {% trans "Order total" %} +

    +
    +

    + {% if order_total.is_tax_known %} + {{ order_total.incl_tax|currency:basket.currency }} + {% else %} + {{ order_total.excl_tax|currency:basket.currency }} + {% endif %} +

    +
    + + {% trans "Taxes will be added during checkout." %} + +
    +
    diff --git a/tests/django_oscar/oscar/catalogue/browse.html b/tests/django_oscar/oscar/catalogue/browse.html new file mode 100644 index 0000000..ef1cf17 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/browse.html @@ -0,0 +1,133 @@ +{% extends "oscar/layout_2_col.html" %} +{% load basket_tags %} +{% load category_tags %} +{% load product_tags %} +{% load i18n %} +{% block title %} + {% if summary %}{{ summary }} |{% endif %} + {{ block.super }} +{% endblock %} +{% block headertext %}{{ summary }}{% endblock %} +{% block breadcrumbs %} + +{% endblock breadcrumbs %} +{% block column_left %} + {% category_tree as tree_categories %} + {% if tree_categories %} +

    {% trans "Show results for" %}

    +
    + +
    +{% endif %} +{% if has_facets %} +

    {% trans "Refine by" %}

    +
    + {% for field, data in facet_data.items %} + {% if data.results %} + {% include 'oscar/search/partials/facet.html' with name=data.name items=data.results %}{% endif %} + {% endfor %} +
    + {% endif %} +{% endblock %} +{% block content %} +
    + {# Render other search params as hidden inputs #} + {% for value in selected_facets %} + + {% endfor %} + + {% if paginator.count %} + {% if paginator.num_pages > 1 %} + {% blocktrans with start=page_obj.start_index end=page_obj.end_index count num_results=paginator.count %} + {{ num_results }} + result - showing + {{ start }} + to + {{ end }} + . + {% plural %} + {{ num_results }} + results - showing + {{ start }} + to + {{ end }} + . + {% endblocktrans %} + {% else %} + {% blocktrans count num_results=paginator.count %} + {{ num_results }} + result. + {% plural %} + + {{ num_results }} + + results. + {% endblocktrans %} + {% endif %} + {% if form %} +
    + {% include "oscar/partials/form_field.html" with field=form.sort_by style='horizontal' %} +
    + {% endif %} + {% else %} +

    + {% trans " + + 0 + + results." %} +

    + {% endif %} +
    + {% if products %} +
    +
    +
      + {% for product in products %} +
    1. + {% render_product product %} +
    2. + {% endfor %} +
    + {% include "oscar/partials/pagination.html" %} +
    +
    + {% else %} +

    + {% trans "No products found." %} +

    + {% endif %} +{% endblock content %} +{% block onbodyload %} + {{ block.super }} + oscar.search.init(); +{% endblock %} diff --git a/tests/django_oscar/oscar/catalogue/category.html b/tests/django_oscar/oscar/catalogue/category.html new file mode 100644 index 0000000..b2f164a --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/category.html @@ -0,0 +1,56 @@ +{% extends "oscar/catalogue/browse.html" %} +{% load i18n %} +{% block title %}{{ category.get_meta_title }} | {{ block.super }}{% endblock %} +{% block description %}{{ category.get_meta_description }}{% endblock %} +{% block header %} + +{% endblock %} +{% block breadcrumbs %} + +{% endblock breadcrumbs %} +{% block content %} + {% if category.description %} +
    +
    +

    + {{ category.description|safe }} +

    +
    + {% if category.image %} +
    + {{ category.name }} +
    + {% endif %} +
    + {% endif %} + {{ block.super }} +{% endblock %} diff --git a/tests/django_oscar/oscar/catalogue/detail.html b/tests/django_oscar/oscar/catalogue/detail.html new file mode 100644 index 0000000..4bd3cc1 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/detail.html @@ -0,0 +1,235 @@ +{% extends "oscar/layout.html" %} +{% load history_tags %} +{% load currency_filters %} +{% load reviews_tags %} +{% load product_tags %} +{% load display_tags %} +{% load i18n %} +{% load purchase_info_tags %} +{% block title %}{{ product.get_meta_title }} | {{ block.super }}{% endblock %} +{% block description %}{{ product.get_meta_description }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %}{% endblock header %} +{% block content %} +
    + +
    + {% block product_gallery %} +
    + {% include "oscar/catalogue/partials/gallery.html" %} +
    + {% endblock %} + {% block product_main %} +
    + {% comment %} + This is a bit clunky here. Better to have some kind of JS-driven dashboard menu that + pops out when clicked. A bit like the Django-Debug-Toolbar button + {% endcomment %} + {% if user.is_staff %} + + + + {% trans "Edit this product" %} + + + {% endif %} +

    {{ product.get_title }}

    + {% block product_stock_record %} + {% include "oscar/catalogue/partials/stock_record.html" with verbose=1 %}{% endblock %} + {% iffeature "reviews" %} + {% include "oscar/catalogue/reviews/partials/review_stars.html" %}{% endiffeature %} +
    + {% if not product.is_parent %} + {% block product_basket_form %} + {% include "oscar/catalogue/partials/add_to_basket_form.html" %}{% endblock %} + {% else %} + {% block variants %} +

    {% trans 'Variants:' %}

    + {% for child in product.children.public %} + {% purchase_info_for_product request child as child_session %} + {% if child_session.availability.is_available_to_buy %} + + {{ child.get_title }} + +
    + {% endif %} + {% endfor %} + {% endblock %} + {% endif %} +
    + + {% endblock %} +
    + + {% block product_description %} + {% if product.description %} +
    +

    {% trans "Product Description" %}

    +
    +

    + {{ product.description|safe }} +

    + {% endif %} + {% endblock %} + {% block product_info %} +
    +

    {% trans "Product Information" %}

    +
    + + {% if product.upc %} + + + + + {% endif %} + + + + + {% purchase_info_for_product request product as session %} + {% if session.price.exists %} + + + + + {% if session.price.is_tax_known %} + + + + + + + + + {% endif %} + + + + + {% endif %} + {% for av in product.get_attribute_values %} + + + + + {% endfor %} + {% iffeature "reviews" %} + + + + + {% endiffeature %} +
    {% trans "UPC" %}{{ product.upc }}
    {% trans "Product Type" %}{{ product.get_product_class.name }}
    {% trans "Price (excl. tax)" %}{{ session.price.excl_tax|currency:session.price.currency }}
    + {% trans "Price (incl. tax)" %} + + {{ session.price.incl_tax|currency:session.price.currency }} +
    + {% trans "Tax" %} + + {{ session.price.tax|currency:session.price.currency }} +
    + {% trans "Availability" %} + + {{ session.availability.message }} +
    + {{ av.attribute.name }} + + {{ av.value_as_html }} +
    + {% trans "Number of reviews" %} + + {{ product.num_approved_reviews }} +
    + {% endblock %} + {% iffeature "reviews" %} + {% block product_review %} +
    +
    + {% if product.num_approved_reviews > 3 %} + + {% trans "See all reviews" %} + + {% endif %} +

    + {% trans "Customer Reviews" %} +

    +
    + {% if product.num_approved_reviews == 0 %} +

    + {% if product|is_review_permitted:user %} + {% url 'catalogue:reviews-add' product_slug=product.slug product_pk=product.id as add_review_url %} + {% blocktrans %} + This product does not have any reviews yet - + + be the first to write one + + . + {% endblocktrans %} + {% else %} + {% trans "This product does not have any reviews yet" %}. + {% endif %} +

    + {% else %} +
      + {% for review in product.reviews.approved.all|slice:":3" %} +
    1. + {% include 'oscar/catalogue/partials/review.html' %} +
    2. + {% endfor %} +
    + {% endif %} +
    + {% endblock product_review %} + {% endiffeature %} + {% with recommended_products=product.sorted_recommended_products|slice:":6" %} + {% if recommended_products %} +
    +

    + {% trans "Recommended items" %} +

    +
    +
      + {% for product in recommended_products %} +
    • + {% render_product product %} +
    • + {% endfor %} +
    + {% endif %} + {% endwith %} + {% recently_viewed_products current_product=product %} +
    + + {% endblock content %} + {% block extrascripts %}{{ block.super }}{% endblock %} diff --git a/tests/django_oscar/oscar/catalogue/partials/add_to_basket_form.html b/tests/django_oscar/oscar/catalogue/partials/add_to_basket_form.html new file mode 100644 index 0000000..9674784 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/partials/add_to_basket_form.html @@ -0,0 +1,47 @@ +{% load basket_tags %} +{% load display_tags %} +{% load i18n %} +{% load purchase_info_tags %} +{% purchase_info_for_product request product as session %} +{% if session.availability.is_available_to_buy %} + {% basket_form request product as basket_form %} +
    + {% csrf_token %} + {% include "oscar/partials/form_fields.html" with form=basket_form %} + +
    + {% iffeature "wishlists" %} + {% include "oscar/catalogue/partials/add_to_wishlist.html" %}{% endiffeature %} + {% else %} + {% if has_active_alert %} +

    + {% trans "You have an active stock alert for this product." %} +

    + {% else %} +
    + {% csrf_token %} +

    + {% trans "You can get an email alert when this product is back in stock." %} +

    + {% include "oscar/partials/form_fields.html" with form=alert_form %} + +
    + {% endif %} + {% iffeature "wishlists" %} + {% include "oscar/catalogue/partials/add_to_wishlist.html" %}{% endiffeature %} + {% endif %} diff --git a/tests/django_oscar/oscar/catalogue/partials/add_to_basket_form_compact.html b/tests/django_oscar/oscar/catalogue/partials/add_to_basket_form_compact.html new file mode 100644 index 0000000..8538136 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/partials/add_to_basket_form_compact.html @@ -0,0 +1,18 @@ +{% load basket_tags %} +{% load i18n %} +{% load purchase_info_tags %} +{% purchase_info_for_product request product as session %} +{% if session.availability.is_available_to_buy %} + {% basket_form request product 'single' as basket_form %} +
    + {% csrf_token %} + {{ basket_form.as_p }} + +
    +{% else %} + + {% trans "Add to basket" %} + +{% endif %} diff --git a/tests/django_oscar/oscar/catalogue/partials/add_to_wishlist.html b/tests/django_oscar/oscar/catalogue/partials/add_to_wishlist.html new file mode 100644 index 0000000..e3b80f7 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/partials/add_to_wishlist.html @@ -0,0 +1,69 @@ +{% load i18n %} +{% load wishlist_tags %} +{% if user.is_authenticated %} + {% with wishlists=user.wishlists.all %} + {# Select wishlists that contains product #} + {% wishlists_containing_product wishlists product as product_wishlists %} + {% if wishlists %} +
    + + {% trans "Add to wish list" %} + + +
    + {% else %} + {# 1 or no existing wishlists - show a simple button #} +
    + {% csrf_token %} + +
    + {% endif %} + {% for wishlist in product_wishlists %} +
    + {% csrf_token %} + {% blocktrans with name=wishlist.name url=wishlist.get_absolute_url %} + + Product is in + '{{ name }}' + wishlist. + + {% endblocktrans %} + +
    + {% endfor %} +{% endwith %} +{% else %} + +
    +{% endif %} diff --git a/tests/django_oscar/oscar/catalogue/partials/gallery.html b/tests/django_oscar/oscar/catalogue/partials/gallery.html new file mode 100644 index 0000000..002d19c --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/partials/gallery.html @@ -0,0 +1,51 @@ +{% load i18n %} +{% load image_tags %} +{% with all_images=product.get_all_images %} +{# use length rather then count as the images get queried anyways #} +{% if all_images|length > 1 %} + +{% else %} +{# Only one image to show #} + +{% endif %} +{% endwith %} diff --git a/tests/django_oscar/oscar/catalogue/partials/product.html b/tests/django_oscar/oscar/catalogue/partials/product.html new file mode 100644 index 0000000..07ad908 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/partials/product.html @@ -0,0 +1,43 @@ +{% load display_tags %} +{% load i18n %} +{% load image_tags %} +{% load reviews_tags %} +{% block product %} +
    + {% block product_image %} +
    + {% with image=product.primary_image %} + {% oscar_thumbnail image.original "x155" upscale=False as thumb %} + + {{ product.get_title }} + + {% endwith %} +
    + {% endblock %} + {% block product_review %} + {% iffeature "reviews" %} +

    + + + + + +

    + {% endiffeature %} + {% endblock %} + {% block product_title %} +

    + + {{ product.get_title|truncatewords:4 }} + +

    + {% endblock %} + {% block product_price %} +
    + {% include "oscar/catalogue/partials/stock_record.html" %} + {% if not product.is_parent and not product.has_options %} + {% include "oscar/catalogue/partials/add_to_basket_form_compact.html" %}{% endif %} +
    + {% endblock %} +
    + {% endblock %} diff --git a/tests/django_oscar/oscar/catalogue/partials/review.html b/tests/django_oscar/oscar/catalogue/partials/review.html new file mode 100644 index 0000000..80f54b8 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/partials/review.html @@ -0,0 +1,77 @@ +{% load reviews_tags %} +{% load i18n %} +
    +
    +

    + + + + + + + + + {{ review.title }} + +

    +
    +

    + {{ review.body|striptags }} +

    +

    + + {% if review.user == user %} + {% blocktrans with review_date=review.date_created %} + Reviewed by you on {{ review_date }} + {% endblocktrans %} + {% else %} + {% blocktrans with name=review.reviewer_name review_date=review.date_created %} + Reviewed by + {{ name }} + on {{ review_date }} + {% endblocktrans %} + {% endif %} + | + + {% trans 'Permalink' %} + + +

    + {% if review|may_vote:user %} + + {% trans "Is this review helpful?" %} + +
    + {% csrf_token %} + + +
    +
    + {% csrf_token %} + + +
    + {% endif %} +

    + + {% if review.has_votes %} + {% blocktrans with num_up_votes=review.num_up_votes count num_votes=review.total_votes %} + {{ num_up_votes }} + of {{ num_votes }} customer found this useful + {% plural %} + {{ num_up_votes }} + of {{ num_votes }} customers found this useful + {% endblocktrans %} + {% else %} + {% trans "This review has no votes." %} + {% endif %} + +

    +
    diff --git a/tests/django_oscar/oscar/catalogue/partials/stock_record.html b/tests/django_oscar/oscar/catalogue/partials/stock_record.html new file mode 100644 index 0000000..39e52b5 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/partials/stock_record.html @@ -0,0 +1,35 @@ +{% load currency_filters %} +{% load i18n %} +{% load purchase_info_tags %} +{% purchase_info_for_product request product as session %} +{% if session.price.exists %} + {% if session.price.excl_tax == 0 %} +

    + {% trans "Free" %} +

    + {% elif session.price.is_tax_known %} +

    + {{ session.price.incl_tax|currency:session.price.currency }} +

    + {% else %} +

    + {{ session.price.excl_tax|currency:session.price.currency }} +

    + {% endif %} +{% else %} +

    +   +

    +{% endif %} +

    + {% if session.availability.is_available_to_buy %} + + {% else %} + + {% endif %} + {% if verbose %} + {{ session.availability.message }} + {% else %} + {{ session.availability.short_message }} + {% endif %} +

    diff --git a/tests/django_oscar/oscar/catalogue/reviews/partials/review_stars.html b/tests/django_oscar/oscar/catalogue/reviews/partials/review_stars.html new file mode 100644 index 0000000..5139f85 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/reviews/partials/review_stars.html @@ -0,0 +1,30 @@ +{% load reviews_tags %} +{% load i18n %} +{% if product.rating != None %} +

    + + + + + + + + {% blocktrans count product.num_approved_reviews as num_reviews %} + {{ num_reviews }} customer review + {% plural %} + {{ num_reviews }} customer reviews + {% endblocktrans %} + + +   + {% else %} +

    + {% endif %} + {% if product|is_review_permitted:user %} + + {% trans "Write a review" %} + + {% endif %} +

    diff --git a/tests/django_oscar/oscar/catalogue/reviews/review_detail.html b/tests/django_oscar/oscar/catalogue/reviews/review_detail.html new file mode 100644 index 0000000..0c6b06c --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/reviews/review_detail.html @@ -0,0 +1,45 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% block title %} + {{ review.title }} | {% trans "Reviews" %} | {{ product.title }} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} +{% trans "Customer reviews" %} +{% endblock %} +{% block content %} +
    + {% include 'oscar/catalogue/reviews/review_product.html' %} + {% include 'oscar/catalogue/partials/review.html' %} +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/catalogue/reviews/review_form.html b/tests/django_oscar/oscar/catalogue/reviews/review_form.html new file mode 100644 index 0000000..cc42883 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/reviews/review_form.html @@ -0,0 +1,50 @@ +{% extends "oscar/catalogue/detail.html" %} +{% load i18n %} +{% block product_review %} +
    +
    +
    + + {% trans "Leave a product review" %} + + {% csrf_token %} + {% include 'oscar/partials/form_field.html' with field=form.title %} +
    + +
    + {{ form.score }} +
    + + + + + +
    + {% for error in form.score.errors %} + + + {{ error }} + + {% endfor %} +
    + {% comment %} + {% include 'oscar/partials/form_field.html' with field=form.score %}{% endcomment %} +
    + {% include 'oscar/partials/form_field.html' with field=form.body %} + {% if form.name %} + {% include 'oscar/partials/form_field.html' with field=form.name %}{% endif %} + {% if form.email %} + {% include 'oscar/partials/form_field.html' with field=form.email %}{% endif %} + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/catalogue/reviews/review_list.html b/tests/django_oscar/oscar/catalogue/reviews/review_list.html new file mode 100644 index 0000000..c71ce96 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/reviews/review_list.html @@ -0,0 +1,56 @@ +{% extends "oscar/layout.html" %} +{% load history_tags %} +{% load i18n %} +{% block title %} + {% trans "All reviews" %} | {{ product.title }} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} +{% trans "Customer reviews" %} +{% endblock %} +{% block content %} +
    + {% include 'oscar/catalogue/reviews/review_product.html' %} + {% if reviews %} +
    + {% include "oscar/partials/form_fields_inline.html" with form=form %} + +
    +
    + {% for review in reviews %} + {% include 'oscar/catalogue/partials/review.html' %}{% endfor %} + {% include 'oscar/partials/pagination.html' %} + {% else %} +

    + {% trans "This product does not have any reviews yet." %} +

    + {% endif %} +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/catalogue/reviews/review_product.html b/tests/django_oscar/oscar/catalogue/reviews/review_product.html new file mode 100644 index 0000000..cfad5d0 --- /dev/null +++ b/tests/django_oscar/oscar/catalogue/reviews/review_product.html @@ -0,0 +1,23 @@ +{% load image_tags %} +
    +
    +
    + {% with image=product.primary_image %} + {% oscar_thumbnail image.original "x155" upscale=False as thumb %} + + {{ product.get_title }} + + {% endwith %} +
    +
    +
    +

    + + {{ product.get_title }} + +

    + {% include "oscar/catalogue/partials/stock_record.html" %} + {% include "oscar/catalogue/reviews/partials/review_stars.html" %} +
    +
    +
    diff --git a/tests/django_oscar/oscar/checkout/checkout.html b/tests/django_oscar/oscar/checkout/checkout.html new file mode 100644 index 0000000..4f1ba60 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/checkout.html @@ -0,0 +1,173 @@ +{% extends "oscar/checkout/layout.html" %} +{% load currency_filters %} +{% load i18n %} +{% load image_tags %} +{% load purchase_info_tags %} +{% block title %} + {% trans "Checkout" %} | {{ block.super }} +{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' %}{% endblock %} + {% block content %} + {% if error %} +
    + {{ error }} +
    + {% endif %} +
    + {% block shipping_address %} +
    +
    +

    {% trans "Shipping" %}

    +
    + {% if shipping_address %} +
    +

    + {% trans "Address" %} + {% block shipping_address_actions %} + + {% trans "Change" %} + + {% endblock %} +

    +
    + {% for field in shipping_address.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    + {% if shipping_address.phone_number %} +

    {% trans "Contact" %}

    +

    + {% trans "Phone" %}: {{ shipping_address.phone_number }} + {% if guest_email %} +
    + {% trans "Email" %}: {{ guest_email }} + {% endif %} +

    + {% endif %} + {% if shipping_address.notes %} +

    {% trans "Instructions" %}

    +

    + {{ shipping_address.notes|linebreaks }} +

    + {% endif %} +
    + {% endif %} + {% if shipping_method %} +
    +

    + {% trans "Shipping method" %} + {% block shipping_method_actions %} + + {% trans "Change" %} + + {% endblock %} +

    +

    + {{ shipping_method.name }} + {% if shipping_method.description %}- {{ shipping_method.description|safe }}{% endif %} +

    +
    + {% endif %} +
    + {% endblock shipping_address %} + {# You will almost certainly want to override this block to provide a payment summary #} + {% block payment_method %} +
    +
    +

    {% trans "Payment" %}

    +
    +
    +

    + {% trans "Payment" %} + + {% trans "Change" %} + +

    +

    + {% trans "Payment details to go here" %} +

    +
    +
    + {% endblock payment_method %} +
    + {% block order_contents %} +
    + {% block order_contents_actions %} + + {% trans "Edit order contents" %} + + {% endblock %} +

    {% trans "Order contents" %}

    +
    +
    +
    +

    + {% trans "Item" %} +

    +

    + {% trans "Quantity" %} +

    +

    + {% trans "Total" %} +

    +
    +
    + {% for line in basket.all_lines %} + {% purchase_info_for_line request line as session %} +
    +
    +
    +
    + {% with image=line.product.primary_image %} + {% oscar_thumbnail image.original "100x100" upscale=False as thumb %} + + {{ product.get_title }} + + {% endwith %} +
    +
    +
    +

    + + {{ line.description }} + +

    + + {{ session.availability.message }} + +
    +
    + {{ line.quantity }} +
    +
    +

    + {% if not show_tax_separately and line.is_tax_known %} + {{ line.line_price_incl_tax|currency:basket.currency }} + {% else %} + {{ line.line_price_excl_tax|currency:basket.currency }} + {% endif %} +

    +
    +
    +
    + {% endfor %} +
    +
    +   +
    +
    +
    +

    {% trans 'Totals' %}

    +
    + {% include 'oscar/basket/partials/basket_totals.html' %} +
    +
    + {% endblock order_contents %} + {% block shipping_method %}{% endblock shipping_method %} + {% block payment_details %}{% endblock payment_details %} + {% block place_order %}{% endblock place_order %} + {% endblock content %} diff --git a/tests/django_oscar/oscar/checkout/gateway.html b/tests/django_oscar/oscar/checkout/gateway.html new file mode 100644 index 0000000..240ba24 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/gateway.html @@ -0,0 +1,64 @@ +{% extends "oscar/checkout/layout.html" %} +{% load i18n %} +{% load widget_tweaks %} +{% block title %} + {% trans "Checkout gateway" %} | {{ block.super }} +{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=0 %}{% endblock %} + {% block checkout_title %} + {% trans "Who are you?" %} + {% endblock %} + {% block content %} +
    + {% csrf_token %} + {{ form.non_field_errors }} + {% include "oscar/partials/form_field.html" with field=form.username %} +
    +
    +
    + {{ form.options.0 }} +
    +
    +
    +
    + {{ form.options.errors }} +
    +
    + {{ form.options.2 }} +
    + {% render_field form.password class+="form-control mr-sm-2" %} + + + {% trans "Get a password reminder" %} + + + {% for error in form.password.errors %}{{ error }}{% endfor %} +
    +
    +
    +
    +
    +
    +
    + {{ form.options.1 }} +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +{% endblock content %} +{% block onbodyload %} + {{ block.super }} + oscar.checkout.gateway.init(); +{% endblock %} diff --git a/tests/django_oscar/oscar/checkout/layout.html b/tests/django_oscar/oscar/checkout/layout.html new file mode 100644 index 0000000..76ed5ec --- /dev/null +++ b/tests/django_oscar/oscar/checkout/layout.html @@ -0,0 +1,45 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% load category_tags %} +{% block layout %} +
    +
    +
    + {% include "oscar/partials/brand.html" %} +
    + +
    + {% block checkout_nav %}{% endblock %} +
    + +
    +
    + {% include 'oscar/partials/alert_messages.html' %} +
    +

    {% block checkout_title %}{% endblock %}

    +
    + + {% block modal %} + {% load flatpages %} + {% get_flatpages '/order/' as flatpages %} + {% for page in flatpages %} + + {% endfor %} + {% endblock %} + {% block content %}{% endblock %} +
    + +
    + {% include "oscar/partials/footer_checkout.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/checkout/nav.html b/tests/django_oscar/oscar/checkout/nav.html new file mode 100644 index 0000000..8a41194 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/nav.html @@ -0,0 +1,65 @@ +{% load i18n %} + + diff --git a/tests/django_oscar/oscar/checkout/payment_details.html b/tests/django_oscar/oscar/checkout/payment_details.html new file mode 100644 index 0000000..dd925cf --- /dev/null +++ b/tests/django_oscar/oscar/checkout/payment_details.html @@ -0,0 +1,46 @@ +{% extends "oscar/checkout/checkout.html" %} +{% load i18n %} +{% block title %} + {% trans "Payment details" %} | {{ block.super }} +{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=3 %}{% endblock %} + {% block checkout_title %} + {% trans "Enter payment details" %} + {% endblock %} + {% block order_contents %}{% endblock %} + {% block shipping_address %}{% endblock %} + {% block shipping_method %}{% endblock %} + {% block payment_method %}{% endblock %} + {% block payment_details %} + {% block payment_details_content %} +

    + {% trans "This page needs implementing within your project. You may want to use one of Oscar's payment gateway libraries:" %} +

    + + + {% trans "Continue" %} + + {% endblock payment_details_content %} + {% endblock payment_details %} diff --git a/tests/django_oscar/oscar/checkout/preview.html b/tests/django_oscar/oscar/checkout/preview.html new file mode 100644 index 0000000..8768bf3 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/preview.html @@ -0,0 +1,37 @@ +{% extends "oscar/checkout/checkout.html" %} +{% load i18n %} +{% block title %} + {% trans "Order preview" %} | {{ block.super }} +{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=4 %}{% endblock %} + {% block checkout_title %} + {% trans "Preview order" %} + {% endblock %} + {% block place_order %} +
    + {% csrf_token %} + + {% comment %} + When submitting sensitive data on the payment details page (eg a bankcard) + we don't want to save the data and so we pass the bound form to the preview + template and render it in a hidden div. Then the payment information will + get re-submitted when the user confirms the order. + {% endcomment %} +
    + {% block hiddenforms %}{% endblock %} +
    +
    +
    +
    + +
    +
    +
    +
    +{% endblock place_order %} diff --git a/tests/django_oscar/oscar/checkout/shipping_address.html b/tests/django_oscar/oscar/checkout/shipping_address.html new file mode 100644 index 0000000..d08d749 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/shipping_address.html @@ -0,0 +1,107 @@ +{% extends "oscar/checkout/checkout.html" %} +{% load i18n %} +{% block title %} + {% trans "Shipping address" %} | {{ block.super }} +{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=1 %}{% endblock %} + {% block checkout_title %} + {% trans "Shipping address" %} + {% endblock %} + {% block order_contents %}{% endblock %} + {% block shipping_address %} +
    +
    +

    {% trans "Where should we ship to?" %}

    +
    + {% if user.is_authenticated %} + {% if addresses %} +

    {% trans "An address from your address book?" %}

    +
    +
    + {% for address in addresses %} + {% block select_address_form %} +
    +
    +
    + {% block select_address_fields %} + {% for field in address.active_address_fields %} + {{ field }} + {% if not forloop.first %}
    {% endif %} + {% endfor %} + {% endblock %} +
    +
    + {% csrf_token %} + + + {% if address.is_default_for_shipping %} + + {% else %} + + {% endif %} + +
    +
    +
    + {% if forloop.counter|divisibleby:2 %} +
    +
    + {% endif %} + {% endblock %} + {% endfor %} +
    +
    +

    {% trans "Or a new address?" %}

    + {% endif %} + {% endif %} + {% block new_address_form %} +
    +
    + {% csrf_token %} + {% include "oscar/partials/form_fields.html" with form=form style='horizontal' %} +
    +
    + + {% trans "or" %} + + {% trans "return to basket" %} + +
    +
    +
    +
    + {% endblock %} +
    + {% endblock shipping_address %} + {% block shipping_method %}{% endblock %} + {% block payment_method %}{% endblock %} diff --git a/tests/django_oscar/oscar/checkout/shipping_methods.html b/tests/django_oscar/oscar/checkout/shipping_methods.html new file mode 100644 index 0000000..4c424c4 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/shipping_methods.html @@ -0,0 +1,69 @@ +{% extends "oscar/checkout/checkout.html" %} +{% load currency_filters %} +{% load i18n %} +{% load shipping_tags %} +{% block title %} + {% trans "Shipping method" %} | {{ block.super }} +{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=2 %}{% endblock %} + {% block checkout_title %} + {% trans "Shipping method" %} + {% endblock %} + {% block order_contents %}{% endblock %} + {% block shipping_address %}{% endblock %} + {% block payment_method %}{% endblock %} + {% block shipping_method %} +
    +
    +

    {% trans "Method" %}

    +

    {% trans "Cost" %}

    +
    +
    + {% for method in methods %} +
    +
    +
    +

    {{ method.name }}

    + {% if method.description %} +

    + {{ method.description|safe }} +

    + {% endif %} + {% if method.is_discounted %} + + {% shipping_charge_discount method basket as discount %} + {% blocktrans with amount=discount|currency:basket.currency name=method.discount_name %} + This includes a discount of + {{ amount }} + as + your basket qualifies for the + {{ name }} + offer. + {% endblocktrans %} + + {% endif %} +
    +
    + {% shipping_charge method basket as charge %} + {% if charge.is_tax_known %} + {{ charge.incl_tax|currency:basket.currency }} + {% else %} + {{ charge.excl_tax|currency:basket.currency }} + {% endif %} +
    +
    +
    + {% csrf_token %} + + +
    +
    +
    +
    + {% endfor %} + {% endblock shipping_method %} diff --git a/tests/django_oscar/oscar/checkout/thank_you.html b/tests/django_oscar/oscar/checkout/thank_you.html new file mode 100644 index 0000000..914f31a --- /dev/null +++ b/tests/django_oscar/oscar/checkout/thank_you.html @@ -0,0 +1,225 @@ +{% extends "oscar/checkout/layout.html" %} +{% load currency_filters %} +{% load i18n %} +{% load image_tags %} +{% block title %} + {% blocktrans with number=order.number %} + Order {{ number }}: confirmation + {% endblocktrans %} + | {{ block.super }} +{% endblock title %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=5 %}{% endblock %} + {% block checkout_title %} + {% blocktrans with number=order.number %} + Order {{ number }}: confirmation + {% endblocktrans %} + {% endblock %} + {% block content %} +

    + {% blocktrans with number=order.number %} + Your order has been placed and a confirmation email has been sent - your order number is + {{ number }} + . + {% endblocktrans %} + {% trans "Please make a note of this reference or print this page and quote it in any communication with us regarding your order." %} +

    +
    +
    + {% block shipping_info %} +
    +

    {% trans "Shipping" %}

    +
    +
    +

    {% trans "Address" %}

    + {% if order.shipping_address %} +
    + {% for field in order.shipping_address.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    + {% if order.shipping_address.phone_number %} +

    {% trans "Contact" %}

    +

    + {% trans "Phone" %}: {{ order.shipping_address.phone_number }} + {% if order.guest_email %} +
    + {% trans "Email" %}: {{ order.guest_email }} + {% endif %} +

    + {% endif %} + {% if order.shipping_address.notes %} +

    {% trans "Instructions" %}

    +

    + {{ order.shipping_address.notes|linebreaks }} +

    + {% endif %} + {% else %} +

    + {% trans "No shipping address required." %} +

    + {% endif %} +
    +
    +

    {% trans "Shipping method" %}

    +

    + {{ order.shipping_method }} +

    +
    + {% endblock %} +
    +
    + {% block payment_info %} +
    +

    {% trans "Payment" %}

    +
    +
    +

    {% trans "Payment" %}

    + {% for source in order.sources.all %} +

    + {% if source.reference %} + {% blocktrans with amount=source.amount_allocated|currency:source.currency type=source.source_type.name reference=source.reference %} + Allocation of {{ amount }} from type {{ type }} (reference: {{ reference }}) + {% endblocktrans %} + {% else %} + {% blocktrans with amount=source.amount_allocated|currency:source.currency type=source.source_type.name %} + Allocation of {{ amount }} from type {{ type }} + {% endblocktrans %} + {% endif %} +

    + {% empty %} +

    + {% trans "No payment was required for this order." %} +

    + {% endfor %} + {% if order.billing_address %} +

    {% trans "Billing address" %}

    +
    + {% for field in order.billing_address.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    + {% endif %} +
    + {% endblock %} +
    +
    + {% block order_contents %} +
    +

    {% trans "Order contents" %}

    +
    +
    +
    +

    + {% trans "Items purchased" %} +

    +

    + {% trans "Quantity" %} +

    +

    + {% trans "Total" %} +

    +
    +
    + {% for line in order.lines.all %} +
    +
    +
    +
    + {% with image=line.product.primary_image %} + {% oscar_thumbnail image.original "200x200" upscale=False as thumb %} + + {{ product.get_title }} + + {% endwith %} +
    +
    +
    +

    + + {{ line.description }} + +

    + {% if line.upc %} +

    + {{ line.upc }} +

    + {% endif %} +
    +
    + {{ line.quantity }} +
    +
    +

    + {% if show_tax_separately %} + {{ line.line_price_before_discounts_excl_tax|currency:order.currency }} + {% else %} + {{ line.line_price_before_discounts_incl_tax|currency:order.currency }} + {% endif %} +

    +
    +
    +
    + {% endfor %} + {% block basket_totals %} +
    +
    +   +
    +
    +
    +

    + {% trans 'Totals' %} +

    +
    + {% include 'oscar/order/partials/basket_totals.html' %} +
    +
    + {% endblock basket_totals %} + {% endblock order_contents %} + {% block order_tracking %} + {% if not order.user %} +
    +

    + {% trans "Tracking your order" %} +

    +
    +

    + {% trans "You can track the status of your order" %} + + {% trans "View order status" %} + + . +

    + {% endif %} + {% endblock %} + {% block order_actions %} + + {% endblock order_actions %} + {% endblock content %} + {% block tracking %} + {% if send_analytics_event %} + {% include "oscar/partials/google_analytics_transaction.html" %}{% endif %} + {% endblock %} diff --git a/tests/django_oscar/oscar/checkout/user_address_delete.html b/tests/django_oscar/oscar/checkout/user_address_delete.html new file mode 100644 index 0000000..93a7ff1 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/user_address_delete.html @@ -0,0 +1,38 @@ +{% extends "oscar/checkout/checkout.html" %} +{% load i18n %} +{% block title %} + {% trans "Delete address?" %} | {{ block.super }} +{% endblock title %} +{% block order_contents %}{% endblock %} +{% block shipping_method %}{% endblock %} +{% block payment_method %}{% endblock %} +{% block payment_details %}{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=1 %}{% endblock %} + {% block checkout_title %} + {% trans "Delete address?" %} + {% endblock %} + {% block shipping_address %} +
    + {% csrf_token %} +
    +
    + {% for field in object.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    +
    +

    + {% trans "Are you sure you want to delete this address?" %} + + {% trans "or" %} + + {% trans "cancel" %} + + . +

    +
    + {% endblock shipping_address %} diff --git a/tests/django_oscar/oscar/checkout/user_address_form.html b/tests/django_oscar/oscar/checkout/user_address_form.html new file mode 100644 index 0000000..6ce5da7 --- /dev/null +++ b/tests/django_oscar/oscar/checkout/user_address_form.html @@ -0,0 +1,36 @@ +{% extends "oscar/checkout/checkout.html" %} +{% load i18n %} +{% block title %} + {% trans "Edit address" %} | {{ block.super }} +{% endblock title %} +{% block order_contents %}{% endblock %} +{% block shipping_method %}{% endblock %} +{% block payment_method %}{% endblock %} +{% block payment_details %}{% endblock %} +{% block checkout_nav %} + {% include 'oscar/checkout/nav.html' with step=1 %}{% endblock %} + {% block checkout_title %} + {% trans "Edit address" %} + {% endblock %} + {% block shipping_address %} +
    +
    + {% csrf_token %} + {% include "oscar/partials/form_fields.html" with form=form style='horizontal' %} +
    +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +
    +
    + {% endblock shipping_address %} diff --git a/tests/django_oscar/oscar/communication/email/email_detail.html b/tests/django_oscar/oscar/communication/email/email_detail.html new file mode 100644 index 0000000..72c4bd9 --- /dev/null +++ b/tests/django_oscar/oscar/communication/email/email_detail.html @@ -0,0 +1,41 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block extra_breadcrumbs %} + +{% endblock %} +{% block tabcontent %} + + + + + + + + + + + + + +
    {% trans 'Date sent' %}{{ email.date_sent }}
    {% trans 'Subject' %}{{ email.subject }}
    {% trans 'Body' %} + +
    +{% endblock tabcontent %} +{% block onbodyload %} + {{ block.super }} + $(function() { + // Sets the HTML email preview so it's css doesn't touch the page. + var el_preview_html = document.getElementById('preview_box'); + var html = $(el_preview_html).text(); + var doc = el_preview_html.contentWindow.document; + doc.open(); + doc.write(html); + doc.close(); + }); +{% endblock %} diff --git a/tests/django_oscar/oscar/communication/email/email_list.html b/tests/django_oscar/oscar/communication/email/email_list.html new file mode 100644 index 0000000..ac79b9b --- /dev/null +++ b/tests/django_oscar/oscar/communication/email/email_list.html @@ -0,0 +1,31 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + {% if emails %} + + + + + + + + + {% for email in emails %} + + + + + {% endfor %} + +
    {% trans 'Subject' %}{% trans 'Date sent' %}
    + + {{ email.subject }} + + {{ email.date_sent }}
    + {% include "oscar/partials/pagination.html" %} + {% else %} +

    + {% trans 'No emails found' %} +

    + {% endif %} +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/communication/emails/base.html b/tests/django_oscar/oscar/communication/emails/base.html new file mode 100644 index 0000000..921599b --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/base.html @@ -0,0 +1,302 @@ +{% load i18n %} + + + + + + + + + + + + + + +
    +
    + + + + +
    + + {% block header %}{% endblock %} + {% block tbody %} + + + + {% endblock %} + {% block footer %} + + + + {% endblock %} +
    {% block body %}{% endblock %}
    +

    + {% trans "Thanks for using our site!" %} +

    +

    + {% blocktrans with name=site.name %} + The {{ name }} team + {% endblocktrans %} +

    +
    +
    +
    +
    + + diff --git a/tests/django_oscar/oscar/communication/emails/base.txt b/tests/django_oscar/oscar/communication/emails/base.txt new file mode 100644 index 0000000..95f76a2 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/base.txt @@ -0,0 +1,4 @@ +{% load i18n %}{% block header %}{% endblock %}{% block body %}{% endblock %}{% block footer %} + +{% trans "Thanks for using our site!" %} +{% blocktrans with name=site.name %}The {{ name }} team{% endblocktrans %}{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_email_changed_body.html b/tests/django_oscar/oscar/communication/emails/commtype_email_changed_body.html new file mode 100644 index 0000000..127caa3 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_email_changed_body.html @@ -0,0 +1,31 @@ +{% extends "oscar/communication/emails/base.html" %} +{% load i18n %} +{% load url_tags %} +{% block tbody %} + + + {% blocktrans with email=new_email %} + You're receiving this email because your email address has been changed to + {{ email }} + . + {% endblocktrans %} + + + + + {% trans "If it wasn't you who changed it, please reset your password immediately and correct your email address:" %} + + + + + + Reset password + + + + + + {% trans "If it was you who changed the email address, you can ignore this email." %} + + +{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_email_changed_body.txt b/tests/django_oscar/oscar/communication/emails/commtype_email_changed_body.txt new file mode 100644 index 0000000..ab3f91c --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_email_changed_body.txt @@ -0,0 +1,11 @@ +{% extends "oscar/communication/emails/base.txt" %} +{% load i18n %} +{% load url_tags %} + +{% block body %}{% autoescape off %}{% blocktrans with email=new_email %}You're receiving this email because your email address has been changed to {{ email }}.{% endblocktrans %} + +{% trans "If it wasn't you who changed it, please reset your password immediately and correct your email address:" %} +{% absolute_url site.domain reset_url %} + +{% trans "If it was you who changed the email address, you can ignore this email." %} +{% endautoescape %}{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_email_changed_subject.txt b/tests/django_oscar/oscar/communication/emails/commtype_email_changed_subject.txt new file mode 100644 index 0000000..e52dfed --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_email_changed_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans with site_name=site.name %}Your email address has changed at {{ site_name }}.{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_order_placed_body.html b/tests/django_oscar/oscar/communication/emails/commtype_order_placed_body.html new file mode 100644 index 0000000..7f969cc --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_order_placed_body.html @@ -0,0 +1,85 @@ +{% extends "oscar/communication/emails/base.html" %} +{% load currency_filters i18n %} +{% block tbody %} + + +

    + {% trans 'Hello,' %} +

    +

    + {% blocktrans with order_number=order.number %} + We are pleased to confirm your order {{ order_number }} has been received and + will be processed shortly. + {% endblocktrans %} +

    + + + + + + + + + + + + + +
    {% trans 'Your order contains:' %}
    + + + {% for line in order.lines.all %} + + + + + {% endfor %} + + + + + + + + + + + + + +
    {{ line.title }} × {{ line.quantity }} + {{ line.line_price_incl_tax|currency:order.currency }} +
    {% trans 'Basket total:' %} + {{ order.basket_total_incl_tax|currency:order.currency }} +
    {% trans 'Shipping:' %} + {{ order.shipping_incl_tax|currency:order.currency }} +
    {% trans 'Order Total:' %}{{ order.total_incl_tax|currency:order.currency }}
    +
    + + + + +

    + {% trans 'Shipping address:' %} +

    +

    + {% for field in order.shipping_address.active_address_fields %} + {{ field }} +
    + {% endfor %} +

    + + + {% if status_url %} + + + {% blocktrans %} + You can view the status of this order by clicking + + here + + {% endblocktrans %} + + + {% endif %} +{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_order_placed_body.txt b/tests/django_oscar/oscar/communication/emails/commtype_order_placed_body.txt new file mode 100644 index 0000000..2dd27ef --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_order_placed_body.txt @@ -0,0 +1,24 @@ +{% load currency_filters i18n %}{% blocktrans with order_number=order.number %}Hello, + +We are pleased to confirm your order {{ order_number }} has been received and +will be processed shortly.{% endblocktrans %} + +{% trans 'Your order contains:' %} + +{% for line in order.lines.all %} * {{ line.title }} - {% trans 'quantity:' %} {{ line.quantity }} - {% trans 'price:' %} {{ line.line_price_incl_tax|currency:order.currency }} +{% endfor %} +{% trans 'Basket total:' %} {{ order.basket_total_incl_tax|currency:order.currency }} +{% trans 'Shipping:' %} {{ order.shipping_incl_tax|currency:order.currency }} +{% trans 'Order Total:' %} {{ order.total_incl_tax|currency:order.currency }} + +{% trans 'Shipping address:' %} + +{% for field in order.shipping_address.active_address_fields %} {{ field }} +{% endfor %} + +{% if status_url %} +{% blocktrans %}You can view the status of this order at the below URL: +{{ status_url }}{% endblocktrans %} +{% endif %} + +{% blocktrans %}The team{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_order_placed_subject.txt b/tests/django_oscar/oscar/communication/emails/commtype_order_placed_subject.txt new file mode 100644 index 0000000..de79025 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_order_placed_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans with number=order.number %}Confirmation of order {{ number }}{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_password_changed_body.html b/tests/django_oscar/oscar/communication/emails/commtype_password_changed_body.html new file mode 100644 index 0000000..1dc6a09 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_password_changed_body.html @@ -0,0 +1,29 @@ +{% extends "oscar/communication/emails/base.html" %} +{% load i18n %} +{% load url_tags %} +{% block tbody %} + + + {% blocktrans with name=site.name %} + You're receiving this e-mail because your password has been changed at {{ name }}. + {% endblocktrans %} + + + + + {% trans "If it wasn't you who changed it, please reset your password immediately:" %} + + + + + + {% trans "Reset password" %} + + + + + + {% trans "Otherwise, you can ignore this email." %} + + +{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_password_changed_body.txt b/tests/django_oscar/oscar/communication/emails/commtype_password_changed_body.txt new file mode 100644 index 0000000..732292b --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_password_changed_body.txt @@ -0,0 +1,14 @@ +{% extends "oscar/communication/emails/base.txt" %} +{% load i18n %} +{% load url_tags %} + +{% block body %}{% autoescape off %}{% blocktrans with name=site.name %} +You're receiving this email because your password has been changed at {{ name }}. +{% endblocktrans %} + +{% trans "If it wasn't you who changed it, please reset your password immediately:" %} +{% absolute_url site.domain reset_url %} + +{% trans "Otherwise, you can ignore this email." %} + +{% endautoescape %}{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_password_changed_subject.txt b/tests/django_oscar/oscar/communication/emails/commtype_password_changed_subject.txt new file mode 100644 index 0000000..429a9bd --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_password_changed_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans with site_name=site.name %}Your password changed at {{ site_name }}.{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_password_reset_body.html b/tests/django_oscar/oscar/communication/emails/commtype_password_reset_body.html new file mode 100644 index 0000000..cb95b85 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_password_reset_body.html @@ -0,0 +1,24 @@ +{% extends "oscar/communication/emails/base.html" %} +{% load i18n %} +{% load url_tags %} +{% block tbody %} + + + {% blocktrans with name=site.name %} + You're receiving this e-mail because you requested a password reset for your user account at {{ name }}. + {% endblocktrans %} + + + + + {% trans "Please go to the following page and choose a new password:" %} + + + + + + {% trans "Reset password" %} + + + +{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_password_reset_body.txt b/tests/django_oscar/oscar/communication/emails/commtype_password_reset_body.txt new file mode 100644 index 0000000..aa2e8b6 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_password_reset_body.txt @@ -0,0 +1,9 @@ +{% extends "oscar/communication/emails/base.txt" %} +{% load i18n %} +{% load url_tags %} + +{% block body %}{% autoescape off %} +{% blocktrans with name=site.name %}You're receiving this e-mail because you requested a password reset for your user account at {{ name }}.{% endblocktrans %} + +{% trans "Please go to the following page and choose a new password:" %} +{% absolute_url site.domain reset_url %}{% endautoescape %}{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_password_reset_subject.txt b/tests/django_oscar/oscar/communication/emails/commtype_password_reset_subject.txt new file mode 100644 index 0000000..335dff0 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_password_reset_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans with site_name=site.name %}Resetting your password at {{ site_name }}.{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_product_alert_body.html b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_body.html new file mode 100644 index 0000000..e5a0142 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_body.html @@ -0,0 +1,34 @@ +{% extends "oscar/communication/emails/base.html" %} +{% load i18n %} +{% load url_tags %} +{% block body %} +

    + {% if alert.user and alert.user.get_short_name %} + {% blocktrans with name=alert.user.get_short_name %} + Dear {{ name }}, + {% endblocktrans %} + {% else %} + {% trans "Hello," %} + {% endif %} +

    +

    + {% absolute_url site.domain alert.product.get_absolute_url as url %} + {% blocktrans with title=alert.product.get_title|safe url=url %} + We are happy to inform you that our product '{{ title }}' is back in stock: + {{ url }} + {% endblocktrans %} +

    + {% if hurry %} +

    + {% blocktrans %} + Beware that the amount of items in stock is limited. Be quick or someone might get there first. + {% endblocktrans %} +

    + {% endif %} +

    + {% blocktrans %} + With this email we have disabled your alert automatically and you will not + receive any further email regarding this product. + {% endblocktrans %} +

    +{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_product_alert_body.txt b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_body.txt new file mode 100644 index 0000000..fab5a60 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_body.txt @@ -0,0 +1,14 @@ +{% load i18n %}{% load url_tags %}{% if alert.user and alert.user.get_short_name %}{% blocktrans with name=alert.user.get_short_name %}Dear {{ name }},{% endblocktrans %}{% else %}{% trans "Hello," %}{% endif %} +{% absolute_url site.domain alert.product.get_absolute_url as url %} +{% blocktrans with title=alert.product.get_title|safe url=url %} +We are happy to inform you that our product '{{ title }}' is back in stock: +{{ url }} +{% endblocktrans %}{% if hurry %}{% blocktrans %} +Beware that the amount of items in stock is limited. Be quick or someone might get there first. +{% endblocktrans %}{% endif %}{% blocktrans with site_name=site.name %} +With this email we have disabled your alert automatically and you will not +receive any further email regarding this product. + +Thanks for your interest, +The {{ site_name }} Team +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_body.html b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_body.html new file mode 100644 index 0000000..099f8d4 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_body.html @@ -0,0 +1,21 @@ +{% extends "oscar/communication/emails/base.html" %} +{% load i18n %} +{% load url_tags %} +{% block body %} + {% absolute_url site.domain alert.get_confirm_url as confirm_url %} + {% absolute_url site.domain alert.get_cancel_url as cancel_url %} + {% blocktrans with title=alert.product.get_title|safe confirm_url=confirm_url cancel_url=cancel_url %} + Hello, +

    + Somebody (hopefully you) has requested an email alert when '{{ title }}' is back in stock. + Please click the following link to confirm: {{ confirm_url }} +

    +

    + You can cancel this alert at any time by clicking the following link: {{ cancel_url }} +

    +

    + Thanks for your interest, + The {{ site }} Team +

    + {% endblocktrans %} +{% endblock %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_body.txt b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_body.txt new file mode 100644 index 0000000..dba6e27 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_body.txt @@ -0,0 +1,17 @@ +{% load i18n %} +{% load url_tags %} +{% absolute_url site.domain alert.get_confirm_url as confirm_url %} +{% absolute_url site.domain alert.get_cancel_url as cancel_url %} +{% blocktrans with title=alert.product.get_title|safe confirm_url=confirm_url cancel_url=cancel_url %} +Hello, + +Somebody (hopefully you) has requested an email alert when +'{{ title }}' is back in stock. Please click the following link +to confirm: {{ confirm_url }} + +You can cancel this alert at any time by clicking the following link: +{{ cancel_url }} + +Thanks for your interest, +The {{ site }} Team +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_subject.txt b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_subject.txt new file mode 100644 index 0000000..f9b4b4e --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_confirmation_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans %}Confirmation required for stock alert{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_product_alert_subject.txt b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_subject.txt new file mode 100644 index 0000000..c427d7d --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_product_alert_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans with title=alert.product.get_title|safe %}{{ title }} is back in stock{% endblocktrans %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_registration_body.html b/tests/django_oscar/oscar/communication/emails/commtype_registration_body.html new file mode 100644 index 0000000..e50ba06 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_registration_body.html @@ -0,0 +1,4 @@ +{% load i18n %} +

    + {% trans 'Thank you for registering.' %} +

    diff --git a/tests/django_oscar/oscar/communication/emails/commtype_registration_body.txt b/tests/django_oscar/oscar/communication/emails/commtype_registration_body.txt new file mode 100644 index 0000000..028d1a0 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_registration_body.txt @@ -0,0 +1 @@ +{% load i18n %}{% trans 'Thank you for registering.' %} diff --git a/tests/django_oscar/oscar/communication/emails/commtype_registration_sms.txt b/tests/django_oscar/oscar/communication/emails/commtype_registration_sms.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/django_oscar/oscar/communication/emails/commtype_registration_subject.txt b/tests/django_oscar/oscar/communication/emails/commtype_registration_subject.txt new file mode 100644 index 0000000..028d1a0 --- /dev/null +++ b/tests/django_oscar/oscar/communication/emails/commtype_registration_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% trans 'Thank you for registering.' %} diff --git a/tests/django_oscar/oscar/communication/notifications/detail.html b/tests/django_oscar/oscar/communication/notifications/detail.html new file mode 100644 index 0000000..85e85e6 --- /dev/null +++ b/tests/django_oscar/oscar/communication/notifications/detail.html @@ -0,0 +1,43 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block extra_breadcrumbs %} + +{% endblock %} +{% block tabcontent %} + + {% if notification.sender %} + + + + + {% endif %} + + + + + {% if notification.body %} + + + + + + + + + {% else %} + + + + + {% endif %} +
    {% trans 'Sender' %}{{ notification.sender }}
    {% trans 'Date sent' %}{{ notification.date_sent }}
    {% trans 'Subject' %}{{ notification.subject|safe }}
    {% trans 'Body' %}{{ notification.body }}
    {% trans 'Message' %}{{ notification.subject|safe }}
    + +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/communication/notifications/list.html b/tests/django_oscar/oscar/communication/notifications/list.html new file mode 100644 index 0000000..7a5e688 --- /dev/null +++ b/tests/django_oscar/oscar/communication/notifications/list.html @@ -0,0 +1,91 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + +{% if notifications %} +{% include "oscar/partials/pagination.html" %} +
    + {% csrf_token %} + + + {% for notification in notifications %} + + + + + + + {% endfor %} + +
    + + + {% if notification.is_read %} + + {% else %} + + {% endif %} + + {% if notification.is_read %} + {{ notification.subject|safe }} + {% else %} + {{ notification.subject|safe }} + {% endif %} +
    + {{ notification.date_sent }} +
    + + {% trans 'View' %} + + {% if list_type == 'inbox' %} + + {% trans 'Archive' context 'verb' %} + + {% endif %} + + {% trans 'Delete' %} + +
    + {% trans "With selected items:" %} + {% if list_type == 'inbox' %} + + {% endif %} + +
    +{% include "oscar/partials/pagination.html" %} +{% else %} +

    + {% trans "There are no notifications to display." %} +

    +{% endif %} +{% endblock tabcontent %} +{% block onbodyload %} +{{ block.super }} +oscar.notifications.init(); +{% endblock %} diff --git a/tests/django_oscar/oscar/customer/address/address_delete.html b/tests/django_oscar/oscar/customer/address/address_delete.html new file mode 100644 index 0000000..0c6c298 --- /dev/null +++ b/tests/django_oscar/oscar/customer/address/address_delete.html @@ -0,0 +1,29 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block extra_breadcrumbs %} + +{% endblock %} +{% block tabcontent %} +
    + {% csrf_token %} +

    + {% trans 'Are you sure you want to delete this address?' %} +

    +

    + {{ object.summary }} +

    +
    + + {% trans 'or' %} + + {% trans 'cancel' %} + +
    +
    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/address/address_form.html b/tests/django_oscar/oscar/customer/address/address_form.html new file mode 100644 index 0000000..349fe8b --- /dev/null +++ b/tests/django_oscar/oscar/customer/address/address_form.html @@ -0,0 +1,13 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block extra_breadcrumbs %} + +{% endblock %} +{% block tabcontent %} + {% with style='horizontal' %} + {% include "oscar/partials/form.html" %}{% endwith %} +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/address/address_list.html b/tests/django_oscar/oscar/customer/address/address_list.html new file mode 100644 index 0000000..4a1ea5e --- /dev/null +++ b/tests/django_oscar/oscar/customer/address/address_list.html @@ -0,0 +1,67 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + {% if addresses %} + + + + + + + {% for address in addresses %} + + + + + {% endfor %} + +
    {% trans 'Address' %}
    + {% if address.is_default_for_shipping %} + {% trans 'Default shipping address' %} + {% endif %} + {% if address.is_default_for_billing %} + {% trans 'Default billing address' %} + {% endif %} +
    + {% for field in address.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    +
    +
    + + {% trans 'Edit' %} + + + +
    +
    + {% include "oscar/partials/pagination.html" %} + {% else %} +

    + {% trans 'There are no addresses in your address book.' %} +

    + {% endif %} +

    + + {% trans 'Add a new address' %} + +

    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/alerts/alert_list.html b/tests/django_oscar/oscar/customer/alerts/alert_list.html new file mode 100644 index 0000000..f1f1b12 --- /dev/null +++ b/tests/django_oscar/oscar/customer/alerts/alert_list.html @@ -0,0 +1,47 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + {% if not alerts %} +

    + {% trans "You do not have any active alerts for out-of-stock products." %} +

    + {% else %} +
    + {% csrf_token %} + + + + + + + + {% for alert in alerts %} + + + + + + + {% endfor %} +
    {% trans "Product" %}{% trans "Status" %}{% trans "Date created" %}
    + {% with product=alert.product %} + {% if product.is_public %} + + {{ product.get_title }} + + {% else %} + {{ product.get_title }} + {% endif %} + {% endwith %} + {{ alert.status }}{{ alert.date_created }} + {% if alert.can_be_cancelled %} + + {% trans "Cancel" %} + + {% endif %} +
    + {% include "oscar/partials/pagination.html" %} +
    +{% endif %} +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/alerts/form.html b/tests/django_oscar/oscar/customer/alerts/form.html new file mode 100644 index 0000000..dc2abbe --- /dev/null +++ b/tests/django_oscar/oscar/customer/alerts/form.html @@ -0,0 +1 @@ +{% extends 'oscar/catalogue/detail.html' %} diff --git a/tests/django_oscar/oscar/customer/alerts/message.html b/tests/django_oscar/oscar/customer/alerts/message.html new file mode 100644 index 0000000..8f58dbe --- /dev/null +++ b/tests/django_oscar/oscar/customer/alerts/message.html @@ -0,0 +1,5 @@ +{% load i18n %} +{% blocktrans with url=alert.product.get_absolute_url title=alert.product.get_title %} + {{ title }} + is back in stock +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/customer/alerts/message_subject.html b/tests/django_oscar/oscar/customer/alerts/message_subject.html new file mode 100644 index 0000000..0fa7401 --- /dev/null +++ b/tests/django_oscar/oscar/customer/alerts/message_subject.html @@ -0,0 +1,4 @@ +{% load i18n %} +{% blocktrans with title=alert.product.get_title|truncatechars:200 %} + {{ title }} is back in stock +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/customer/anon_order.html b/tests/django_oscar/oscar/customer/anon_order.html new file mode 100644 index 0000000..420fb42 --- /dev/null +++ b/tests/django_oscar/oscar/customer/anon_order.html @@ -0,0 +1,151 @@ +{% extends "oscar/layout.html" %} +{% load currency_filters %} +{% load i18n %} +{% load reviews_tags %} +{% load display_tags %} +{% block headertext %} + {% blocktrans with number=order.number %} + Order #{{ number }} + {% endblocktrans %} +{% endblock %} +{% block content %} + {% if order.status %} +
    +

    {% trans 'Status' %}

    +
    +

    + {{ order.status }} +

    + {% endif %} + {% with address=order.shipping_address %} +
    +

    {% trans 'Shipping address' %}

    +
    + + + + + + {% if address.phone_number %} + + + + + {% endif %} + {% if address.notes %} + + + + + {% endif %} +
    {% trans 'Address' %} + {% for field in address.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    {% trans 'Contact number' %}{{ address.phone_number }}
    {% trans 'Notes' %}{{ address.notes|linebreaks }}
    +{% endwith %} +
    +

    {% trans 'Shipping method' %}

    +
    +

    + {{ order.shipping_method }} +

    +
    +

    {% trans 'Order contents' %}

    +
    +{% csrf_token %} + + + + + + + + {% iffeature "reviews" %} + + {% endiffeature %} + + {% for line in order.lines.all %} + + + + + + + {% iffeature "reviews" %} + + {% endiffeature %} + + {% endfor %} + {% for discount in order.discounts.all %} + + + + + + {% endfor %} +
    {% trans 'Product' %} + {% trans 'Status' %} + + {% trans 'Quantity' %} + + {% trans 'Line price excl. tax' %} + + {% trans 'Line price incl. tax' %} +
    + {% if product.is_public %} + + {{ line.description }} + + {% else %} + {{ line.description }} + {% endif %} + + {{ line.shipping_status|default:"-" }} + + {{ line.quantity }} + + {{ line.line_price_before_discounts_excl_tax|currency:order.currency }} + + {{ line.line_price_before_discounts_incl_tax|currency:order.currency }} + + {% if line.product|is_review_permitted:user %} + + {% trans 'Write a review' %} + + {% endif %} +
    {{ discount.description }} + -{{ discount.amount|currency:order.currency }} +
    + + + + + + + + + + + + + + +
    + {% trans 'Totals' %} +
    + {% trans 'Basket total (inc. tax)' %} + + {{ order.basket_total_incl_tax|currency:order.currency }} +
    + {% trans 'Shipping charge (inc. tax)' %} + + {{ order.shipping_incl_tax|currency:order.currency }} +
    + {% trans 'Order total' %} + + {{ order.total_incl_tax|currency:order.currency }} +
    +{% endblock content %} diff --git a/tests/django_oscar/oscar/customer/baseaccountpage.html b/tests/django_oscar/oscar/customer/baseaccountpage.html new file mode 100644 index 0000000..9b6d618 --- /dev/null +++ b/tests/django_oscar/oscar/customer/baseaccountpage.html @@ -0,0 +1,34 @@ +{% extends "oscar/layout_2_col.html" %} +{% load i18n %} +{% block title %} + {{ page_title }} | {% trans 'Account' %} | {{ block.super }} +{% endblock %} +{% block body_class %}account-profile{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ page_title }}{% endblock %} +{% block column_left %} + + {% endblock %} + {% block content %} + {% block tabcontent %}{% endblock tabcontent %} + {% endblock content %} diff --git a/tests/django_oscar/oscar/customer/history/recently_viewed_products.html b/tests/django_oscar/oscar/customer/history/recently_viewed_products.html new file mode 100644 index 0000000..b0827e9 --- /dev/null +++ b/tests/django_oscar/oscar/customer/history/recently_viewed_products.html @@ -0,0 +1,16 @@ +{% load i18n %} +{% load product_tags %} +{% with products_sliced=products|slice:":6" %} +{% if products_sliced %} +
    +

    {% trans 'Products you recently viewed' %}

    +
    +
      + {% for product in products_sliced %} +
    • + {% render_product product %} +
    • + {% endfor %} +
    +{% endif %} +{% endwith %} diff --git a/tests/django_oscar/oscar/customer/login_registration.html b/tests/django_oscar/oscar/customer/login_registration.html new file mode 100644 index 0000000..6da4063 --- /dev/null +++ b/tests/django_oscar/oscar/customer/login_registration.html @@ -0,0 +1,58 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% block title %} + {% trans 'Login or register' %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %}{% endblock %} +{% block content %} +
    + +
    +
    +

    {% trans 'Register' %}

    + {% csrf_token %} + {% include "oscar/partials/form_fields.html" with form=registration_form %} + +
    +
    +
    +{% endblock content %} diff --git a/tests/django_oscar/oscar/customer/order/order_detail.html b/tests/django_oscar/oscar/customer/order/order_detail.html new file mode 100644 index 0000000..48df791 --- /dev/null +++ b/tests/django_oscar/oscar/customer/order/order_detail.html @@ -0,0 +1,214 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load currency_filters %} +{% load display_tags %} +{% load i18n %} +{% load reviews_tags %} +{% block extra_breadcrumbs %} + +{% endblock %} +{% block tabcontent %} + {% if order.status %} +

    {% trans 'Status' %}

    +

    + {{ order.status }} +

    +
    + {% endif %} + + + + + + + + + + + + {% for line in order.lines.all %} + {% with product=line.product %} + + + + + + + + {% endwith %} + {% endfor %} + {% with discounts=order.basket_discounts %} + {% block discount_totals %} + {% if discounts %} + + + + + {% for discount in discounts %} + + + + + {% endfor %} + {% endif %} + {% endblock discount_totals %} + {% block basket_total %} + {% if discounts %} + + + + + {% else %} + + + + + {% endif %} + {% endblock basket_total %} + {% endwith %} + {% block shipping_totals %} + {% if order.has_shipping_discounts %} + + + + + {% for discount in order.shipping_discounts %} + + + + + {% endfor %} + + + + + {% else %} + + + + + {% endif %} + {% endblock %} + {% block order_total %} + + + + + {% endblock order_total %} + +
    {% trans 'Product' %}{% trans 'Qty' %}{% trans 'Line price excl. tax' %}{% trans 'Line price incl. tax' %}
    + {% if product %} + {% if product.is_public %} +

    + + {{ line.description }} + +

    + {% else %} +

    + {{ line.description }} +

    + {% endif %} + {% iffeature "reviews" %} + {% if product|is_review_permitted:user %} + + {% trans 'Write a review' %} + + {% endif %} + {% endiffeature %} + {% else %} +

    + {{ line.description }} +

    + {% endif %} +
    {{ line.quantity }}{{ line.line_price_before_discounts_excl_tax|currency:order.currency }}{{ line.line_price_before_discounts_incl_tax|currency:order.currency }} + {% if product and product.is_public %} +
    + {% csrf_token %} + + +
    + {% else %} + {% trans 'Not available anymore' %} + {% endif %} +
    {% trans "Basket total (excl. discounts)" %} + {{ order.basket_total_before_discounts_incl_tax|currency:order.currency }} +
    + {% trans "Discount" %} + {{ discount.offer_name }} + - {{ discount.amount|currency:order.currency }}
    {% trans "Basket total (inc. discounts)" %} + {{ order.basket_total_incl_tax|currency:order.currency }} +
    {% trans "Basket total" %} + {{ order.basket_total_incl_tax|currency:order.currency }} +
    {% trans "Shipping total (excl. discounts)" %} + {{ order.shipping_before_discounts_incl_tax|currency:order.currency }} +
    + {% trans "Discount" %} + {{ discount.offer_name }} + - {{ discount.amount|currency:order.currency }}
    {% trans "Shipping total (inc. discounts)" %} + {{ order.shipping_incl_tax|currency:order.currency }} +
    {% trans "Shipping total" %} + {{ order.shipping_incl_tax|currency:order.currency }} +
    + {% trans 'Order total' %} + + {{ order.total_incl_tax|currency:order.currency }} +
    +{% block order_actions %} +
    + {% csrf_token %} + + + +
    +{% endblock order_actions %} +
    +

    {% trans 'Shipping Method' %}

    +

    +{{ order.shipping_method }} +

    +
    +

    +{% trans 'Shipping Address' %} +

    + + + + + + + + + + + +
    + {% trans 'Address' %} + + {% trans 'Contact Number' %} + + {% trans 'Shipping Notes' %} +
    + {% for field in order.shipping_address.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    + {{ order.shipping_address.phone_number|default:"-" }} + + {{ order.shipping_address.notes|linebreaks }} +
    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/order/order_list.html b/tests/django_oscar/oscar/customer/order/order_list.html new file mode 100644 index 0000000..c31b070 --- /dev/null +++ b/tests/django_oscar/oscar/customer/order/order_list.html @@ -0,0 +1,84 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load currency_filters %} +{% load i18n %} +{% load static %} +{% block styles %} + {{ block.super }} + +{% endblock %} +{% block scripts %} + {{ block.super }} + + +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block tabcontent %} + {% if orders or form.is_bound %} +
    +

    {% trans "Filter" %}

    +
    + {% include "oscar/partials/form_fields.html" with form=form style='horizontal' %} +
    +
    + + + {% trans 'Reset' %} + +
    +
    +
    +
    + {% endif %} + {% if orders %} +

    {{ form.description }}

    + + + + + + + + {% for order in orders %} + + + + + + + {% endfor %} +
    {% trans "Order number" %}{% trans "Num items" %}{% trans "Total inc tax" %}{% trans "Date submitted" %}
    + + {{ order.number }} + + {{ order.num_items }}{{ order.total_incl_tax|currency:order.currency }}{{ order.date_placed }}
    + {% include "oscar/partials/pagination.html" %} + {% else %} + {% if form.is_bound %} +

    + {% trans "No orders match your search." %} +

    + {% else %} +

    + {% trans "You haven't placed any orders." %} +

    + {% endif %} + {% endif %} +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/partials/standard_tabs.html b/tests/django_oscar/oscar/customer/partials/standard_tabs.html new file mode 100644 index 0000000..fac91f5 --- /dev/null +++ b/tests/django_oscar/oscar/customer/partials/standard_tabs.html @@ -0,0 +1,40 @@ +{% load i18n %} +{% load display_tags %} + + + + + + +{% iffeature 'wishlists' %} + +{% endiffeature %} diff --git a/tests/django_oscar/oscar/customer/profile/change_password_form.html b/tests/django_oscar/oscar/customer/profile/change_password_form.html new file mode 100644 index 0000000..fd01b95 --- /dev/null +++ b/tests/django_oscar/oscar/customer/profile/change_password_form.html @@ -0,0 +1,4 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + {% include 'oscar/partials/form.html' with form_id="change_password_form" %}{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/profile/profile.html b/tests/django_oscar/oscar/customer/profile/profile.html new file mode 100644 index 0000000..764c566 --- /dev/null +++ b/tests/django_oscar/oscar/customer/profile/profile.html @@ -0,0 +1,37 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + + + + + + + + + + + {% block profile_fields %} + {% for field in profile_fields %} + + + + + {% endfor %} + {% endblock %} + + + + + +
    {% trans 'Name' %}{{ user.get_full_name|default:'-' }}
    {% trans 'Email address' %}{{ user.email }}
    {{ field.name }}{{ field.value|default:"-" }}
    {% trans 'Date registered' %}{{ user.date_joined }}
    + + {% trans 'Change password' %} + + + {% trans 'Edit profile' %} + + + {% trans 'Delete profile' %} + +{% endblock %} diff --git a/tests/django_oscar/oscar/customer/profile/profile_delete.html b/tests/django_oscar/oscar/customer/profile/profile_delete.html new file mode 100644 index 0000000..3f036d1 --- /dev/null +++ b/tests/django_oscar/oscar/customer/profile/profile_delete.html @@ -0,0 +1,28 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} +

    + {% trans "Please confirm your password to delete your profile." %} +

    +
    + {% csrf_token %} + {% include "oscar/partials/form_fields.html" with style='horizontal' %} +
    +

    {% trans "Warning" %}

    + {% blocktrans %} + This will delete all information about you from the site. Deleting your profile cannot be + undone. + {% endblocktrans %} +
    +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/profile/profile_form.html b/tests/django_oscar/oscar/customer/profile/profile_form.html new file mode 100644 index 0000000..a406b2f --- /dev/null +++ b/tests/django_oscar/oscar/customer/profile/profile_form.html @@ -0,0 +1,4 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + {% include 'oscar/partials/form.html' with form_id="profile_form" %}{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/registration.html b/tests/django_oscar/oscar/customer/registration.html new file mode 100644 index 0000000..7e306aa --- /dev/null +++ b/tests/django_oscar/oscar/customer/registration.html @@ -0,0 +1,42 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% block title %} + {% trans 'Register' %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Register" %} +{% endblock %} +{% block content %} +
    +
    +
    + {% csrf_token %} + {% include "oscar/partials/form_fields.html" %} + + {% if cancel_url %} + {% trans "or" %} + {% trans "cancel" %} + . + {% endif %} +
    +
    +
    +{% endblock content %} diff --git a/tests/django_oscar/oscar/customer/wishlists/wishlists_delete.html b/tests/django_oscar/oscar/customer/wishlists/wishlists_delete.html new file mode 100644 index 0000000..5a20f42 --- /dev/null +++ b/tests/django_oscar/oscar/customer/wishlists/wishlists_delete.html @@ -0,0 +1,48 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block tabcontent %} +
    + {% csrf_token %} +

    + {% blocktrans with name=wishlist.name %} + Are you sure you want to delete {{ name }}? + {% endblocktrans %} +

    +
    + + {% trans 'or' %} + + {% trans 'cancel' %} + +
    +
    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/wishlists/wishlists_delete_product.html b/tests/django_oscar/oscar/customer/wishlists/wishlists_delete_product.html new file mode 100644 index 0000000..be3059e --- /dev/null +++ b/tests/django_oscar/oscar/customer/wishlists/wishlists_delete_product.html @@ -0,0 +1,48 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block tabcontent %} +
    + {% csrf_token %} +

    + {% blocktrans with product_name=object.get_title wishlist_name=wishlist.name %} + Are you sure you want to delete {{ product_name }} from wish list {{ wishlist_name }}? + {% endblocktrans %} +

    +
    + + {% trans 'or' %} + + {% trans 'cancel' %} + +
    +
    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/wishlists/wishlists_detail.html b/tests/django_oscar/oscar/customer/wishlists/wishlists_detail.html new file mode 100644 index 0000000..1dc8e97 --- /dev/null +++ b/tests/django_oscar/oscar/customer/wishlists/wishlists_detail.html @@ -0,0 +1,131 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load image_tags %} +{% load i18n %} +{% load widget_tweaks %} +{% block breadcrumbs %} + +{% endblock %} +{% block tabcontent %} + {% if form.total_form_count %} +
    + {{ form.management_form }} + {% csrf_token %} + + + + + + + + {% for subform in form %} + {% with line=subform.instance product=subform.instance.product %} + + + + + + + {% endwith %} + {% endfor %} + + + + + + +
    {% trans 'Product' %}{% trans 'Quantity' %}{% trans 'Action' %}
    + {% if product %} + {% with image=product.primary_image %} + {% oscar_thumbnail image.original "100x100" upscale=False as thumb %} + {% if product.is_public %} + + {{ product.get_title }} + + {% else %} + {{ product.get_title }} + {% endif %} + {% endwith %} + {% endif %} + + {% if product and product.is_public %} + + {{ line.get_title }} + + {% else %} + {{ line.get_title }} ({% trans 'Not available anymore' %}) + {% endif %} + + {% for field in subform %} + {% render_field field class+="form-control" %} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} + {% endfor %} +
    +
    + {% if product %} + + {% trans 'View product' %} + + + {% else %} + + {% trans 'Actions' %} + + {% endif %} + +
    +
    + +
    +
    +{% else %} +{% trans "Your wish list is empty." %} +{% endif %} +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/wishlists/wishlists_form.html b/tests/django_oscar/oscar/customer/wishlists/wishlists_form.html new file mode 100644 index 0000000..9fc7a18 --- /dev/null +++ b/tests/django_oscar/oscar/customer/wishlists/wishlists_form.html @@ -0,0 +1,58 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block tabcontent %} +
    + {% csrf_token %} + {% if not wishlist %} +

    + {% trans "What should your new wish list be called?" %} +

    + {% endif %} + {% include "oscar/partials/form_fields.html" %} + {% if product %} +

    + {% blocktrans with title=product.get_title %} + After your wishlist is created, + {{ title }} + will be added. + {% endblocktrans %} +

    + {% endif %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/customer/wishlists/wishlists_list.html b/tests/django_oscar/oscar/customer/wishlists/wishlists_list.html new file mode 100644 index 0000000..2268cbd --- /dev/null +++ b/tests/django_oscar/oscar/customer/wishlists/wishlists_list.html @@ -0,0 +1,54 @@ +{% extends "oscar/customer/baseaccountpage.html" %} +{% load i18n %} +{% block tabcontent %} + {% if wishlists %} + + + + + + + + {% for wishlist in wishlists %} + + + + + + {% endfor %} + +
    {% trans 'Name' %}{% trans 'Number of products' %}{% trans 'Action' %}
    + + {{ wishlist.name }} + + {{ wishlist.lines.count }} + +
    + {% include "oscar/partials/pagination.html" %} + {% else %} +

    + {% trans "You don't have any wish lists yet." %} +

    + {% endif %} +

    + + {% trans 'Create a new wish list' %} + +

    +{% endblock tabcontent %} diff --git a/tests/django_oscar/oscar/dashboard/base.html b/tests/django_oscar/oscar/dashboard/base.html new file mode 100644 index 0000000..2cb1fb5 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/base.html @@ -0,0 +1,8 @@ +{% extends "oscar/base.html" %} +{% block extrahead %} + {{ block.super }} + +{% endblock %} +{% block tracking %} + {# By default there is no analytics tracking in the dashboard #} +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_delete.html b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_delete.html new file mode 100644 index 0000000..e3adece --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_delete.html @@ -0,0 +1,77 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {{ title }} | {% trans "Create Attribute Option Group" %} | {{ block.super }} +{% endblock %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block navbar %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block dashboard_nav %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block breadcrumbs %} + {% if not is_popup %} + + {% endif %} +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} + {% if disallow %} +

    + {% trans "Please make sure all Product Attributes are assigned to another Attribute Option Group before deletion." %} +

    + {% else %} +
    +

    {% trans "Delete Attribute Option Group" %}

    +
    +
    + {% csrf_token %} + {% if is_popup %} + + {% endif %} + {% if not is_popup %} + {% for key, value in http_get_params.items %} + + {% endfor %} + {% endif %} +

    + {% blocktrans with name=object.name %} + Delete Attribute Option Group + {{ name }} + - are you sure? + {% endblocktrans %} +

    +
    + + {% trans "Cancel" %} + + +
    +
    + {% endif %} +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_form.html b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_form.html new file mode 100644 index 0000000..470190a --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_form.html @@ -0,0 +1,168 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {{ title }} | {% trans "Create Attribute Option Group" %} | {{ block.super }} +{% endblock %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block navbar %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block dashboard_nav %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block breadcrumbs %} + {% if not is_popup %} + + {% endif %} +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} +
    + {% if is_popup %} + + {% endif %} + {% if to_field %} + + {% endif %} + {% block tab_nav %} +
    +
    +
    +

    {% trans "Sections" %}

    +
    + +
    +
    + {% endblock tab_nav %} +
    +
    + {% block tab_content %} + {% block attribute_option_group_details %} +
    +
    +

    {% trans "Attribute Option Group details" %}

    +
    +
    + {% comment %} + If the AttributeOptionGroup form has field_errors, partials/form_fields.html + will render an error message. + This means that there'll be 2 error messages, + one from the partial and one from the view. Perhaps there should be + an option allowing hiding of the error message in the template. + For now we copy paste what we need from the template. + {% endcomment %} + {% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
    + + + {{ error }} + +
    + {% endfor %} + {% endif %} + {% for field in form %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field %}{% endfor %} +
    +
    + {% endblock %} + {% block attribute_options %} +
    +
    +

    {% trans "Attribute Options" %}

    +
    +
    + + {{ attribute_option_formset.management_form }} + {{ attribute_option_formset.non_form_errors }} + + + + + + + + + + {% for attribute_option_form in attribute_option_formset %} + + {% for hidden_field in attribute_option_form.hidden_fields %} + {{ hidden_field }} + {% endfor %} + + + + {% endfor %} + +
    {% trans "Option" %}{% trans "Delete?" %}
    + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_option_form.option nolabel=True %} + + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_option_form.DELETE nolabel=True %} +
    +
    +
    + {% endblock %} + {% endblock tab_content %} +
    +
    +
    + {% block fixed_actions_group %} +
    +
    +
    + + {% trans "Cancel" %} + + {% trans "or" %} + +
    +
    +
    + {% endblock fixed_actions_group %} +
    +{% endblock dashboard_content %} +{% block onbodyload %} + {{ block.super }} + oscar.dashboard.product_attributes.init(); +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_list.html b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_list.html new file mode 100644 index 0000000..dd79a5f --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_list.html @@ -0,0 +1,44 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load render_table from django_tables2 %} +{% block title %} + {% trans "Attribute Option Groups" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + {% if attribute_option_groups %} + {% block product_list %} +
    + {% csrf_token %} + {% render_table attribute_option_groups %} +
    + {% endblock product_list %} + {% else %} +

    + {% trans "No Attribute Option Groups found." %} +

    + {% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_actions.html b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_actions.html new file mode 100644 index 0000000..055cb21 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_actions.html @@ -0,0 +1,24 @@ +{% load django_tables2 %} +{% load i18n %} + diff --git a/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_name.html b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_name.html new file mode 100644 index 0000000..c064bea --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_name.html @@ -0,0 +1,4 @@ +{% load django_tables2 %} + + {{ value }} + diff --git a/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_option_summary.html b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_option_summary.html new file mode 100644 index 0000000..c064bea --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/attribute_option_group_row_option_summary.html @@ -0,0 +1,4 @@ +{% load django_tables2 %} + + {{ value }} + diff --git a/tests/django_oscar/oscar/dashboard/catalogue/category_delete.html b/tests/django_oscar/oscar/dashboard/catalogue/category_delete.html new file mode 100644 index 0000000..08669ba --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/category_delete.html @@ -0,0 +1,50 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} +{% trans "Delete category?" %} +{% endblock %} +{% block dashboard_content %} +
    +

    {% trans "Delete category" %}

    +
    +
    + {% csrf_token %} + {{ form }} + {% blocktrans with name=object.name %} +

    + Delete category + {{ name }} + - are you sure? +

    + {% endblocktrans %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/category_form.html b/tests/django_oscar/oscar/dashboard/catalogue/category_form.html new file mode 100644 index 0000000..bf410ba --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/category_form.html @@ -0,0 +1,131 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load category_tags %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page catalogue{% endblock %} +{% block title %} + {{ title }} | {% trans "Categories" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} +
    + {% block tab_nav %} +
    +
    +
    +

    {% trans "Sections" %}

    +
    + +
    +
    + {% endblock tab_nav %} +
    +
    + {% block tab_content %} + {% block category_details %} +
    +
    +

    {% trans "Category details" %}

    +
    +
    + {% block category_details_content %} + {{ form.non_field_errors }} + {% for field in form.hidden_fields %}{{ field }}{% endfor %} + {% for field in form.primary_form_fields %} + {% if 'attr' not in field.id_for_label %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field %}{% endif %} + {% endfor %} + {% endblock category_details_content %} +
    +
    + {% endblock category_details %} + {% block seo %} +
    +
    +

    {% trans "Search engine optimisation" %}

    +
    +
    + {% block seo_content %} + {% for field in form.seo_form_fields %} + {% if 'attr' not in field.id_for_label %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field %}{% endif %} + {% endfor %} + {% endblock seo_content %} +
    +
    + {% endblock seo %} + {% endblock tab_content %} +
    +
    +
    + {% block fixed_actions_group %} +
    +
    +
    + + {% trans "Cancel" %} + + {% trans "or" %} + + +
    + {% if category %} + + {% trans "View on site" %} + + {% endif %} +
    +
    + {% endblock fixed_actions_group %} +
    + {% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/category_list.html b/tests/django_oscar/oscar/dashboard/catalogue/category_list.html new file mode 100644 index 0000000..49f7d70 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/category_list.html @@ -0,0 +1,60 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load category_tags %} +{% load i18n %} +{% load render_table from django_tables2 %} +{% block body_class %}{{ block.super }} catalogue{% endblock %} +{% block title %} + {% trans "Categories" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +
    + {% trans "You are editing:" %} + + + {% trans "Home" %} + + + {% if ancestors %} + > + {% for ancestor in ancestors %} + + + {{ ancestor.name }} + + + {% if not forloop.last %}> {% endif %} + {% endfor %} + {% endif %} +
    +
    + {% render_table categories %} + {% if not child_categories %} +

    + {% trans "There are no categories." %} +

    + {% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/category_row_actions.html b/tests/django_oscar/oscar/dashboard/catalogue/category_row_actions.html new file mode 100644 index 0000000..2d4992b --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/category_row_actions.html @@ -0,0 +1,32 @@ +{% load django_tables2 %} +{% load i18n %} + diff --git a/tests/django_oscar/oscar/dashboard/catalogue/messages/product_saved.html b/tests/django_oscar/oscar/dashboard/catalogue/messages/product_saved.html new file mode 100644 index 0000000..6568115 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/messages/product_saved.html @@ -0,0 +1,47 @@ +{% load i18n %} +{% load django_tables2 %} +

    + {% with name=product.title parent_name=product.parent.title %} + {% if product.is_child %} + {% if creating %} + {% if product.title %} + {% blocktrans %} + Created product variant '{{ name }}'. + {% endblocktrans %} + {% else %} + {% blocktrans %} + Created variant of '{{ parent_name }}'. + {% endblocktrans %} + {% endif %} + {% else %} + {% if product.title %} + {% blocktrans %} + Updated product variant '{{ name }}'. + {% endblocktrans %} + {% else %} + {% blocktrans %} + Updated a variant of '{{ parent_name }}'. + {% endblocktrans %} + {% endif %} + {% endif %} + {% else %} + {% if creating %} + {% blocktrans %} + Created product '{{ name }}'. + {% endblocktrans %} + {% else %} + {% blocktrans %} + Updated product '{{ name }}'. + {% endblocktrans %} + {% endif %} + {% endif %} +{% endwith %} +

    +

    + + {% trans "Edit again" %} + + + {% trans "View it on the site" %} + +

    diff --git a/tests/django_oscar/oscar/dashboard/catalogue/option_delete.html b/tests/django_oscar/oscar/dashboard/catalogue/option_delete.html new file mode 100644 index 0000000..d7d0143 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/option_delete.html @@ -0,0 +1,71 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {{ title }} | {% trans "Create Option" %} | {{ block.super }} +{% endblock %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block navbar %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block dashboard_nav %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block breadcrumbs %} + {% if not is_popup %} + + {% endif %} +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} + {% if disallow %} +

    + {% trans "Please make sure option is not assigned to Products or Product Classes before deletion." %} +

    + {% else %} +
    +

    {% trans "Delete Option" %}

    +
    +
    + {% csrf_token %} + {% if is_popup %} + + {% endif %} + {% if not is_popup %} + {% for key, value in http_get_params.items %} + + {% endfor %} + {% endif %} +

    + {% blocktrans with name=object.name %} + Delete Option + {{ name }} + - are you sure? + {% endblocktrans %} +

    +
    + + {% trans "Cancel" %} + + +
    +
    + {% endif %} +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/option_form.html b/tests/django_oscar/oscar/dashboard/catalogue/option_form.html new file mode 100644 index 0000000..bc59103 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/option_form.html @@ -0,0 +1,99 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %}{{ title }} | {{ block.super }}{% endblock %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block navbar %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block dashboard_nav %} + {% if not is_popup %}{{ block.super }}{% endif %} +{% endblock %} +{% block breadcrumbs %} + {% if not is_popup %} + + {% endif %} +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} +
    + {% if is_popup %} + + {% endif %} + {% if to_field %} + + {% endif %} +
    +
    + {% block option_details %} +
    +
    +

    {% trans "Option details" %}

    +
    +
    + {% comment %} + If the Option form has field_errors, partials/form_fields.html + will render an error message. + This means that there'll be 2 error messages, + one from the partial and one from the view. Perhaps there should be + an option allowing hiding of the error message in the template. + For now we copy paste what we need from the template. + {% endcomment %} + {% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
    + + + {{ error }} + +
    + {% endfor %} + {% endif %} + {% for field in form %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field %}{% endfor %} +
    +
    + {% endblock %} +
    +
    +
    + {% block fixed_actions_group %} +
    +
    +
    + + {% trans "Cancel" %} + + {% trans "or" %} + +
    +
    +
    + {% endblock fixed_actions_group %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/option_list.html b/tests/django_oscar/oscar/dashboard/catalogue/option_list.html new file mode 100644 index 0000000..b8d6787 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/option_list.html @@ -0,0 +1,43 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load render_table from django_tables2 %} +{% block title %} + {% trans "Options" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + {% if options %} + {% block product_list %} +
    + {% csrf_token %} + {% render_table options %} +
    + {% endblock product_list %} + {% else %} +

    + {% trans "No Option found." %} +

    + {% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/option_row_actions.html b/tests/django_oscar/oscar/dashboard/catalogue/option_row_actions.html new file mode 100644 index 0000000..c0962c1 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/option_row_actions.html @@ -0,0 +1,24 @@ +{% load django_tables2 %} +{% load i18n %} +
    + +
    diff --git a/tests/django_oscar/oscar/dashboard/catalogue/option_row_name.html b/tests/django_oscar/oscar/dashboard/catalogue/option_row_name.html new file mode 100644 index 0000000..0d40336 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/option_row_name.html @@ -0,0 +1,4 @@ +{% load django_tables2 %} + + {{ value }} + diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_class_delete.html b/tests/django_oscar/oscar/dashboard/catalogue/product_class_delete.html new file mode 100644 index 0000000..4ddf5df --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_class_delete.html @@ -0,0 +1,54 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} + {% if disallow %} +

    + {% trans "Please make sure all products are assigned to another type before deletion." %} +

    + {% else %} +
    +

    {% trans "Delete product type" %}

    +
    +
    + {% csrf_token %} + {{ form }} +

    + {% blocktrans with name=object.name %} + Delete product type + {{ name }} + - are you sure? + {% endblocktrans %} +

    +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    + {% endif %} +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_class_form.html b/tests/django_oscar/oscar/dashboard/catalogue/product_class_form.html new file mode 100644 index 0000000..fcefb8c --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_class_form.html @@ -0,0 +1,160 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {{ title }} | {% trans "Create product type" %} | {{ block.super }} +{% endblock %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} +
    + {% block tab_nav %} +
    +
    +
    +

    {% trans "Sections" %}

    +
    + +
    +
    + {% endblock tab_nav %} +
    +
    + {% block tab_content %} + {% block product_class_details %} +
    +
    +

    {% trans "Product Class details" %}

    +
    +
    + {% comment %} + If the ProductClass form has field_errors, partials/form_fields.html + will render an error message. + This means that there'll be 2 error messages, + one from the partial and one from the view. Perhaps there should be + an option allowing hiding of the error message in the template. + For now we copy paste what we need from the template. + {% endcomment %} + {% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
    + + + {{ error }} + +
    + {% endfor %} + {% endif %} + {% for field in form %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field %}{% endfor %} +
    +
    + {% endblock %} + {% block product_attributes %} +
    +
    +

    {% trans "Product attributes" %}

    +
    +
    + + {{ attributes_formset.management_form }} + {{ attributes_formset.non_form_errors }} + + + + + + + + + + + + + + {% for attribute_form in attributes_formset %} + + {% for hidden_field in attribute_form.hidden_fields %} + {{ hidden_field }} + {% endfor %} + + + + + + + {% endfor %} + +
    {% trans "Name" %}{% trans "Code" %}{% trans "Type" %}{% trans "Required" %}{% trans "Delete?" %}
    + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.name nolabel=True %} + + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.code nolabel=True %} + + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.type nolabel=True %} + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.option_group nolabel=True %} + + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.required nolabel=True %} + + {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.DELETE nolabel=True %} +
    +
    +
    + {% endblock %} + {% endblock tab_content %} +
    +
    +
    + {% block fixed_actions_group %} +
    +
    +
    + + {% trans "Cancel" %} + + {% trans "or" %} + +
    +
    +
    + {% endblock fixed_actions_group %} +
    +{% endblock dashboard_content %} +{% block onbodyload %} + {{ block.super }} + oscar.dashboard.product_attributes.init(); +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_class_list.html b/tests/django_oscar/oscar/dashboard/catalogue/product_class_list.html new file mode 100644 index 0000000..c782537 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_class_list.html @@ -0,0 +1,93 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + {% if classes %} + + + + + + + + + + + + {% for class in classes %} + + + + + + + {% endfor %} + +
    + + {% trans 'Product Types' %} +
    {% trans "Name" %}{% trans "Requires shipping" %}{% trans "Track stock?" %} 
    + + {{ class.name }} + + + + {{ class.requires_shipping|yesno }} + + + + {{ class.track_stock|yesno }} + + + +
    + {% else %} +

    + {% trans "There are no product types." %} +

    + {% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_delete.html b/tests/django_oscar/oscar/dashboard/catalogue/product_delete.html new file mode 100644 index 0000000..ad54e26 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_delete.html @@ -0,0 +1,73 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %}{{ title }} | {{ block.super }}{% endblock %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    +

    {{ title }}

    +
    +
    + {% csrf_token %} +

    + {% if product.is_child %} + {% blocktrans with title=product.get_title %} + Delete product variant + {{ title }} + - are you sure? + {% endblocktrans %} + {% else %} + {% blocktrans with title=product.get_title %} + Delete product + {{ title }} + - are you sure? + {% endblocktrans %} + {% endif %} +

    + {% if product.is_parent %} +

    + {% trans "This will also delete the following child products:" %} +

      + {% for child in product.children.all %} +
    • + {{ child.get_title }} +
    • + {% endfor %} +
    +

    + {% endif %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_list.html b/tests/django_oscar/oscar/dashboard/catalogue/product_list.html new file mode 100644 index 0000000..bfa9464 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_list.html @@ -0,0 +1,102 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load render_table from django_tables2 %} +{% block body_class %}{{ block.super }} catalogue{% endblock %} +{% block title %} + {% trans "Products" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + {% block create_product %} +
    +

    + + {% trans "Create new product" %} +

    +
    +
    +
    + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=productclass_form %} + +
    +
    + {% endblock %} + {% block search_products %} +
    +

    + + {% trans "Search Products" %} +

    +
    +
    +
    + {% comment %} + Add the current query string to the search form so that the + sort order is not reset when searching. + {% endcomment %} + {% for name, value in request.GET.items %} + {% if name not in form.fields %} + + {% endif %} + {% endfor %} + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=form %} + +
    +
    +{% endblock %} +{% if products %} + {% block product_list %} +
    + {% csrf_token %} + {% render_table products %} +
    + + {% endblock product_list %} + {% else %} +

    + {% trans "No products found." %} +

    + {% endif %} +{% endblock dashboard_content %} +{% block onbodyload %} + {{ block.super }} + oscar.dashboard.product_lists.init(); +{% endblock onbodyload %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_row_actions.html b/tests/django_oscar/oscar/dashboard/catalogue/product_row_actions.html new file mode 100644 index 0000000..c19afa2 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_row_actions.html @@ -0,0 +1,25 @@ +{% load django_tables2 %} +{% load i18n %} + diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_row_image.html b/tests/django_oscar/oscar/dashboard/catalogue/product_row_image.html new file mode 100644 index 0000000..408afb0 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_row_image.html @@ -0,0 +1,14 @@ +{% load image_tags %} +{% if record.primary_image.original.url %} + {% with image=record.primary_image %} + {% oscar_thumbnail image.original "70x70" upscale=False as thumb %} + + {% if image.caption %}{{ image.caption }}{% else %}{{ record.get_title }}{% endif %} + +{% endwith %} +{% else %} +— +{% endif %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_row_stockrecords.html b/tests/django_oscar/oscar/dashboard/catalogue/product_row_stockrecords.html new file mode 100644 index 0000000..0ed2820 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_row_stockrecords.html @@ -0,0 +1,5 @@ +{% if record.is_parent %} + - +{% else %} + {{ record.num_stockrecords }} +{% endif %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_row_title.html b/tests/django_oscar/oscar/dashboard/catalogue/product_row_title.html new file mode 100644 index 0000000..3625b34 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_row_title.html @@ -0,0 +1,4 @@ +{% load django_tables2 %} + + {{ value }} + diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_row_variants.html b/tests/django_oscar/oscar/dashboard/catalogue/product_row_variants.html new file mode 100644 index 0000000..c738ba1 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_row_variants.html @@ -0,0 +1,5 @@ +{% if record.is_standalone %} + - +{% else %} + {{ record.children.count }} +{% endif %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/product_update.html b/tests/django_oscar/oscar/dashboard/catalogue/product_update.html new file mode 100644 index 0000000..2881bf5 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/product_update.html @@ -0,0 +1,447 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load form_tags %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page catalogue{% endblock %} +{% block title %} + {{ title }} | {% trans "Products" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} + {% if parent %} +
    +
    +
    + {% url 'dashboard:catalogue-product' pk=parent.id as parent_url %} + {% blocktrans with title=parent.title %} + You are currently editing a product variant of + {{ title }} + . + {% endblocktrans %} +
    +
    +
    + {% endif %} +
    + {% block tab_nav %} +
    +
    +
    +

    {% trans "Sections" %}

    +
    + +
    +
    + {% endblock tab_nav %} +
    +
    + {% block tab_content %} + {% block product_details %} +
    +
    +

    {% trans "Product details" %}

    +
    +
    + {% block product_details_content %} + {{ form.non_field_errors }} + {% for field in form.hidden_fields %}{{ field }}{% endfor %} + {% for field in form.primary_form_fields %} + {% if 'attr' not in field.id_for_label %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field %}{% endif %} + {% endfor %} + {% endblock product_details_content %} +
    +
    + {% endblock product_details %} + {% block product_categories %} +
    + {% block product_categories_content %} + + + {{ category_formset.management_form }} + {{ category_formset.non_form_errors }} + {% for category_form in category_formset %} + + + + {% endfor %} +
    + {% trans "Category" %} +
    + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=category_form %} +
    + {% endblock product_categories_content %} +
    + {% endblock product_categories %} + {% block product_attributes %} +
    + {% block product_attributes_content %} + + + {% for field in form %} + {% if 'attr' in field.id_for_label %} + + + + {% endif %} + {% endfor %} +
    + {% trans "Attributes" %} + {% trans "Product Type:" %} {{ product_class }} +
    {% include "oscar/dashboard/partials/form_field.html" %}
    + {% endblock product_attributes_content %} +
    + {% endblock product_attributes %} + {% block product_images %} +
    + {% block product_images_content %} +
    +

    {% trans "Upload, change or remove images" %}

    +
    +
    + {{ image_formset.management_form }} + {{ image_formset.non_form_errors }} +
      + {% for image_form in image_formset %} + {% include "oscar/dashboard/partials/product_images.html" with form=image_form %}{% endfor %} +
    +

    + {% trans 'Drag images to re-order them. Space for additional images will appear when images are added.' %} +

    +
    + {% endblock product_images_content %} +
    + {% endblock product_images %} + {% block stockrecords %} +
    + {% block stockrecords_content %} + + + {{ stockrecord_formset.management_form }} + {{ stockrecord_formset.non_form_errors }} + + + + + {% if product_class.track_stock %} + + + + {% endif %} + + + + + + + {% for stockrecord_form in stockrecord_formset %} + {% if stockrecord_form.non_field_errors %} + + + + {% endif %} + + + + {% if product_class.track_stock %} + + + + {% endif %} + + + + + {% endfor %} + +
    + {% trans "Stock and pricing" %} +
    {% trans "Partner" %}{% trans "SKU" %}{% trans "Num in stock" %}{% trans "Num allocated" %}{% trans "Low stock threshold" %}{% trans "Currency" %} + {% trans "Price" %} + + {% trans "Delete?" %} +
    + {% for error in stockrecord_form.non_field_errors %} + + + {{ error }} + + {% endfor %} +
    + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.partner nolabel=True %} + + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.partner_sku nolabel=True %} + + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.num_in_stock nolabel=True %} + + {{ stockrecord_form.instance.num_allocated|default:"-" }} + + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.low_stock_threshold nolabel=True %} + + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.price_currency nolabel=True %} + + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.price nolabel=True %} + + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.id nolabel=True %} + {% include "oscar/dashboard/partials/form_field.html" with field=stockrecord_form.DELETE nolabel=True %} +
    + {% endblock stockrecords_content %} +
    + {% endblock stockrecords %} + {% block child_products %} + {% with children=product.children.all %} +
    + {% block child_products_content %} + + + {% if children %} + + + + + + + + {% for child in children %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    + {% trans "Variants" %} + +
    + {% trans "Title" %} + + {% trans "Attributes" %} + + {% trans "Stock records" %} + + {% trans "Is public?" %} + +   +
    + {{ child.get_title }} + + {{ child.attribute_summary }} + + {{ child.stockrecords.count }} + + {% if child.is_public %} + + {% else %} + + {% endif %} + + + {% trans "Edit" %} + + + {% trans "Delete" %} + +
    + {% if product.can_be_parent %} + {% trans 'This product does not have any variants.' %} + {% else %} + {% trans "One can't add variants to this product at this point." %} + {% if product.pk is None %} + {% trans "Please save the product before trying to add variants." %} + {% elif product.has_stockrecords %} + {% trans 'This is likely because this product still has stock records.' %} + {% endif %} + {% endif %} +
    + {% endblock child_products_content %} +
    + {% endwith %} + {% endblock child_products %} + {% block recommended_products %} + + {% endblock recommended_products %} + {% block seo %} +
    +
    +

    + {% trans "Search engine optimisation" %} +

    +
    +
    + {% block seo_content %} + {% for field in form.seo_form_fields %} + {% if 'attr' not in field.id_for_label %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field %}{% endif %} + {% endfor %} + {% endblock seo_content %} +
    +
    + {% endblock seo %} + {% endblock tab_content %} +
    +
    +
    +{% block fixed_actions_group %} +
    +
    +
    + + {% trans "Cancel" %} + + {% trans "or" %} + {% if parent %} + + {% endif %} + + +
    + {% if product %} + + {% trans "View on site" %} + + {% endif %} +
    +
    +{% endblock fixed_actions_group %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/catalogue/stockalert_list.html b/tests/django_oscar/oscar/dashboard/catalogue/stockalert_list.html new file mode 100644 index 0000000..2a254f7 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/catalogue/stockalert_list.html @@ -0,0 +1,101 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} catalogue{% endblock %} +{% block title %} + {% trans "Stock alerts" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +

    + + {{ description }} +

    + +
    + + {% if alerts %} + + + + + + + + + + {% for alert in alerts %} + + + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    {% trans "Product" %}{% trans "Partner" %}{% trans "Low stock threshold" %}{% trans "Current available stock" %}{% trans "Date alert raised" %}{% trans "Status" %}
    + + {{ alert.stockrecord.product.get_title }} + + {{ alert.stockrecord.partner.display_name }}{{ alert.stockrecord.low_stock_threshold }} + {{ alert.stockrecord.net_stock_level }} + + {{ alert.date_created }} + + {{ alert.status }} + + + {% trans "Update" %} + +
    + {% trans "No stock alerts found." %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/comms/detail.html b/tests/django_oscar/oscar/dashboard/comms/detail.html new file mode 100644 index 0000000..613711b --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/comms/detail.html @@ -0,0 +1,183 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %}{{ commtype.name }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +
    + {% if preview %} + + {% else %} +
    +

    + + {% trans "Edit email" %} +

    +
    + {% endif %} +
    +
    + {% csrf_token %} + {% include 'oscar/dashboard/partials/form_field.html' with field=form.name %} +
    +

    {% trans "Email content" %}

    +
    +
    +

    + {% trans "These fields are rendered using Django's template system." %} +

    +

    + {% trans "You can use the following variables:" %} +

    +
    +
    + + {% templatetag openvariable %} user.get_full_name {% templatetag closevariable %} + +
    +
    + {% trans "The full name of the user (if they have one)" %} +
    +
    + + {% templatetag openvariable %} user.email {% templatetag closevariable %} + +
    +
    + {% trans "The user's email address" %} +
    +
    + + {% templatetag openvariable %} site.name {% templatetag closevariable %} + +
    +
    + {% trans "The name of the site (eg example.com)" %} +
    + {% if commtype.is_order_related %} +
    + + {% templatetag openvariable %} order.number {% templatetag closevariable %} + +
    +
    + {% trans "Order number" %} +
    + {% endif %} +
    +
    + {% include 'oscar/dashboard/partials/form_field.html' with field=form.email_subject_template %} + {% include 'oscar/dashboard/partials/form_field.html' with field=form.email_body_template %} + {% include 'oscar/dashboard/partials/form_field.html' with field=form.email_body_html_template %} +
    +

    {% trans "Preview" %}

    +
    +
    + {% if commtype.is_order_related %} +

    + {% trans "View a preview of this email using order:" %} +

    + {% include 'oscar/dashboard/partials/form_field.html' with field=form.preview_order_number %}{% endif %} + +

    + {% trans "or send a preview to:" %} +

    + {% include 'oscar/dashboard/partials/form_field.html' with field=form.preview_email %} + +
    +
    +
    + + + + + + + + + + + + + +
    {% trans "Subject" %}{{ preview.subject }}
    {% trans "Body text" %} +
    +{{ preview.body }}
    +                        
    +
    {% trans "Body HTML" %} + +
    +
    +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +
    +
    +{% endblock dashboard_content %} +{% block onbodyload %} +{{ block.super }} +$(function() { +// Sets the HTML email preview so it's css doesn't touch the page. +var el_preview_html = document.getElementById('preview_box'); +var html = $(el_preview_html).text(); +var doc = el_preview_html.contentWindow.document; +doc.open(); +doc.write(html); +doc.close(); +}); +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/comms/list.html b/tests/django_oscar/oscar/dashboard/comms/list.html new file mode 100644 index 0000000..4187193 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/comms/list.html @@ -0,0 +1,66 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {% trans "Emails" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + + + {% if commtypes %} + + + + + + + + + + {% for commtype in commtypes %} + + + + + + + {% endfor %} + + {% else %} + + + + + + {% endif %} +
    + + {% trans "Emails" %} +
    {% trans "Code" %}{% trans "Name" %}{% trans "Category" %}
    + + {{ commtype.code }} + + {{ commtype.name }}{{ commtype.category }} + + {% trans "Edit" %} + +
    {% trans "There are no defined emails to edit." %}
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/index.html b/tests/django_oscar/oscar/dashboard/index.html new file mode 100644 index 0000000..5b03076 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/index.html @@ -0,0 +1,270 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} orders home{% endblock %} +{% block extrahead %} + {{ block.super }} + +{% endblock %} +{% block breadcrumbs %}{% endblock %} +{% block headertext %} + {% trans "Dashboard" %} +{% endblock %} +{% block dashboard_content %} +
    + + {% trans "Your Store Statistics" %} +
    +
    +
    + +
    +
    +
    +

    {% trans "Latest Orders (last 24 hours)" %}

    +
    +
    +
      + {% for y_value in hourly_report_dict.y_range %} +
    • + {{ y_value|currency }} +
    • + {% endfor %} +
    +
    +
    + {% for item in hourly_report_dict.order_total_hourly %} +
    + {{ item.end_time|time }} + +

    + {{ item.total_incl_tax|currency }} +

    +
    +
    + {% endfor %} +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + +
    + + {% trans "Orders - Last 24 Hours" %} +
    {% trans "Total orders" %}{{ total_orders_last_day }}
    {% trans "Total lines" %}{{ total_lines_last_day }}
    {% trans "Total revenue" %}{{ total_revenue_last_day|currency }}
    {% trans "Average order costs" %}{{ average_order_costs|currency }}
    +
    +
    + + + + + + + + + + + + + + + + + + +
    + + + {% trans "Manage" %} + + + {% trans "Orders - All Time" %} +
    {% trans "Total orders" %}{{ total_orders }}
    + {% trans "Total lines" %} + + {{ total_lines }} +
    + {% trans "Total revenue" %} + + {{ total_revenue|currency }} +
    + {% trans "Total + open + baskets" %} + + {{ total_open_baskets }} +
    +
    +
    + + + + + + + + + + + + + + +
    + + {% trans "Customers" %} +
    + {% trans "Total customers" %} + + {{ total_customers }} +
    + {% trans "New customers" %} + + {{ total_customers_last_day }} +
    + {% trans "Total + open + baskets" %} + + {{ total_open_baskets_last_day }} +
    +
    +
    +
    +
    + + + + + + + + + + + + + + +
    + + + {% trans "Catalogue and stock" %} +
    + {% trans "Total products" %} + + {{ total_products }} +
    + {% trans " + Open + stock alerts" %} + + {{ total_open_stock_alerts }} +
    + {% trans " + Closed + stock alerts" %} + + {{ total_closed_stock_alerts }} +
    +
    +
    + {% if user.is_staff %} + + + {% for offer_map in offer_maps %} + + + + + {% endfor %} + + + + +
    + + {% trans "Offers, vouchers" %} +
    + {% blocktrans with offer_type=offer_map.offer_type %} + Active + {{ offer_type }} + Offers + {% endblocktrans %} + + {{ offer_map.count }} +
    + {% trans "Active + Vouchers + " %} + + {{ total_vouchers }} +
    + {% endif %} +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/layout.html b/tests/django_oscar/oscar/dashboard/layout.html new file mode 100644 index 0000000..197aa46 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/layout.html @@ -0,0 +1,166 @@ +{% extends "oscar/dashboard/base.html" %} +{% load category_tags %} +{% load dashboard_tags %} +{% load i18n %} +{% load static %} +{% block styles %} + +{% endblock %} +{% block extrastyles %} + {{ block.super }} + + + +{% endblock %} +{% block title %} + {% trans "Dashboard" %} | {{ block.super }} +{% endblock %} +{% block layout %} + {% block navbar %} + + {% endblock navbar %} + {% block dashboard_nav %} + {% dashboard_navigation user as nav_items %} + +{% endblock %} +
    +{% block breadcrumbs %} + +{% endblock %} +
    + {% include 'oscar/dashboard/partials/alert_messages.html' %} + {% block header %} + + {% endblock %} +
    + {% block content %} + {% block dashboard_content %}{% endblock dashboard_content %} + {% endblock content %} +
    +
    +
    + +{% endblock %} +{# Local scripts #} +{% block scripts %} + + + + +{% endblock %} +{% block extrascripts %} +{{ block.super }} +{# jQuery plugins #} + + + + + + + + + + +{% endblock %} +{% block onbodyload %} +{{ block.super }} +// Javascript to enable link to tab +var url = document.location.toString(); +if (url.match('#')) { +$('.nav-list a[href="#' + url.split('#')[1] + '"]').tab('show'); +} +// Change hash for page-reload +$('.nav-list a').on('shown.bs.tab', function (e) { +window.location.hash = e.target.hash; +}); +options = { +'languageCode': '{{ LANGUAGE_CODE }}' +}; +oscar.dashboard.init(options); +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/login.html b/tests/django_oscar/oscar/dashboard/login.html new file mode 100644 index 0000000..7bb4729 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/login.html @@ -0,0 +1,35 @@ +{% extends "oscar/dashboard/base.html" %} +{% load i18n %} +{% load static %} +{% load widget_tweaks %} +{% block styles %} + +{% endblock %} +{% block body_class %}dashboard-login{% endblock %} +{% block layout %} +
    +
    +
    +

    {{ shop_name }}

    +
    + {% if form.errors %} +
    + {% trans "Please enter a correct username and password. Note that both fields may be case-sensitive." %} +
    + {% endif %} +
    + {{ form.username.label_tag }} + {% render_field form.username class="form-control" %} +
    +
    + {{ form.password.label_tag }} + {% render_field form.password class="form-control" %} +
    + + + {% csrf_token %} +
    +
    +
    +{% endblock %} +{% block onbodyload %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/offers/benefit_form.html b/tests/django_oscar/oscar/dashboard/offers/benefit_form.html new file mode 100644 index 0000000..3163cd9 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/benefit_form.html @@ -0,0 +1,34 @@ +{% extends 'oscar/dashboard/offers/step_form.html' %} +{% load i18n %} +{% block progress %} + {% include 'oscar/dashboard/offers/progress.html' with step=2 %}{% endblock %} + {% block form_fields %} + {{ form.non_field_errors }} + {% if form.fields.custom_benefit.choices %} +

    {% trans "Build a new incentive" %}

    + {% endif %} + {% include "oscar/dashboard/partials/form_field.html" with field=form.range %} +

    + {% url 'dashboard:range-list' as range_list_url %} + {% blocktrans %} + Ranges can be created and edited from within the + + range dashboard + + . + {% endblocktrans %} +

    + {% include "oscar/dashboard/partials/form_field.html" with field=form.type %} + {% include "oscar/dashboard/partials/form_field.html" with field=form.value %} + {% include "oscar/dashboard/partials/form_field.html" with field=form.max_affected_items %} + {% if form.fields.custom_benefit.choices %} +

    {% trans "...or choose a pre-defined one" %}

    + {% include "oscar/dashboard/partials/form_field.html" with field=form.custom_benefit %}{% endif %} + {% endblock %} + {% block submittext %} + {% trans "Continue to step 3" %} + {% endblock %} + {% block onbodyload %} + {{ block.super }} + oscar.dashboard.offers.init(); + {% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/offers/condition_form.html b/tests/django_oscar/oscar/dashboard/offers/condition_form.html new file mode 100644 index 0000000..46fda11 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/condition_form.html @@ -0,0 +1,31 @@ +{% extends 'oscar/dashboard/offers/step_form.html' %} +{% load i18n %} +{% block summary %} + {% include 'oscar/dashboard/offers/summary.html' %}{% endblock %} + {% block progress %} + {% include 'oscar/dashboard/offers/progress.html' with step=3 %}{% endblock %} + {% block form_fields %} + {{ form.non_field_errors }} + {% if form.fields.custom_condition.choices %} +

    {% trans "Build a new condition" %}

    + {% endif %} + {% include "oscar/dashboard/partials/form_field.html" with field=form.range %} +

    + {% url 'dashboard:range-list' as range_list_url %} + {% blocktrans %} + Ranges can be created and edited from within the + + range dashboard + + . + {% endblocktrans %} +

    + {% include "oscar/dashboard/partials/form_field.html" with field=form.type %} + {% include "oscar/dashboard/partials/form_field.html" with field=form.value %} + {% if form.fields.custom_condition.choices %} +

    {% trans "...or choose a pre-defined one" %}

    + {% include "oscar/dashboard/partials/form_field.html" with field=form.custom_condition %}{% endif %} + {% endblock %} + {% block submittext %} + {% trans "Continue to step 4" %} + {% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/offers/metadata_form.html b/tests/django_oscar/oscar/dashboard/offers/metadata_form.html new file mode 100644 index 0000000..14c99ed --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/metadata_form.html @@ -0,0 +1,7 @@ +{% extends 'oscar/dashboard/offers/step_form.html' %} +{% load i18n %} +{% block progress %} + {% include 'oscar/dashboard/offers/progress.html' with step=1 %}{% endblock %} + {% block submittext %} + {% trans "Continue to step 2" %} + {% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/offers/offer_delete.html b/tests/django_oscar/oscar/dashboard/offers/offer_delete.html new file mode 100644 index 0000000..91793d0 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/offer_delete.html @@ -0,0 +1,48 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% trans "Delete offer" %} | {% trans "Offers" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ offer.name }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} +

    + {% trans "Are you sure you want to delete this offer?" %} +

    +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/offers/offer_detail.html b/tests/django_oscar/oscar/dashboard/offers/offer_detail.html new file mode 100644 index 0000000..2721623 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/offer_detail.html @@ -0,0 +1,270 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block title %} + {% blocktrans with name=offer.name %} + {{ name }} | Offers + {% endblocktrans %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + + + + + + + +
    + {% if offer.is_available %} + {% trans "Offer currently available" %} + {% else %} + + {% trans "Offer not available due to restrictions!" %} + + {% endif %} + + {% trans "Total cost:" %} + {{ offer.total_discount|currency }} + + {% trans "Number of orders:" %} + {{ offer.num_orders }} + + {% trans "Number of uses:" %} + {{ offer.num_applications }} +
    +
    +
    + {% trans "Date created:" %} {{ offer.date_created }} +
    +

    {% trans "Offer details" %}

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if offer.is_voucher_offer_type %} + + + + + {% endif %} + +
    {% trans "Name" %}{{ offer.name }} + + {% trans "Edit" %} + +
    {% trans "Description" %}{{ offer.description|safe|default:"-" }}
    {% trans "Type" %} + {{ offer.get_offer_type_display }} +
    + {% trans "Incentive" %} + + {{ offer.benefit.description|safe }} + + + {% trans "Edit" %} + +
    + {% trans "Condition" %} + + {{ offer.condition.description|safe }} + + + {% trans "Edit" %} + +
    + {% trans "Restrictions" %} + + {% for restriction in offer.availability_restrictions %} + {% if not restriction.is_satisfied %} + {{ restriction.description }} +
    + {% else %} + {{ restriction.description }} +
    + {% endif %} + {% endfor %} +
    + + {% trans "Edit" %} + +
    + {% trans "Num of vouchers" %} + + {{ offer.vouchers.count }} +
    + {% if offer.is_voucher_offer_type %} +
    +

    + {% trans "Attached vouchers" %} +

    +
    + + {% if offer.vouchers.exists %} + + + + + + + + + {% for voucher in offer.vouchers.all %} + + + + + + {% endfor %} + + {% else %} + + + + {% endif %} +
    + {% trans "Name" %} + + {% trans "Code" %} + + {% trans "Status" %} +
    + + {{ voucher.name }} + + + {{ voucher.code }} + + {% if voucher.is_active %} + {% trans "Active" %} + {% else %} + {% trans "Inactive" %} + {% endif %} +
    + {% trans "No vouchers are attached to this offer." %} +
    + {% endif %} + {% if order_discounts %} +
    + + {% trans "Export to CSV" %} + +

    + {% trans "Orders that used this offer" %} +

    +
    + + + + + + + + + {% for discount in order_discounts %} + {% with order=discount.order %} + + + + + + + {% endwith %} + {% endfor %} + +
    + {% trans "Order number" %} + + {% trans "Order date" %} + + {% trans "Order total" %} + + {% trans "Cost" %} +
    + + {{ order.number }} + + + {{ order.date_placed }} + + {{ order.total_incl_tax|currency }} + + {{ discount.amount|currency }} +
    + {% include 'oscar/dashboard/partials/pagination.html' %}{% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/offers/offer_list.html b/tests/django_oscar/oscar/dashboard/offers/offer_list.html new file mode 100644 index 0000000..3a2fad3 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/offer_list.html @@ -0,0 +1,226 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load sorting_tags %} +{% load i18n %} +{% load widget_tweaks %} +{% block title %} + {% trans "Offers" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +

    + + {% trans "Search" %} +

    +
    +
    +
    + {% for field in form %} + {% if field.name in form.basic_fields %} + {% if field.is_hidden %} + {{ field }} + {% else %} +
    + {{ field.label_tag }} + {% render_field field class+='form-control' %} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} + {# No help text as it wraps #} +
    + {% endif %} + {% else %} + + {% endif %} + {% endfor %} + + + {% trans "Advanced Search" %} + + + {% trans "Reset" %} + +
    + {# Search modal, if there are form errors the form is automatically openend #} + {% include "oscar/dashboard/partials/advanced_search_modal.html" with form=advanced_form style='horizontal' %} + {% if search_filters %} +
    + + {% for filter in search_filters %} + {{ filter }} + {% endfor %} +
    + {% endif %} +
    +
    + {% csrf_token %} + + + {% if offers %} + + + + {% if form.is_bound %} + {% if form.is_voucher_offer_type or not form.cleaned_data.offer_type %} + + {% endif %} + {% endif %} + + + + + + + + + + + + {% for offer in offers %} + + + + {% if form.is_bound %} + {% if form.is_voucher_offer_type or not form.cleaned_data.offer_type %} + + {% endif %} + {% endif %} + + + + + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    + + {% if search_filters %} + {% trans "Offer Search Results" %} + {% else %} + {% trans "All Offers" %} + {% endif %} +
    {% anchor 'name' _('Offer name') %}{% anchor 'offer_type' _('Offer type') %}{% trans "Num of vouchers" %}{% anchor 'start_datetime' _('Start date') %}{% anchor 'end_datetime' _('End date') %}{% trans "Priority" %}{% trans "Incentive" %}{% trans "Condition" %}{% trans "Is available?" %} + {% trans "Restrictions" %} + + {% anchor 'num_applications' _('Uses') %} + + {% anchor 'total_discount' _('Cost') %} +
    + + {{ offer.name }} + + + {{ offer.offer_type }} + + {{ offer.vouchers.count }} + + {{ offer.start_datetime|default:"-" }} + + {{ offer.end_datetime|default:"-" }} + + {{ offer.priority }} + + {{ offer.benefit.description|safe }} + + {{ offer.condition.description|safe }} + + {% if offer.is_available %} + {% trans "Yes" %} + {% else %} + {% trans "No" %} + {% endif %} + + {% for restriction in offer.availability_restrictions %} + {% if not restriction.is_satisfied %} + + {% else %} + {{ restriction.description }} +
    + {% endif %} + {% endfor %} +
    + {{ offer.num_applications }} + + {{ offer.total_discount|currency }} + +
    + +
    +
    + {% trans "No offers found." %} +
    + {% include "oscar/dashboard/partials/pagination.html" %} +
    +{% endblock dashboard_content %} +{% block onbodyload %} +{{ block.super }} +{% if advanced_form.errors %}$('#SearchModal').modal('show');{% endif %} +{% endblock onbodyload %} diff --git a/tests/django_oscar/oscar/dashboard/offers/progress.html b/tests/django_oscar/oscar/dashboard/offers/progress.html new file mode 100644 index 0000000..79d6504 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/progress.html @@ -0,0 +1,49 @@ +{% load i18n %} +
    +
    +

    {% trans "Steps" %}

    +
    + +
    diff --git a/tests/django_oscar/oscar/dashboard/offers/restrictions_form.html b/tests/django_oscar/oscar/dashboard/offers/restrictions_form.html new file mode 100644 index 0000000..60daffe --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/restrictions_form.html @@ -0,0 +1,11 @@ +{% extends 'oscar/dashboard/offers/step_form.html' %} +{% load i18n %} +{% block summary %} + {% include 'oscar/dashboard/offers/summary.html' %}{% endblock %} + {% block progress %} + {% include 'oscar/dashboard/offers/progress.html' with step=4 %}{% endblock %} + {% block form_actions_buttons %} + + {% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/offers/step_form.html b/tests/django_oscar/oscar/dashboard/offers/step_form.html new file mode 100644 index 0000000..885f634 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/step_form.html @@ -0,0 +1,105 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% if offer.pk %} + {{ offer.name }}: + {% else %} + {% trans "Create new offer" %}: + {% endif %} + {{ title }} | {% trans "Offers" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% if not offer.pk %} + {% trans "Create new offer" %} + {% else %} + {{ offer.name }} + {% endif %} +{% endblock %} +{% block dashboard_content %} +
    +
    + {% block progress %} + {% include 'oscar/dashboard/offers/progress.html' %}{% endblock %} +
    +
    +
    +
    +

    {{ title }}

    +
    +
    + {% csrf_token %} + {% block form_fields %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form %}{% endblock %} + {% block form_extradata %}{% endblock %} +
    + {% block form_actions %} +
    +
    +
    + {% block form_actions_buttons %} + + {% if offer %} + {# When editing offer, show saving button #} + + {% endif %} + {% endblock %} +
    + + {% trans "cancel" %} + +
    +
    + {% endblock form_actions %} +
    +
    + {% if session_offer %} +
    + {% block summary %} + {% include 'oscar/dashboard/offers/summary.html' %}{% endblock %} +
    + {% endif %} +
    + {% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/offers/summary.html b/tests/django_oscar/oscar/dashboard/offers/summary.html new file mode 100644 index 0000000..6add8ab --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/offers/summary.html @@ -0,0 +1,87 @@ +{% load i18n %} +
    +

    {% trans "Offer summary" %}

    +
    +
    + {% if session_offer.name %} +
    + +

    + {% trans "Name" %}: +
    + {{ session_offer.name }} +

    + {% if session_offer.description %} +

    + {% trans "Description" %}: +
    + {{ session_offer.description|safe|striptags|truncatewords:8 }} +

    + {% endif %} +

    + {% trans "Type" %}: +
    + {{ session_offer.offer_type }} +

    +
    +{% endif %} +{% if session_offer.benefit %} +
    + +

    + {% trans "Incentive" %}: +
    + {{ session_offer.benefit.description|safe }} +

    +
    +{% endif %} +{% if session_offer.condition %} +
    + +

    + {% trans "Condition" %}: +
    + {{ session_offer.condition.description|safe }} +

    +
    +{% endif %} +{% if session_offer.pk %} +
    + +

    +{% trans "Restrictions" %}: +

    +{% if offer.availability_restrictions %} +
      + {% for restriction in offer.availability_restrictions %} +
    • + {{ restriction.description }} +
    • + {% endfor %} +
    +{% else %} +- +{% endif %} +
    +{% endif %} +
    diff --git a/tests/django_oscar/oscar/dashboard/orders/line_detail.html b/tests/django_oscar/oscar/dashboard/orders/line_detail.html new file mode 100644 index 0000000..172378e --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/orders/line_detail.html @@ -0,0 +1,272 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {% blocktrans with number=line.order.number id=line.id %} + Order {{ number }} - Line #{{ id }} + {% endblocktrans %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with number=line.order.number id=line.id %} + Order #{{ number }} - Line #{{ id }} + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} +
    +
    +
    +

    {% trans "Product details" %}

    +
    + + + + + + + + + + + + + + + + + + {% if line.attributes.exists %} + + + + {% for attribute in line.attributes.all %} + + + + + {% endfor %} + {% endif %} +
    {% trans "Title" context "Product title" %} + {% if line.product %} + + {{ line.title }} + + {% else %} + {{ line.title }} + {% endif %} +
    {% trans "Product Type" %}{{ line.product.get_product_class }}
    {% trans "UPC" %}{{ line.upc|default:"-" }}
    {% trans "Quantity" %}{{ line.quantity }}
    {% trans "Product Options" %}
    {{ attribute.option }}{{ attribute.value }}
    +
    +
    +
    +

    + {% trans "Partner details" %} +

    +
    + + + + + + + + + + + + + +
    + {% trans "Status" %} + + {{ line.status|default:"-" }} +
    + {% trans "Partner" %} + + {{ line.partner_name }} +
    + {% trans "Partner SKU" %} + + {{ line.partner_sku }} +
    +
    +
    +
    +

    + {% trans "Shipping details" %} +

    +
    + + + + + + + + + +
    + {% trans "Partner reference number" %} + + {{ line.partner_line_reference|default:"-" }} +
    + {% trans "Partner notes" %} + + {{ line.partner_line_notes|default:"-" }} +
    +
    +
    +
    +
    +
    +

    + {% trans "Shipping status" %} +

    +
    + + + + + + + + + {% for state in line.shipping_event_breakdown.values %} + + + + + {% empty %} + + + + {% endfor %} + +
    + {% trans "State" %} + + {% trans "Quantity" %} +
    + {{ state.event_type.name }} + + {{ state.quantity }} +
    {% trans "No shipping events have occurred." %}
    +
    +
    +
    +

    + {% trans "Shipping events" %} +

    +
    + + + + + + + + + + + {% for event_qty in line.shipping_event_quantities.all %} + + {% with event=event_qty.event %} + + + + + {% endwith %} + + {% empty %} + + + + {% endfor %} + +
    + {% trans "Event" %} + + {% trans "Quantity" %} + + {% trans "Reference" %} + + {% trans "Date" %} +
    + {{ event.event_type.name }} + + {{ event_qty.quantity }} + + {{ event.notes }} + + {{ event.date_created }} +
    {% trans "No shipping events have occurred." %}
    +
    +
    +
    +

    + {% trans "Payment events" %} +

    +
    + + + + + + + + + + {% for event_qty in line.payment_event_quantities.all %} + + {% with event=event_qty.event %} + + + + {% endwith %} + + {% empty %} + + + + {% endfor %} + +
    + {% trans "Event" %} + + {% trans "Quantity" %} + + {% trans "Date" %} +
    + {{ event.event_type.name }} + + {{ event_qty.quantity }} + + {{ event.date_created }} +
    {% trans "No payment events have occurred." %}
    +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/orders/order_detail.html b/tests/django_oscar/oscar/dashboard/orders/order_detail.html new file mode 100644 index 0000000..57811f1 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/orders/order_detail.html @@ -0,0 +1,1088 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load currency_filters %} +{% block body_class %}{{ block.super }} orders{% endblock %} +{% block title %} + {% blocktrans with number=order.number %} + Order {{ number }} + {% endblocktrans %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with number=order.number %} + Order #{{ number }} + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} + {% block customer_information %} + + + {% if order.guest_email %} + + + + + + + + + {% elif order.user %} + + + + + + + + + {% else %} + + + + {% endif %} +
    + + {% trans "Customer Information" %} +
    {% trans "Name" %}{% trans "Email address" %}
    {% trans "Customer checked out as a guest." %}{{ order.email }}
    {% trans "Name" %}{% trans "Email address" %}
    {{ order.user.get_full_name|default:"-" }}{{ order.user.email|default:"-" }}
    {% trans "Customer has deleted their account." %}
    + {% endblock customer_information %} + {% block order_information %} + + + + + + + + + + + + + + +
    + + {% trans "Order information" %} +
    {% trans "Order Total" %} + {% trans "Date of purchase" %} + + {% trans "Time of purchase" %} + + {% trans "Status" %} +
    + {{ order.total_incl_tax|currency:order.currency }} + + {{ order.date_placed|date }} + + {{ order.date_placed|time }} + + {{ order.status|default:"N/A" }} +
    + {% endblock order_information %} + {% block additional_order_information %}{% endblock additional_order_information %} +
    +

    + {% trans "Order Details" %} +

    +
    +
    + +
    +
    +
    +

    + {% trans "Items ordered" %} +

    +
    +
    +{% csrf_token %} +{% block order_lines %} + + + + + + + + + + + + + + + + + + + {% for line in lines %} + + + + + + + + + + + + + + + {% endfor %} + + + + + + + + {% with discounts=order.basket_discounts %} + {% if discounts %} + + + + + + + + {% for discount in discounts %} + + + + + + + + {% endfor %} + + + + + + + + {% else %} + + + + + + + + {% endif %} + {% endwith %} + {% if order.has_shipping_discounts %} + + + + + + + + {% for discount in order.shipping_discounts %} + + + + + + + + {% endfor %} + + + + + + + + {% else %} + + + + + + + + {% endif %} + {% with surcharges=order.surcharges.all %} + {% if surcharges %} + {% for charge in surcharges %} + + + + + + + + {% endfor %} + {% endif %} + {% endwith %} + + + + + + + + +
    + {% trans "Line ID" %} + + {% trans "Quantity" %} + + {% trans "Product" %} + + {% trans "UPC" %} + + {% trans "Status" %} + + {% trans "Supplier" %} + + {% trans "Supplier SKU" %} + + {% trans "Price excl tax (before discounts)" %} + + {% trans "Price inc tax (before discounts)" %} + + {% trans "Actions" %} +
    + + + + + + #{{ line.id }} + + + {{ line.quantity }} + + {% if line.product %} + + {{ line.title }} + + {% else %} + {{ line.title }} + {% endif %} + + {{ line.upc|default:"-" }} + + {{ line.status|default:"-" }} + + {% if line.partner %} + + {{ line.partner_name }} + + {% else %} + {{ line.partner_name }} + {% endif %} + + {{ line.partner_sku }} + + {{ line.line_price_before_discounts_excl_tax|currency:order.currency }} + + {{ line.line_price_before_discounts_incl_tax|currency:order.currency }} + + + {% trans "View" %} + +
    + {% trans "Discount" %} + + {{ order.total_discount_excl_tax|currency:order.currency }} + + {{ order.total_discount_incl_tax|currency:order.currency }} +
    + {% trans "Basket total (excl. discounts)" %} + + {{ order.basket_total_before_discounts_excl_tax|currency:order.currency }} + + {{ order.basket_total_before_discounts_incl_tax|currency:order.currency }} +
    + {% trans "Discount" %} + {{ discount.offer_name }} + - {{ discount.amount|currency:order.currency }}
    + {% trans "Basket total (inc. discounts)" %} + + {{ order.basket_total_excl_tax|currency:order.currency }} + + {{ order.basket_total_incl_tax|currency:order.currency }} +
    + {% trans "Basket total" %} + + {{ order.basket_total_excl_tax|currency:order.currency }} + + {{ order.basket_total_incl_tax|currency:order.currency }} +
    + {% trans "Shipping total (excl. discounts)" %} + + {{ order.shipping_before_discounts_excl_tax|currency:order.currency }} + + {{ order.shipping_before_discounts_incl_tax|currency:order.currency }} +
    + + {% trans "Discount" %} + + {{ discount.offer_name }} + + - {{ discount.amount|currency:order.currency }} +
    + {% trans "Shipping total (inc. discounts)" %} + + {{ order.shipping_excl_tax|currency:order.currency }} + + {{ order.shipping_incl_tax|currency:order.currency }} +
    + {% trans "Shipping total" %} + + {{ order.shipping_excl_tax|currency:order.currency }} + + {{ order.shipping_incl_tax|currency:order.currency }} +
    + {% blocktrans with name=charge.name %}Surcharge {{ name }}{% endblocktrans %} + + {{ charge.excl_tax|currency:order.currency }} + + {{ charge.incl_tax|currency:order.currency }} +
    + {% trans "Order total" %} + + {{ order.total_excl_tax|currency:order.currency }} + + {{ order.total_incl_tax|currency:order.currency }} +
    +{% endblock order_lines %} +{% comment %} +This is the important block within this template: you will almost certainly want to +override this block to provide your own form widgets that suit your order processing +flow. The default contents shows a range of widgets - more than is sensible really. +{% endcomment %} +{% block line_actions %} +
    +

    + {% trans "With selected lines" %}: +

    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    +{% endblock line_actions %} +
    +
    +{% csrf_token %} +{% block order_actions %} +
    +

    + + {% trans "Change order status" %}: +

    +{% if order_status_form.has_choices %} + {% include "oscar/dashboard/partials/form_fields.html" with form=order_status_form %} + +
    + +
    +{% else %} + {% trans "This order can't have its status changed." %} +{% endif %} +
    +{% endblock %} +
    +{% block order_status_changes %} +
    +

    +{% trans "Status Changes" %} +

    +
    +{% with status_changes=order.status_changes.all %} + +{% if status_changes %} + + + + + + + + + {% for status_change in status_changes %} + + + + + + {% endfor %} + +{% else %} + + + + + +{% endif %} +
    + {% trans "From" %} + + {% trans "To" %} + + {% trans "Date" %} +
    + {{ status_change.old_status }} + + {{ status_change.new_status }} + + {{ status_change.date_created }} +
    + {% trans "No status changes." %} +
    +{% endwith %} +{% endblock %} +{% block shipping_events %} +
    +

    +{% trans "Shipping Events" %} +

    +
    +{% with events=order.shipping_events.all %} + +{% if events %} + + + + + + + + + +{% for event in events %} + {% with line_qtys=event.line_quantities.all %} + + + + + + +{% endwith %} +{% endfor %} + +{% else %} + + + + + +{% endif %} +
    + {% trans "Date" %} + + {% trans "Event" %} + + {% trans "Lines" %} + + {% trans "Reference" %} +
    + {{ event.date_created }} + + {{ event.event_type.name }} + + {% for line_qty in event.line_quantities.all %} + + {% blocktrans with title=line_qty.line.title event_qty=line_qty.quantity total_qty=line_qty.line.quantity %} + {{ title }} (quantity {{ event_qty }}/{{ total_qty }}) + {% endblocktrans %} + + {% endfor %} + + {{ event.notes|default:"-" }} +
    + {% trans "No shipping events." %} +
    +{% endwith %} +{% endblock %} +{% block payment_events %} +
    +

    {% trans "Payment Events" %} +

    +
    +{% with events=order.payment_events.all %} + +{% if events %} + + + + + + + + + + +{% for event in events %} +{% with line_qtys=event.line_quantities.all %} + + + + + + + +{% endwith %} +{% endfor %} + +{% else %} + + + + + +{% endif %} +
    +{% trans "Date" %} + +{% trans "Event" %} + +{% trans "Amount" %} + +{% trans "Lines" %} + +{% trans "Reference" %} +
    {{ event.date_created }} +{{ event.event_type.name }} +{{ event.amount|currency:order.currency }} + + {% for line_qty in event.line_quantities.all %} + {% trans "Product:" %} {{ line_qty.line.title }} - {% trans "quantity" %} {{ line_qty.quantity }} +
    + {% endfor %} +
    {{ event.reference|default:"-" }} +
    +{% trans "No payment events." %} +
    +{% endwith %} +{% endblock %} +
    +
    +{% block tab_shipping %} +
    +

    +{% trans "Shipping" %} +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +{% trans "Method name" %} + +{{ order.shipping_method }} +
    +{% trans "Method code" %} + +{{ order.shipping_code|upper }} +
    +{% trans "Charge (incl tax)" %} + +{{ order.shipping_incl_tax|currency:order.currency }} +
    +{% trans "Charge (excl tax)" %} + +{{ order.shipping_excl_tax|currency:order.currency }} +
    +{% trans "Address" %} + +{% for field in order.shipping_address.active_address_fields %} +{{ field }} +
    +{% endfor %} + +{% trans "Update" %} + +
    +{% trans "Phone" %} + +{{ order.shipping_address.phone_number|default:"-" }} +
    +{% trans "Instructions" %} + +{{ order.shipping_address.notes|default:"-"|linebreaks }} +
    +{% endblock %} +
    +
    +{% block tab_payment %} +{% if order.billing_address %} +
    +

    {% trans "Billing address" %} +

    +
    +

    +{% for field in order.billing_address.active_address_fields %} +{{ field }} +
    +{% endfor %} +

    +{% endif %} +{% with sources=order.sources.all %} +
    +

    {% trans "Payment sources" %} +

    +
    +{% if sources %} + + + + + + + + + + + +{% for source in sources %} + + + + + + + +{% endfor %} + +
    +{% trans "Source" %} + +{% trans "Allocation" %} + +{% trans "Amount debited" %} + +{% trans "Amount refunded" %} + +{% trans "Reference" %} +
    +{{ source.source_type }} + +{{ source.amount_allocated|currency:order.currency }} + +{{ source.amount_debited|currency:order.currency }} + +{{ source.amount_refunded|currency:order.currency }} + +{{ source.reference|default:"-" }} +
    +{% else %} + + + + +
    +{% trans "No payment sources found for this order." %} +
    +{% endif %} +{% endwith %} +{% block payment_transactions %} +{% if payment_transactions %} +
    +

    +{% trans "Transactions" %} +

    +
    + + + + + + + + + + + +{% for txn in payment_transactions %} + + + + + + + +{% endfor %} + +
    +{% trans "Source" %} + +{% trans "Amount" %} + +{% trans "Reference" %} + +{% trans "Status" %} + +{% trans "Date" %} +
    +{{ txn.source.source_type }} + +{{ txn.amount|currency:order.currency }} + +{{ txn.reference|default:"-" }} + +{{ txn.status|default:"-" }} + +{{ txn.date_created }} +
    +{% endif %} +{% endblock %} +{% endblock %} +
    +
    +{% block tab_discounts %} +{% with discounts=order.discounts.all %} +
    +

    +{% trans "Discounts" %} +

    +
    +{% if discounts %} + + + + + + + + + + + + +{% for discount in discounts %} + + + + + + + + +{% endfor %} + +
    +{% trans "Type" %} + +{% trans "Voucher" %} + +{% trans "Offer name" %} + +{% trans "Frequency" %} + +{% trans "Message" %} + +{% trans "Amount" %} +
    +{{ discount.get_category_display }} + +{{ discount.voucher.code|default:"-" }} + +{% if discount.offer %} + +{{ discount.offer.name }} + +{% else %} +{{ discount.offer_name }} +{% endif %} + +{{ discount.frequency }} + +{{ discount.message|default:"-" }} + +{{ discount.amount|currency:order.currency }} +
    +{% else %} + + + + +
    +{% trans "No discounts were applied to this order." %} +
    +{% endif %} +{% endwith %} +{% endblock %} +
    +
    +{% block tab_notes %} +
    +

    +{% trans "Notes" %} +

    +
    +{% with notes=order.notes.all %} + +{% if notes %} + + + + + + + +{% for note in notes %} + + + + + + + +{% endfor %} +{% else %} + + + +{% endif %} +
    +{% trans "Date" %} + +{% trans "User" %} + +{% trans "Type" %} + +{% trans "Message" %} + +{% trans "Admin" %} +
    +{{ note.date_created }} + +{{ note.user|default:"-" }} + +{{ note.note_type|default:"-" }} + +{{ note.message|linebreaks }} + +{% if note.is_editable %} + +{% trans "Edit" %} + +
    +{% csrf_token %} + + + +
    +{% endif %} +
    +{% trans "No notes available." %} +
    +{% endwith %} +
    +{% csrf_token %} + +{% include "oscar/dashboard/partials/form_fields.html" with form=note_form %} +
    + +{% trans "Notes are only editable for 5 minutes after being saved." %} +
    +
    +{% endblock %} +
    +{% block extra_tabs %}{% endblock %} +
    +
    +{% endblock dashboard_content %} +{% block onbodyload %} +{{ block.super }} +oscar.dashboard.orders.initTabs(); +oscar.dashboard.orders.initTable(); +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/orders/order_list.html b/tests/django_oscar/oscar/dashboard/orders/order_list.html new file mode 100644 index 0000000..42d6337 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/orders/order_list.html @@ -0,0 +1,231 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load sorting_tags %} +{% load i18n %} +{% load widget_tweaks %} +{% block body_class %}{{ block.super }} orders{% endblock %} +{% block title %} + {% trans "Orders" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +

    + + {% trans "Search" %} +

    +
    +
    +
    + {% for field in form %} + {% if "order" in field.id_for_label %} + {% if field.is_hidden %} + {% render_field field class+='form-control' %} + {% else %} +
    + {{ field.label_tag }} + {% render_field field class+='form-control' %} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} +
    + {% endif %} + {% endif %} + {% endfor %} + + + {% trans "Advanced Search" %} + +
    + {# Search modal, if there are form errors the form is automatically openend #} + {% include "oscar/dashboard/partials/advanced_search_modal.html" with form=form style='horizontal' %} + {% if search_filters %} +
    + + {% for filter in search_filters %} + {{ filter }} + {% endfor %} +
    + {% endif %} +
    + {% if orders %} +
    + {% csrf_token %} + {% block order_list %} + + + + + + + + + + + + + + + + + + {% for order in orders %} + + + + + + + + + + + + + {% endfor %} + +
    +

    + + {% if search_filters %} + {% trans "Order Search Results" %} + {% else %} + {% trans "All Orders" %} + {% endif %} +

    +
    +
    + + +
    +
    +
    {% anchor 'number' _("Order number") %}{% anchor 'total_incl_tax' _("Total inc tax") %}{% trans "Number of items" %}{% trans "Status" %}{% trans "Customer" %}{% trans "Shipping address" %}{% trans "Billing address" %}{% trans "Date of purchase" %}
    + + + + {{ order.number }} + + + {{ order.total_incl_tax|currency:order.currency }} + + {{ order.num_items }} + + {{ order.status|default:"-" }} + + {% if order.guest_email %} + {{ order.guest_email }} + {% elif order.user %} + + {{ order.user.get_full_name|default:"-" }} + + {% else %} + <{% trans "Deleted" %}> + {% endif %} + + {{ order.shipping_address|default:"-" }} + + {{ order.billing_address|default:"-" }} + + {{ order.date_placed }} + + + {% trans "View" %} + +
    + {% endblock order_list %} + {% block order_actions %} +
    +

    + + {% trans "Change order status" %}: +

    + {% if order_statuses %} +
    +
    + +
    +
    +
    + +
    + {% else %} + {% trans "This order can't have its status changed." %} + {% endif %} +
    + {% endblock %} + {% include "oscar/dashboard/partials/pagination.html" %} +
    + {% else %} + + + + + +
    + + {% if search_filters %} + {% trans "Order Search Results" %} + {% else %} + {% trans "All Orders" %} + {% endif %} +
    + {% trans "No orders found." %} +
    + {% endif %} +{% endblock dashboard_content %} +{% block onbodyload %} + {{ block.super }} + oscar.dashboard.orders.initTable(); + {% if form.errors %}$('#SearchModal').modal('show');{% endif %} +{% endblock onbodyload %} diff --git a/tests/django_oscar/oscar/dashboard/orders/shippingaddress_form.html b/tests/django_oscar/oscar/dashboard/orders/shippingaddress_form.html new file mode 100644 index 0000000..67c708d --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/orders/shippingaddress_form.html @@ -0,0 +1,49 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {% trans "Shipping address" %} | {% trans "Order" %} {{ order.number }} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans %} + Edit shipping address for order {{ order.number }} + {% endblocktrans %} +{% endblock %} +{% block content %} +
    + {% csrf_token %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form style='horizontal' %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock content %} diff --git a/tests/django_oscar/oscar/dashboard/orders/statistics.html b/tests/django_oscar/oscar/dashboard/orders/statistics.html new file mode 100644 index 0000000..0f38781 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/orders/statistics.html @@ -0,0 +1,87 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% load django_tables2 %} +{% block body_class %}{{ block.super }} orders{% endblock %} +{% block title %} + {% trans "Order statistics" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    +

    + + {% trans "Filter" %} +

    +
    +
    +
    + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=form %} + + + {% trans "Reset" %} + +
    +
    + + + + + + + + + + + + + + +
    + + {% trans "Summary" %} +
    {% trans "Total orders" %}{{ total_orders }}
    {% trans "Total lines" %}{{ total_lines }}
    {% trans "Total revenue" %}{{ total_revenue|currency }}
    + {% if order_status_breakdown %} + + + + + + + {% for dict in order_status_breakdown %} + + + + + {% endfor %} +
    + + {% trans "Order status breakdown" %} +
    {% trans "Status" %}{% trans "Frequency" %}
    + + {{ dict.status }} + + {{ dict.freq }}
    + {% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/pages/delete.html b/tests/django_oscar/oscar/dashboard/pages/delete.html new file mode 100644 index 0000000..08d2f6b --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/pages/delete.html @@ -0,0 +1,61 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% blocktrans with title=object.title %} + Delete page '{{ title }}'? + {% endblocktrans %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with title=object.title %} + Delete page '{{ title }}'? + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} +
    +

    {% trans "Delete page" %}

    +
    +
    + {% csrf_token %} + {{ form }} +

    + {% blocktrans with title=object.title %} + Delete page + {{ title }} + - are you sure? + {% endblocktrans %} +

    +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/pages/index.html b/tests/django_oscar/oscar/dashboard/pages/index.html new file mode 100644 index 0000000..6abccc4 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/pages/index.html @@ -0,0 +1,122 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load dashboard_tags %} +{% load i18n %} +{% block body_class %}{{ block.super }} pages{% endblock %} +{% block title %} + {% trans "Pages" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +

    + + {% trans "Search" %} +

    +
    +
    +
    + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=form %} + + + {% trans "Reset" %} + +
    +
    +
    +

    + + {{ queryset_description }} +

    +
    + {% if flatpage_list %} +
    + {% csrf_token %} + + + + + + + + + + {% for page in flatpage_list %} + + + + + + {% endfor %} + +
    {% trans "Title" context "Page title" %}{% trans "URL" %}
    + + {{ page.title }} + + + + {{ page.url }} + + + +
    + {% include "oscar/dashboard/partials/pagination.html" %} +
    + {% else %} + + + + +
    {% trans "No pages found." %}
    + {% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/pages/messages/saved.html b/tests/django_oscar/oscar/dashboard/pages/messages/saved.html new file mode 100644 index 0000000..ffa4516 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/pages/messages/saved.html @@ -0,0 +1,16 @@ +{% load i18n %} +

    + {% blocktrans with title=page.title %} + Page + {{ title }} + saved! + {% endblocktrans %} +

    +

    + + {% trans "View on site" %} + + + {% trans "Edit again" %} + +

    diff --git a/tests/django_oscar/oscar/dashboard/pages/update.html b/tests/django_oscar/oscar/dashboard/pages/update.html new file mode 100644 index 0000000..a1de567 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/pages/update.html @@ -0,0 +1,43 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page pages{% endblock %} +{% block title %}{{ title }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    +

    {{ title }}

    +
    +
    + {% csrf_token %} + {% include 'oscar/dashboard/partials/form_fields.html' with form=form %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/partials/advanced_search_modal.html b/tests/django_oscar/oscar/dashboard/partials/advanced_search_modal.html new file mode 100644 index 0000000..eabd295 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/advanced_search_modal.html @@ -0,0 +1,28 @@ +{% load i18n %} + diff --git a/tests/django_oscar/oscar/dashboard/partials/alert_messages.html b/tests/django_oscar/oscar/dashboard/partials/alert_messages.html new file mode 100644 index 0000000..30c9b1d --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/alert_messages.html @@ -0,0 +1,40 @@ +{% load string_filters %} +{% comment %} +Use message tags to control these alerts. Available tags include: +- safe: allow HTML in the message +- block: for longer messages - this adds extra padding +- noicon: don't show an icon +- error/success/info - these change the connotation of the alert +{% endcomment %} +
    +{% if messages %} + {% for message in messages %} + +{% endfor %} +{% endif %} +
    diff --git a/tests/django_oscar/oscar/dashboard/partials/form.html b/tests/django_oscar/oscar/dashboard/partials/form.html new file mode 100644 index 0000000..8338f21 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/form.html @@ -0,0 +1,22 @@ +{% load i18n %} +
    + {% if not method == "get" %} + {% csrf_token %} + {% endif %} + {% include 'oscar/dashboard/partials/form_fields.html' %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    diff --git a/tests/django_oscar/oscar/dashboard/partials/form_field.html b/tests/django_oscar/oscar/dashboard/partials/form_field.html new file mode 100644 index 0000000..8add45f --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/form_field.html @@ -0,0 +1,60 @@ +{% load form_tags %} +{% load widget_tweaks %} +{% if field.is_hidden %} + {{ field }} +{% else %} + {% comment %} + Make the field widget type available to templates so we can mark-up + checkbox and radio inputs differently to other widgets. +{% endcomment %} +{% annotate_form_field field %} +{% block control_group %} +
    + {% block label %} + {% if not nolabel and field.widget_type != 'checkbox' %} + + {% endif %} +{% endblock %} +{% block controls %} +
    + {% block widget %} + {% if field.widget_type == 'checkbox' %} + {% render_field field class+="form-check-input" %} + + {% elif field.widget_type == 'radioselect' %} + {% render_field field class+="form-check-input position-static controls mt-2" %} + {% else %} + {% render_field field class+="form-control" %} + {% endif %} +{% endblock %} +{% block errors %} + {% for error in field.errors %} + + + {{ error }} + + {% endfor %} +{% endblock %} +{% block help_text %} + {% if field.help_text %} + + {# We allow HTML within form help fields #} + {{ field.help_text|safe }} + + {% endif %} +{% endblock %} +
    +{% endblock %} +
    +{% endblock %} +{% endif %} diff --git a/tests/django_oscar/oscar/dashboard/partials/form_fields.html b/tests/django_oscar/oscar/dashboard/partials/form_fields.html new file mode 100644 index 0000000..3a18506 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/form_fields.html @@ -0,0 +1,19 @@ +{% load i18n %} +{% if form.is_bound and not form.is_valid %} +
    + {% trans "Oops! We found some errors" %} + - {% trans "please check the error messages below and try again" %} +
    +{% endif %} +{% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
    + + + {{ error }} + +
    + {% endfor %} +{% endif %} +{% for field in form %} + {% include 'oscar/dashboard/partials/form_field.html' with field=field style=style %}{% endfor %} diff --git a/tests/django_oscar/oscar/dashboard/partials/form_fields_inline.html b/tests/django_oscar/oscar/dashboard/partials/form_fields_inline.html new file mode 100644 index 0000000..3653e91 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/form_fields_inline.html @@ -0,0 +1,20 @@ +{% load widget_tweaks %} +{{ form.non_field_errors }} +{% for field in form %} + {% if field.is_hidden %} + {{ field }} + {% else %} +
    + {{ field.label_tag }} + {% render_field field class+='form-control' %} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} + {# No help text as it wraps #} +
    +{% endif %} +{% endfor %} diff --git a/tests/django_oscar/oscar/dashboard/partials/pagination.html b/tests/django_oscar/oscar/dashboard/partials/pagination.html new file mode 100644 index 0000000..8931ce0 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/pagination.html @@ -0,0 +1,31 @@ +{% load display_tags %} +{% load i18n %} +{% if paginator.num_pages > 1 %} + +{% endif %} diff --git a/tests/django_oscar/oscar/dashboard/partials/product_images.html b/tests/django_oscar/oscar/dashboard/partials/product_images.html new file mode 100644 index 0000000..217e98f --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/product_images.html @@ -0,0 +1,37 @@ +{% load i18n %} +
  • + {% for field in form %} + {% if field.is_hidden %} + {{ field }} + {% elif "original" in field.id_for_label %} +
    + {{ field }} +
    + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} + + + {% trans "Re-order" context "Change the sequence order" %} + +
    + {% else %} + {{ field.label_tag }} + {{ field }} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} + {% endif %} +{% endfor %} +{{ form.non_field_errors }} +
  • diff --git a/tests/django_oscar/oscar/dashboard/partials/stock_info.html b/tests/django_oscar/oscar/dashboard/partials/stock_info.html new file mode 100644 index 0000000..e186252 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partials/stock_info.html @@ -0,0 +1,13 @@ +
    + {{ field.label_tag }} +
    + {{ field }} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} +
    +
    diff --git a/tests/django_oscar/oscar/dashboard/partners/messages/user_unlinked.html b/tests/django_oscar/oscar/dashboard/partners/messages/user_unlinked.html new file mode 100644 index 0000000..2e1f4b3 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/messages/user_unlinked.html @@ -0,0 +1,7 @@ +{% load i18n %} +{% blocktrans %} + User {{ user_name }} was unlinked from {{ partner_name }}. +{% endblocktrans %} + + {% trans 'Undo' %}. + diff --git a/tests/django_oscar/oscar/dashboard/partners/partner_delete.html b/tests/django_oscar/oscar/dashboard/partners/partner_delete.html new file mode 100644 index 0000000..bd119f3 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/partner_delete.html @@ -0,0 +1,48 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% trans "Delete partner" %} | {% trans "Partners" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ partner.name }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} +

    + {% trans "Are you sure you want to delete this partner?" %} +

    +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/partners/partner_form.html b/tests/django_oscar/oscar/dashboard/partners/partner_form.html new file mode 100644 index 0000000..dc70483 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/partner_form.html @@ -0,0 +1,32 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load category_tags %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page partner{% endblock %} +{% block title %} + {{ title }} | {% trans "Partners" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    + {% include 'oscar/dashboard/partials/form.html' with form=form %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/partners/partner_list.html b/tests/django_oscar/oscar/dashboard/partners/partner_list.html new file mode 100644 index 0000000..6c0fada --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/partner_list.html @@ -0,0 +1,138 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load sorting_tags %} +{% load i18n %} +{% block title %} + {% trans "Partners" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +
    + {% include 'oscar/dashboard/partials/form_fields_inline.html' with form=form %} + + {% if is_filtered %} + + {% trans "Reset" %} + + {% endif %} +
    +
    +
    + {% csrf_token %} + + + {% if partners %} + + + + + + + {% for partner in partners %} + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    + + {{ queryset_description }} +
    {% anchor 'name' _('Name') %}{% trans 'Users' %}{% trans 'Addresses' %} 
    + + {{ partner.name }} + + + {% with users=partner.users.all %} + {% if users %} + + {% else %} + {% trans 'No users associated.' %} + {% endif %} + {% endwith %} + + {% with addresses=partner.addresses.all %} + {% if addresses %} +
      + {% for address in addresses %} +
    • + {{ address.summary }} +
    • + {% endfor %} +
    + {% else %} + {% trans 'No address associated.' %} + {% endif %} + {% endwith %} +
    + +
    {% trans "No partners found." %}
    +{% include "oscar/dashboard/partials/pagination.html" %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/partners/partner_manage.html b/tests/django_oscar/oscar/dashboard/partners/partner_manage.html new file mode 100644 index 0000000..56738b6 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/partner_manage.html @@ -0,0 +1,88 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page partners{% endblock %} +{% block title %} + {{ partner.name }} | {% trans "Partners" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ partner.name }}{% endblock %} +{% block dashboard_content %} +
    +
    +
    +

    {{ title }}

    +
    + {% include "oscar/dashboard/partials/form.html" with form=form class="card card-body" %} +
    +
    +
    +
    +

    {% trans "Users" %}

    + {% if users %} + + + + + + + + + + + {% for user in users %} + + + + + + + {% endfor %} + +
    {% trans 'Email' %}{% trans 'First name' %}{% trans 'Last name' %} 
    + + {{ user.email }} + + {{ user.first_name|default:"-" }}{{ user.last_name|default:"-" }} +
    + {% csrf_token %} + +
    +
    + {% else %} +

    + {% trans "No users linked." %} +

    + {% endif %} + +
    + {% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/partners/partner_user_form.html b/tests/django_oscar/oscar/dashboard/partners/partner_user_form.html new file mode 100644 index 0000000..f335d5c --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/partner_user_form.html @@ -0,0 +1,50 @@ +{% extends "oscar/dashboard/layout.html" %} +{% load category_tags %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page partner{% endblock %} +{% block title %} + {{ title }} | {{ partner.name }} | {% trans "Partners" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} + {% include 'oscar/dashboard/partials/form_fields.html' with form=form %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/partners/partner_user_list.html b/tests/django_oscar/oscar/dashboard/partners/partner_user_list.html new file mode 100644 index 0000000..8a77a5a --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/partner_user_list.html @@ -0,0 +1,86 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {% trans "Partners" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + {% if users %} + + + + + + + + + + + {% for user in users %} + + + + + + + {% endfor %} + +
    {% trans 'Email' %}{% trans 'First name' %}{% trans 'Last name' %} 
    + + {{ user.email }} + + {{ user.first_name|default:"-" }}{{ user.last_name|default:"-" }} +
    + {% csrf_token %} + +
    +
    + {% else %} +

    + {% trans "No users linked." %} +

    + {% endif %} + {% include "oscar/dashboard/partials/pagination.html" %} +

    {% trans "Update details" %}

    + {% include 'oscar/dashboard/partials/form.html' %}{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/partners/partner_user_select.html b/tests/django_oscar/oscar/dashboard/partners/partner_user_select.html new file mode 100644 index 0000000..6618872 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/partners/partner_user_select.html @@ -0,0 +1,102 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {% trans "Link an existing user" %} | {{ partner.name }} | {% trans "Partners" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Link an existing user" %} +{% endblock %} +{% block dashboard_content %} + {% block users_form %} +
    +
    + {% include 'oscar/dashboard/partials/form_fields_inline.html' with form=form %} + + {% if form.is_bound %} + + {% trans "Reset" %} + + {% endif %} +
    + {% trans "A partial email address can be entered (eg '@example.com') to match multiple addresses." %} +
    +
    +
    + {% endblock %} + {% if form.is_bound %} + {% if users %} + {% with partner_users=partner.users.all %} + + {% block users_header %} + + + + + + + + + {% endblock %} + + {% for user in users %} + {% block users_row %} + + + + + + + {% endblock %} + {% endfor %} + +
    {% trans 'Email' %}{% trans 'First name' %}{% trans 'Last name' %} 
    {{ user.email }}{{ user.first_name|default:"-" }}{{ user.last_name|default:"-" }} + {% if user in partner_users %} + {% blocktrans with name=partner.name %} + User is already linked to {{ name }}. + {% endblocktrans %} + {% else %} +
    + {% csrf_token %} + +
    + {% endif %} +
    + {% endwith %} + {% include "oscar/dashboard/partials/pagination.html" %} + {% else %} + {% trans "No users found." %} + {% endif %} +{% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/ranges/messages/range_products_saved.html b/tests/django_oscar/oscar/dashboard/ranges/messages/range_products_saved.html new file mode 100644 index 0000000..6e335b2 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/ranges/messages/range_products_saved.html @@ -0,0 +1,55 @@ +{% load i18n %} +{% blocktrans with range_name=range.name filename=upload.filepath %} +

    + File + {{ filename }} + processed. +

    +{% endblocktrans %} +
      + {% if upload.num_new_skus %} +
    • + {% blocktrans count n=upload.num_new_skus %} + {{ n }} + product added + {% plural %} + {{ n }} + products added + {% endblocktrans %} +
    • + {% endif %} + {% if upload.num_duplicate_skus %} +
    • + {% blocktrans count n=upload.num_duplicate_skus %} + There was + {{ n }} + duplicate product in the file + {% plural %} + There were + {{ n }} + duplicate products in the file + {% endblocktrans %} +
    • + {% endif %} + {% if upload.num_unknown_skus %} +
    • + {% blocktrans count n=upload.num_unknown_skus %} + There was + {{ n }} + product in the file that couldn't be found in the catalogue + {% plural %} + There were + {{ n }} + products in the file that couldn't be found in the catalogue + {% endblocktrans %} +
    • + {% endif %} +
    +

    + + {% trans "Edit range metadata" %} + + + {% trans "Return to ranges homepage" %} + +

    diff --git a/tests/django_oscar/oscar/dashboard/ranges/messages/range_saved.html b/tests/django_oscar/oscar/dashboard/ranges/messages/range_saved.html new file mode 100644 index 0000000..60397e9 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/ranges/messages/range_saved.html @@ -0,0 +1,16 @@ +{% load i18n %} +{% blocktrans with name=range.name %} +

    + Range + {{ name }} + saved. +

    +{% endblocktrans %} +

    + + {% trans "Edit again" %} + + + {% trans "Edit included products" %} + +

    diff --git a/tests/django_oscar/oscar/dashboard/ranges/range_delete.html b/tests/django_oscar/oscar/dashboard/ranges/range_delete.html new file mode 100644 index 0000000..399f25d --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/ranges/range_delete.html @@ -0,0 +1,51 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% blocktrans with name=range.name %} + Delete range '{{ name }}'? + {% endblocktrans %} + | {% trans "Ranges" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ range.name }}{% endblock %} +{% block dashboard_content %} +
    +

    + {% trans "Are you sure you want to delete this range?" %} +

    + {% csrf_token %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/ranges/range_form.html b/tests/django_oscar/oscar/dashboard/ranges/range_form.html new file mode 100644 index 0000000..b852677 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/ranges/range_form.html @@ -0,0 +1,58 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {{ title }} | {% trans "Ranges" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% if range %} + {{ range.name }} + {% else %} + {% trans "Create new range" %} + {% endif %} +{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form %} + {% block form_actions %} +
    + + {% trans "or" %} + {# This is an input so we distinguish between which button was pressed #} + + {% trans "or" %} + + {% trans "cancel" %} + +
    + {% endblock form_actions %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/ranges/range_list.html b/tests/django_oscar/oscar/dashboard/ranges/range_list.html new file mode 100644 index 0000000..f7d37c1 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/ranges/range_list.html @@ -0,0 +1,118 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {% trans "Ranges" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + + + {% if ranges %} + + + + + + + + + + + {% for range in ranges %} + + + {% if range.includes_all_products %} + + {% else %} + + {% endif %} + {% if range.is_public %} + + {% else %} + + {% endif %} + + + + {% endfor %} + + {% else %} + + + + {% endif %} +
    + + {% trans "Ranges" %} +
    {% trans "Name" %}{% trans "Num products" %}{% trans "Is public?" %}{% trans "Date created" %}
    + {% if range.is_editable %} + + {{ range.name }} + + {% else %} + {{ range.name }} + {% endif %} + {% trans 'All' %}{{ range.num_products|default:"-" }}{% trans "Yes" %}{% trans "No" %} + {{ range.date_created }} + +
    + +
    +
    + {% trans "No ranges found." %} +
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/ranges/range_product_list.html b/tests/django_oscar/oscar/dashboard/ranges/range_product_list.html new file mode 100644 index 0000000..56475a4 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/ranges/range_product_list.html @@ -0,0 +1,185 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% blocktrans with name=range.name %} + Products in range '{{ name }}' + {% endblocktrans %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {{ range.name }}: {% trans "products" %} +{% endblock %} +{% block dashboard_content %} + {% if range.includes_all_products %} + {% trans "This range contains all products. To add products manually, please unselect the 'Includes All Products' option on the edit range page." %} + {% else %} +
    +

    {% trans "Add products" %}

    +
    +
    +
    + {% csrf_token %} + + {% include 'oscar/dashboard/partials/form_fields.html' with form=form %} +
    + +
    +
    + {% with uploads=range.file_uploads.all %} + {% if uploads %} +
    +

    {% trans "Upload history" %}

    +
    + + + + + + + + + + + + {% for upload in uploads %} + + + + + + + + {% endfor %} + +
    {% trans "Filename" %}{% trans "New products" %}{% trans "Duplicate products" %}{% trans "Unknown products" %}{% trans "Date uploaded" %}
    {{ upload.filepath }}{{ upload.num_new_skus }}{{ upload.num_duplicate_skus }} + {{ upload.num_unknown_skus }} + + {{ upload.date_uploaded }} +
    + {% endif %} + {% endwith %} + {% if products %} +
    + {% csrf_token %} + + + + + + + + + + + + + {% for product in products %} + + + + + + + + {% endfor %} + +
    +

    {% trans "Products in range" %}

    +
    + + +
    +
    + {% trans "UPC" %} + + {% trans "Title" context "Product title" %} + + {% trans "Is product discountable?" %} +
    + + + {{ product.upc|default:"-" }} + + + {{ product.get_title }} + + + {% if product.get_is_discountable %} + {% trans "Yes" %} + {% else %} + {% trans "No" %} + {% endif %} + + + {% trans "Remove" %} + + {% if range.is_reorderable %} + + + {% trans "Re-order" context "Change the sequence order" %} + + {% endif %} +
    + {% include "oscar/dashboard/partials/pagination.html" %} +
    + {% else %} + + + + + +
    + {% trans "Products in Range" %} +
    + {% trans "No products found." %} +
    + {% endif %} +
    +{% endif %} + +{% endblock dashboard_content %} +{% block onbodyload %} +{{ block.super }} +oscar.dashboard.ranges.init(); +oscar.dashboard.reordering.init({ +wrapper: '.product_list', +submit_url: '{% url 'dashboard:range-reorder' pk=range.id %}' +}); +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reports/index.html b/tests/django_oscar/oscar/dashboard/reports/index.html new file mode 100644 index 0000000..15ec970 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/index.html @@ -0,0 +1,51 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} reports{% endblock %} +{% block title %} + {% trans "Reports" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Reporting dashboard" %} +{% endblock %} +{% block dashboard_content %} +
    +

    + + {% trans "Reporting dashboard" %} +

    +
    +
    +
    + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=form %} + + {# data-loading-text is deliberately not used here so that the button doesn't stay disabled after a CSV download has started #} + + +
    +
    + {% if description %} +
    +

    + + {{ description }} +

    +
    + {% endif %} + {% block report %}{% endblock %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/reports/partials/offer_report.html b/tests/django_oscar/oscar/dashboard/reports/partials/offer_report.html new file mode 100644 index 0000000..bc68849 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/partials/offer_report.html @@ -0,0 +1,27 @@ +{% extends 'oscar/dashboard/reports/index.html' %} +{% load currency_filters %} +{% load i18n %} +{% block report %} + + {% if objects %} + + + + + {% for offer_discount in objects %} + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    {% trans "Offer" %}{% trans "Total discount" %}
    + + {{ offer_discount.offer.name }} + + {{ offer_discount.total_discount|currency }}
    {% trans "No results found." %}
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reports/partials/open_basket_report.html b/tests/django_oscar/oscar/dashboard/reports/partials/open_basket_report.html new file mode 100644 index 0000000..6a8447e --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/partials/open_basket_report.html @@ -0,0 +1,43 @@ +{% extends 'oscar/dashboard/reports/index.html' %} +{% load currency_filters %} +{% load datetime_filters %} +{% load i18n %} +{% block report %} + + + + + + + + + + {% for basket in objects %} + + + + {% else %} + - + {% endif %} + + + + + + + {% endfor %} +
    {% trans "Email" %}{% trans "Name" %}{% trans "Num lines" %}{% trans "Num items" %}{% trans "Date of creation" %}{% trans "Time since creation" %}
    + {% if basket.owner %} + + {{ basket.owner.email }} + + {% else %} + - + {% endif %} + + {% if basket.owner %} + + {{ basket.owner.get_full_name|default:"-" }} + + {{ basket.num_lines }}{{ basket.num_items }}{{ basket.date_created }}{{ basket.time_since_creation|timedelta }}
    +{% include "oscar/dashboard/partials/pagination.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reports/partials/order_report.html b/tests/django_oscar/oscar/dashboard/reports/partials/order_report.html new file mode 100644 index 0000000..c50aade --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/partials/order_report.html @@ -0,0 +1,47 @@ +{% extends 'oscar/dashboard/reports/index.html' %} +{% load currency_filters %} +{% load i18n %} +{% block report %} + + {% if objects %} + + + + + + + + + {% for order in objects %} + + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    {% trans "Order number" %}{% trans "Name" %}{% trans "Email" %}{% trans "Total incl. tax" %}{% trans "Date placed" %}
    + + {{ order.number }} + + + {% if order.user %} + + {{ order.user|default:"-" }} + + {% else %} + - + {% endif %} + {{ order.email }}{{ order.total_incl_tax|currency:order.currency }}{{ order.date_placed }} + + {% trans "View" %} + +
    {% trans "No results found." %}
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reports/partials/product_report.html b/tests/django_oscar/oscar/dashboard/reports/partials/product_report.html new file mode 100644 index 0000000..bd8b02f --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/partials/product_report.html @@ -0,0 +1,25 @@ +{% extends 'oscar/dashboard/reports/index.html' %} +{% load currency_filters %} +{% load i18n %} +{% block report %} + + + + + + + + {% for product in objects %} + + + + + + + {% endfor %} +
    {% trans "Product" %}{% trans "Views" %}{% trans "Basket additions" %}{% trans "Purchases" %}
    + + {{ product.product }} + + {{ product.num_views }}{{ product.num_basket_additions }}{{ product.num_purchases }}
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reports/partials/submitted_basket_report.html b/tests/django_oscar/oscar/dashboard/reports/partials/submitted_basket_report.html new file mode 100644 index 0000000..f506bc6 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/partials/submitted_basket_report.html @@ -0,0 +1,41 @@ +{% extends 'oscar/dashboard/reports/index.html' %} +{% load currency_filters %} +{% load i18n %} +{% block report %} + + + + + + + + + + {% for basket in objects %} + + + + + + + + + {% endfor %} +
    {% trans "Email" %}{% trans "Name" %}{% trans "Num lines" %}{% trans "Num items" %}{% trans "Date created" %}{% trans "Time between creation and submission" %}
    + {% if basket.owner %} + + {{ basket.owner.email }} + + {% else %} + - + {% endif %} + + {% if basket.owner %} + + {{ basket.owner.get_full_name|default:"-" }} + + {% else %} + - + {% endif %} + {{ basket.num_lines }}{{ basket.num_items }}{{ basket.date_created }}{{ basket.time_before_submit }}
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reports/partials/user_report.html b/tests/django_oscar/oscar/dashboard/reports/partials/user_report.html new file mode 100644 index 0000000..cce756f --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/partials/user_report.html @@ -0,0 +1,57 @@ +{% extends 'oscar/dashboard/reports/index.html' %} +{% load currency_filters %} +{% load i18n %} +{% block report %} + + + + + + + + + + + + + + {% for user in objects %} + + + + + + + + + + + + + {% endfor %} +
    {% trans "Email" %}{% trans "Name" %}{% trans "Date registered" %}{% trans "Product views" %}{% trans "Basket additions" %}{% trans "Orders" %}{% trans "Order lines" %}{% trans "Order items" %}{% trans "Total spent" %}{% trans "Date of last order" %}
    + + {{ user.user.email }} + + + + {{ user.user.get_full_name|default:"-" }} + + + {{ user.user.date_joined }} + + {{ user.num_product_views }} + + {{ user.num_basket_additions }} + + {{ user.num_orders }} + + {{ user.num_order_lines }} + + {{ user.num_order_items }} + + {{ user.total_spent|currency }} + + {{ user.date_last_order|default:"-" }} +
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reports/partials/voucher_report.html b/tests/django_oscar/oscar/dashboard/reports/partials/voucher_report.html new file mode 100644 index 0000000..aaa0671 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reports/partials/voucher_report.html @@ -0,0 +1,31 @@ +{% extends 'oscar/dashboard/reports/index.html' %} +{% load currency_filters %} +{% load i18n %} +{% block report %} + + {% if objects %} + + + + + + + {% for voucher in objects %} + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    {% trans "Voucher code" %}{% trans "Added to a basket" %}{% trans "Used in an order" %}{% trans "Total discount" %}
    + + {{ voucher.code }} + + {{ voucher.num_basket_additions }}{{ voucher.num_orders }}{{ voucher.total_discount|currency }}
    {% trans "No vouchers were used in this period" %}
    + {% include "oscar/dashboard/partials/pagination.html" %}{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/reviews/review_delete.html b/tests/django_oscar/oscar/dashboard/reviews/review_delete.html new file mode 100644 index 0000000..cbddb6f --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reviews/review_delete.html @@ -0,0 +1,95 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% blocktrans with title=review.title|truncatechars:30 %} + Delete review '{{ title }}'? + {% endblocktrans %} + | {% trans "Reviews" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with title=review.title|truncatechars:30 %} + Delete review "{{ title }}"? + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} +
    +

    {% trans "Review" %}

    +
    +
    + {% csrf_token %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {% trans "Title" context "Product review title" %}{{ review.title }}
    {% trans "Product" %}{{ review.product.title }}
    {% trans "User" %}{{ review.user.reviewer_name|default:"-" }}
    {% trans "Score" %}{{ review.score|floatformat:1 }}
    {% trans "Votes" %} + {{ review.total_votes }} +
    + {% trans "Status" %} + + {{ review.status }} +
    + {% trans "Date created" %} + + {{ review.date_created }} +
    +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/reviews/review_list.html b/tests/django_oscar/oscar/dashboard/reviews/review_list.html new file mode 100644 index 0000000..3104970 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reviews/review_list.html @@ -0,0 +1,176 @@ +{% extends "oscar/dashboard/layout.html" %} +{% load currency_filters %} +{% load sorting_tags %} +{% load i18n %} +{% block body_class %}{{ block.super }} reviews{% endblock %} +{% block title %} + {% trans "Reviews" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} +
    +

    + + {% trans "Review Search" %} +

    +
    +
    +
    + {% include 'oscar/dashboard/partials/form_fields_inline.html' with form=form %} + +
    +
    + {% if review_list %} +
    + {% csrf_token %} + + + + + + + + + + + + + + {% for review in review_list %} + + + + + {% else %} + {% trans "[Product deleted]" %} + {% endif %} + + + + + + + + {% endfor %} +
    +

    + + {{ description }} +

    +
    +
    + {% trans "Update status of selected reviews" %} + {{ review_form.status }} + + +
    +
    +
    {% trans "Title" context "Review title" %}{% trans "Product" %}{% trans "User" %}{% anchor 'score' _("Score") %}{% anchor 'total_votes' _("Votes") %}{% trans "Status" %}{% anchor 'date_created' _("Date created") %}
    + + + + {{ review.title }} + + + {% if review.product %} + + {{ review.product.title }} + + + {% if not review.is_anonymous %} + + {{ review.reviewer_name }} + + {% else %} + {{ review.name }} + {% endif %} + + {{ review.score|floatformat:1 }} / {{ 5.0|floatformat:1 }} + + {{ review.total_votes }} + + {% if review.status == 1 %} + + {% elif review.status == 2 %} + + {% else %} + + {% endif %} + {{ review.get_status_display }} + + + {{ review.date_created }} + +
    + +
    +
    + {% include "oscar/dashboard/partials/pagination.html" %} +
    + {% else %} + + + + + +
    + {{ description }} +
    + {% trans "No reviews found." %} +
    + {% endif %} + {% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/reviews/review_update.html b/tests/django_oscar/oscar/dashboard/reviews/review_update.html new file mode 100644 index 0000000..b373ef9 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/reviews/review_update.html @@ -0,0 +1,96 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% trans "Update review" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with review_id=review.id %} + Review #{{ review_id }} + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} +
    +

    {% trans "Review information" %}

    +
    +
    +
    + {{ form.first }} + {% for field in form %} + {# display title (first) and body (last) as full lines #} + {% if forloop.counter < 3 %} +
    + {% if field.is_hidden %} + {{ field }} + {% else %} + {{ field.label_tag }} +
    + {{ field }} + {% for error in field.errors %} + {{ error|escape }} + {% endfor %} + {% if field.help_text %} + + {{ field.help_text }} + + {% endif %} +
    + {% endif %} +
    + {% else %} +
    + {% if field.is_hidden %} + {{ field }} + {% else %} + + {{ field.label_tag }} + {{ field }} + {% for error in field.errors %} +
      +
    • + {{ error|escape }} +
    • +
    + {% endfor %} +
    + {% endif %} +
    + {% endif %} + {% endfor %} +
    +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/messages/band_created.html b/tests/django_oscar/oscar/dashboard/shipping/messages/band_created.html new file mode 100644 index 0000000..fd01709 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/messages/band_created.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% blocktrans with name=band.method.name %} +

    + A weight band has been added to the + {{ name }} + shipping method. +

    +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/messages/band_deleted.html b/tests/django_oscar/oscar/dashboard/shipping/messages/band_deleted.html new file mode 100644 index 0000000..c9c41e6 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/messages/band_deleted.html @@ -0,0 +1,7 @@ +{% load i18n %} +{% blocktrans with name=band.method.name %} +

    + Weight band deleted from the + {{ name }} + shipping method + {% endblocktrans %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/messages/band_updated.html b/tests/django_oscar/oscar/dashboard/shipping/messages/band_updated.html new file mode 100644 index 0000000..7e7a6e4 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/messages/band_updated.html @@ -0,0 +1,4 @@ +{% load i18n %} +

    + {% trans "Weight band updated" %} +

    diff --git a/tests/django_oscar/oscar/dashboard/shipping/messages/method_created.html b/tests/django_oscar/oscar/dashboard/shipping/messages/method_created.html new file mode 100644 index 0000000..ddf4fdf --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/messages/method_created.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% blocktrans with name=method.name %} +

    + A shipping method + {{ name }} + has been created. +

    +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/messages/method_deleted.html b/tests/django_oscar/oscar/dashboard/shipping/messages/method_deleted.html new file mode 100644 index 0000000..594f808 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/messages/method_deleted.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% blocktrans with name=method.name %} +

    + The + {{ name }} + shipping method has been deleted. +

    +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/messages/method_updated.html b/tests/django_oscar/oscar/dashboard/shipping/messages/method_updated.html new file mode 100644 index 0000000..b0dac56 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/messages/method_updated.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% blocktrans with name=method.name %} +

    + The + {{ name }} + shipping method has been updated. +

    +{% endblocktrans %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/weight_band_delete.html b/tests/django_oscar/oscar/dashboard/shipping/weight_band_delete.html new file mode 100644 index 0000000..a771b57 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/weight_band_delete.html @@ -0,0 +1,64 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load currency_filters %} +{% block title %} + {% trans "Delete weight band?" %} | + {{ band.method.name }} | + {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Delete weight band?" %} +{% endblock %} +{% block dashboard_content %} + + + + + + + + + + + + + +
    {% trans "Weight range (kg)" %}{% trans "Charge" %}
    {{ band.weight_from|floatformat:3 }} - {{ band.weight_to|floatformat:3 }}{{ band.charge|currency }}
    +
    +

    + {% trans "Are you sure you want to delete this weight band method?" %} +

    + {% csrf_token %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/weight_band_form.html b/tests/django_oscar/oscar/dashboard/shipping/weight_band_form.html new file mode 100644 index 0000000..7a32ba1 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/weight_band_form.html @@ -0,0 +1,52 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load currency_filters %} +{% block title %} + {% trans "Edit weight band" %} | + {{ band.method.name }} | + {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Edit weight band" %} +{% endblock %} +{% block dashboard_content %} +
    +
    + {% csrf_token %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form %} + {% block form_actions %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    + {% endblock form_actions %} +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/weight_based_delete.html b/tests/django_oscar/oscar/dashboard/shipping/weight_based_delete.html new file mode 100644 index 0000000..761f51b --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/weight_based_delete.html @@ -0,0 +1,48 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block title %} + {% blocktrans with name=method.name %} + Delete shipping method '{{ name }}'? + {% endblocktrans %} + | {% trans "Shipping methods" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ method.name }}{% endblock %} +{% block dashboard_content %} +
    +

    + {% trans "Are you sure you want to delete this shipping method?" %} +

    + {% csrf_token %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/weight_based_detail.html b/tests/django_oscar/oscar/dashboard/shipping/weight_based_detail.html new file mode 100644 index 0000000..9ac63bc --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/weight_based_detail.html @@ -0,0 +1,115 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load currency_filters %} +{% block title %}{{ method.name }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ method.name }}{% endblock %} +{% block dashboard_content %} +
    +

    {% trans "Shipping method" %}

    + + + + + + + + + + + {% with countries=method.countries.all %} + {% if countries %} + + + + + {% endif %} + {% endwith %} + + + + + +
    {% trans "Name" %}{{ method.name }}
    {% trans "Description" %}{{ method.description|safe|default:"-" }}
    {% trans "Applies to countries" %}{{ countries|join:", " }}
    {% trans "Default product weight (kg)" %}{{ method.default_weight }}
    +

    + + {% trans 'Edit shipping method' %} + + + {% trans 'Delete shipping method' %} + +

    +

    {% trans "Weight bands" %}

    + {% if method.bands.all.count %} + + + + + + + + + + {% for band in method.bands.all %} + + + + + + {% endfor %} + +
    + {% trans "Weight range (kg)" %} + + {% trans "Charge" %} +
    + {{ band.weight_from|floatformat:3 }} - {{ band.weight_to|floatformat:3 }} + + {{ band.charge|currency }} + + + {% trans "Edit" %} + + + {% trans "Delete" %} + +
    + {% else %} +

    + {% trans "No weight bands have been added yet." %} +

    + {% endif %} +

    + {% trans "Add a new weight band" %} +

    +
    + {% csrf_token %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form %} + +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/weight_based_form.html b/tests/django_oscar/oscar/dashboard/shipping/weight_based_form.html new file mode 100644 index 0000000..e0a73d1 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/weight_based_form.html @@ -0,0 +1,63 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load currency_filters %} +{% block title %} + {% if method %} + {{ method.name }} + {% else %} + {% trans "Create a new shipping method" %} + {% endif %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% if method %} + {{ method.name }} + {% else %} + {% trans "Create a new shipping method" %} + {% endif %} +{% endblock %} +{% block dashboard_content %} +
    + {% csrf_token %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form %} + {% block form_actions %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    + {% endblock form_actions %} +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/shipping/weight_based_list.html b/tests/django_oscar/oscar/dashboard/shipping/weight_based_list.html new file mode 100644 index 0000000..995efbd --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/shipping/weight_based_list.html @@ -0,0 +1,78 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load currency_filters %} +{% block title %} + {% trans "Shipping methods" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + + + {% if methods %} + + + + + + + + + + {% for method in methods %} + + + + + + + {% endfor %} + + {% else %} + + + + {% endif %} +
    + + {% trans "Shipping methods" %} +
    {% trans "Name" %}{% trans "Number of weight bands" %}{% trans "Default weight (kg)" %}
    + + {{ method.name }} + + {{ method.num_bands }}{{ method.default_weight }} + + {% trans "View" %} + + + {% trans "Edit" %} + + + {% trans "Delete" %} + +
    {% trans "No shipping methods found." %}
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/table.html b/tests/django_oscar/oscar/dashboard/table.html new file mode 100644 index 0000000..bfa4d08 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/table.html @@ -0,0 +1,33 @@ +{% extends 'django_tables2/table.html' %} +{% load django_tables2 %} +{% load i18n %} +{% block table.thead %} + + {% block table.caption %} +

    + {% if table.icon %}{% endif %} + {{ table.get_caption_display }} +

    + {% endblock %} + + + + {% for column in table.columns %} + {% if column.orderable %} + + + {{ column.header }} + + + + {% else %} + {{ column.header }} + {% endif %} + {% endfor %} + + +{% endblock table.thead %} +{% block pagination %} + {% with page_obj=table.page paginator=table.paginator %} + {% include "oscar/dashboard/partials/pagination.html" %}{% endwith %} +{% endblock pagination %} diff --git a/tests/django_oscar/oscar/dashboard/users/alerts/delete.html b/tests/django_oscar/oscar/dashboard/users/alerts/delete.html new file mode 100644 index 0000000..a03510a --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/alerts/delete.html @@ -0,0 +1,62 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page users{% endblock %} +{% block title %} + {% blocktrans with id=alert.id %} + Alert #{{ id }} + {% endblocktrans %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with id=alert.id %} + Delete alert #{{ id }}? + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} +
    +

    + {% blocktrans with id=alert.id %} + Product alert #{{ id }} + {% endblocktrans %} +

    +
    +
    + {% include 'oscar/dashboard/users/alerts/partials/alert.html' %} +
    + {% csrf_token %} +
    +

    + {% trans "Are you sure that you want to delete this alert?" %} +

    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/users/alerts/list.html b/tests/django_oscar/oscar/dashboard/users/alerts/list.html new file mode 100644 index 0000000..5fdae5e --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/alerts/list.html @@ -0,0 +1,114 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% load currency_filters %} +{% block body_class %}{{ block.super }} users{% endblock %} +{% block title %} + {% trans "Product alerts" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Product alerts" %} +{% endblock %} +{% block dashboard_content %} +
    +

    + + {% trans "Search product alerts" %} +

    +
    +
    +
    + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=form %} + + {% trans "or" %} + + {% trans "reset" %} + +
    +
    +
    +

    + + {{ queryset_description }} +

    +
    + {% if alerts %} + + + + + + + + + + {% for alert in alerts %} + + + + + + + + + {% endfor %} +
    {% trans "Product" %}{% trans "User" %}{% trans "Status" %}{% trans "Date created" %}{% trans "Date alert sent" %}
    + + {{ alert.product }} + + + {% if alert.user %} + + {{ alert.user.email }} + + {% else %} + {{ alert.email }} {% trans "(Anonymous)" %} + {% endif %} + {{ alert.status }}{{ alert.date_created }}{{ alert.date_closed|default:"-" }} +
    + +
    +
    + {% include "oscar/dashboard/partials/pagination.html" %} + {% else %} + + + + +
    {% trans "No alerts found." %}
    + {% endif %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/users/alerts/partials/alert.html b/tests/django_oscar/oscar/dashboard/users/alerts/partials/alert.html new file mode 100644 index 0000000..a85bb7b --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/alerts/partials/alert.html @@ -0,0 +1,52 @@ +{% load i18n %} + + + + + + + + + + + + + + + + + + + {% if not alert.user %} + + + + + {% endif %} + {% if alert.is_cancelled %} + + + + + {% else %} + + + + + {% endif %} + +
    {% trans "Product" %} + + {{ alert.product }} + +
    {% trans "User" %} + {% if alert.user %} + {{ alert.user }} + {% else %} + {{ alert.email }} + {% endif %} +
    {% trans "Status" %}{{ alert.status }}
    {% trans "Date created" %}{{ alert.date_created }}
    {% trans "Date confirmed" %}{{ alert.date_confirmed|default:"-" }}
    {% trans "Date cancelled" %}{{ alert.date_cancelled }}
    + {% trans "Date alert sent" %} + + {{ alert.date_closed|default:"-" }} +
    diff --git a/tests/django_oscar/oscar/dashboard/users/alerts/update.html b/tests/django_oscar/oscar/dashboard/users/alerts/update.html new file mode 100644 index 0000000..ffdafbc --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/alerts/update.html @@ -0,0 +1,56 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load i18n %} +{% block body_class %}{{ block.super }} users{% endblock %} +{% block title %} + {% blocktrans with id=alert.id %} + Update alert #{{ id }} + {% endblocktrans %} + | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with id=alert.id %} + Product alert #{{ id }} + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} +
    +

    + {% blocktrans with id=alert.id %} + Product alert #{{ id }} + {% endblocktrans %} +

    +
    +
    + {% csrf_token %} + {% include 'oscar/dashboard/partials/form_fields_inline.html' %} + + + {% trans "cancel" %} + +
    +
    +
    + {% include 'oscar/dashboard/users/alerts/partials/alert.html' %}{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/users/detail.html b/tests/django_oscar/oscar/dashboard/users/detail.html new file mode 100644 index 0000000..1285e40 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/detail.html @@ -0,0 +1,310 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} users{% endblock %} +{% block title %}{{ customer.email }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ customer.email }}{% endblock %} +{% block dashboard_content %} +
    + {% block user_general_info %} +
    +
    +

    {% trans "General" %}

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if customer.userrecord %} + {% with record=customer.userrecord %} + + + + + + + + + + + + + + + + + {% endwith %} + {% endif %} + + + + + {% if customer.email %} + + + + + {% endif %} +
    {% trans "Name" %}{{ customer.get_full_name|default:"-" }}
    {% trans "Email" %}{{ customer.email }}
    {% trans "Active" %}?{{ customer.is_active|yesno:_("Yes,No") }}
    {% trans "Superuser" %}?{{ customer.is_superuser|yesno:_("True,False") }}
    {% trans "Staff" %}? + {{ customer.is_staff|yesno:_("True,False") }} +
    + {% trans "Last login" %} + + {{ customer.last_login }} +
    + {% trans "Date joined" %} + + {{ customer.date_joined }} +
    + {% trans "Products viewed" %} + + {{ record.num_product_views|default:0 }} +
    + {% trans "Number of orders" %} + + {{ record.num_orders|default:0 }} +
    + {% trans "Number of ordered items" %} + + {{ record.num_order_items|default:0 }} +
    + {% trans "Total spent" %} + + {{ record.total_spent|default:0|currency }} +
    + {% trans "Reviews written" %} + + {{ customer.reviews.count }} +
    + {% trans "Actions" %} + +
    + {% csrf_token %} + +
    +
    +
    + {% endblock %} +
    +
    + {% block user_additional_info %} +
    + {% block tab_nav %} + + {% endblock %} +
    + {% block user_orders %} +
    + + + {% with orders=customer.orders.all %} + {% if orders %} + + + + + + + + + {% for order in orders %} + + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + {% endwith %} +
    + {% trans "Orders" %} +
    + {% trans "Order Number" %} + + {% trans "Num items" %} + + {% trans "Total value" %} + + {% trans "Date placed" %} + + {% trans "Status" %} +
    + + {{ order.number }} + + + {{ order.num_items }} + + {{ order.basket_total_incl_tax|currency }} + + {{ order.date_placed|date }} + + {{ order.status|default:"-" }} + + + {% trans "View" %} + +
    + {% trans "This customer has not placed any orders yet." %} +
    +
    + {% endblock %} + {% block user_addresses %} +
    +

    + {% trans "Addresses" %} +

    +
    + {% for address in customer.addresses.all %} +
    +
    + {% for field in address.active_address_fields %} + {{ field }} +
    + {% endfor %} +
    +
    + {% if forloop.counter|divisibleby:4 %} +
    +
    + {% endif %} + {% empty %} +

    + {% trans "This customer has not saved any addresses." %} +

    + {% endfor %} +
    +
    + {% endblock %} + {% block user_reviews %} +
    + + + {% if customer.reviews.count %} + + + + + + + + {% for review in customer.reviews.all %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    + {% trans "Reviews" %} +
    + {% trans "Product ID" %} + + {% trans "Score" %} + + {% trans "Title" context "Product review title" %} + + {% trans "Body" %} + + {% trans "Date created" %} +
    + {{ review.product_id }} + + {{ review.score }} + + {{ review.title }} + + {{ review.body }} + + {{ review.date_created }} +
    + {% trans "This customer has not written any reviews yet." %} +
    +
    + {% endblock %} +
    +
    +
    +{% endblock %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/users/index.html b/tests/django_oscar/oscar/dashboard/users/index.html new file mode 100644 index 0000000..4fe42d2 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/index.html @@ -0,0 +1,66 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load dashboard_tags %} +{% load i18n %} +{% load render_table from django_tables2 %} +{% block body_class %}{{ block.super }} users{% endblock %} +{% block title %} + {% trans "Customers" %} | {{ block.super }} +{% endblock %} +{% block header %} + +{% endblock header %} +{% block breadcrumbs %} + +{% endblock %} +{% block dashboard_content %} +
    +

    + + {% trans "Search" %} +

    +
    +
    +
    + {% include "oscar/dashboard/partials/form_fields_inline.html" with form=form %} + + + {% trans "Reset" %} + +
    +
    + {% block users_list %} + {% if users.data %} +
    + {% csrf_token %} + {% render_table users %} +
    + {% else %} + + + + + +
    + {{ queryset_description }} +
    {% trans "No customers found." %}
    + {% endif %} + {% endblock %} +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/users/table.html b/tests/django_oscar/oscar/dashboard/users/table.html new file mode 100644 index 0000000..90c71dc --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/table.html @@ -0,0 +1,31 @@ +{% extends 'oscar/dashboard/table.html' %} +{% load i18n %} +{% block table.caption %} + {{ block.super }} +
    +
    + + {% trans "Bulk Actions" %} + +
    + + +
    +
    + + +
    + +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/dashboard/users/user_row_actions.html b/tests/django_oscar/oscar/dashboard/users/user_row_actions.html new file mode 100644 index 0000000..e8e67f8 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/user_row_actions.html @@ -0,0 +1,4 @@ +{% load i18n %} + + {% trans "View" %} + diff --git a/tests/django_oscar/oscar/dashboard/users/user_row_checkbox.html b/tests/django_oscar/oscar/dashboard/users/user_row_checkbox.html new file mode 100644 index 0000000..d271d81 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/users/user_row_checkbox.html @@ -0,0 +1 @@ + diff --git a/tests/django_oscar/oscar/dashboard/vouchers/partials/voucher_details_table.html b/tests/django_oscar/oscar/dashboard/vouchers/partials/voucher_details_table.html new file mode 100644 index 0000000..3f8f2cb --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/partials/voucher_details_table.html @@ -0,0 +1,45 @@ +{% load i18n %} + + + {% if voucher.voucher_set %} + + + + + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + +
    {% trans "Voucher set" %} + + {{ voucher.voucher_set.name }} + +
    {% trans "Name" %}{{ voucher.name }}
    {% trans "Code" %}{{ voucher.code }}
    {% trans "Start datetime" %}{{ voucher.start_datetime }}
    {% trans "End datetime" %}{{ voucher.end_datetime }}
    {% trans "Usage" %} + {{ voucher.get_usage_display }} +
    + {% trans "Number of offers" %} + + {{ voucher.offers.count }} +
    diff --git a/tests/django_oscar/oscar/dashboard/vouchers/partials/voucher_set_details_table.html b/tests/django_oscar/oscar/dashboard/vouchers/partials/voucher_set_details_table.html new file mode 100644 index 0000000..de36e94 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/partials/voucher_set_details_table.html @@ -0,0 +1,66 @@ +{% load i18n %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    {% trans "Voucher set" %}

    +
    {% trans "Title" %}{{ voucher_set.name }}
    {% trans "Start" %}{{ voucher_set.start_datetime }}
    {% trans "End" %}{{ voucher_set.end_datetime }}
    {% trans "Description" %}{{ voucher_set.description }}
    {% trans "Number of vouchers" %} + {{ voucher_set.count }} +
    + {% trans "Number of offers" %} + + {{ voucher_set.vouchers.first.offers.count|default:0 }} +
    + {% trans "Status" %} + + {% if voucher_set.is_active %} + {% trans "Active" %} + {% else %} + {% trans "Inactive" %} + {% endif %} +
    + {% trans "Created" %} + + {{ voucher_set.date_created }} +
    + {% trans "Usage" %} + + {{ voucher_set.vouchers.first.get_usage_display }} +
    diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_delete.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_delete.html new file mode 100644 index 0000000..9a5a3a9 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_delete.html @@ -0,0 +1,72 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% if not voucher.voucher_set %} + {% blocktrans with name=voucher.name %} + Delete voucher '{{ name }}'? + {% endblocktrans %} + | {% trans "Vouchers" %} | {{ block.super }} + {% else %} + {% blocktrans with code=voucher.code %} + Delete voucher '{{ code }}'? + {% endblocktrans %} + | {% trans "Vouchers" %} | {{ block.super }} + {% endif %} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% if not voucher.voucher_set %} + {% blocktrans with name=voucher.name %} + Delete voucher '{{ name }}'? + {% endblocktrans %} + {% else %} + {% blocktrans with code=voucher.code %} + Delete voucher '{{ code }}' from set? + {% endblocktrans %} + {% endif %} +{% endblock %} +{% block dashboard_content %} +
    +

    {% trans "Voucher details" %}

    +
    +
    + {% include "oscar/dashboard/vouchers/partials/voucher_details_table.html" %} +
    + {% csrf_token %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_detail.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_detail.html new file mode 100644 index 0000000..3e8447e --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_detail.html @@ -0,0 +1,212 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block title %} + {{ voucher }} | {% trans "Vouchers" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ voucher }}{% endblock %} +{% block dashboard_content %} +
    +

    {% trans "Voucher details" %}

    +
    + {% include "oscar/dashboard/vouchers/partials/voucher_details_table.html" %} +
    +

    {% trans "Attached offers" %}

    +
    + + {% if voucher.offers.exists %} + + + + + + + + + + + + + + {% for offer in voucher.offers.all %} + + + + + + + + + + + {% endfor %} + + {% else %} + + + + {% endif %} +
    {% trans "Offer name" %}{% trans "Start date" %}{% trans "End date" %}{% trans "Is available?" %}{% trans "Priority" %}{% trans "Incentive" %}{% trans "Condition" %}{% trans "Restrictions" %}
    + + {{ offer.name }} + + + {{ offer.start_datetime|default:"-" }} + + {{ offer.end_datetime|default:"-" }} + + {% if offer.is_available %} + {% trans "Yes" %} + {% else %} + {% trans "No" %} + {% endif %} + + {{ offer.priority }} + + {{ offer.benefit.description|safe }} + + {{ offer.condition.description|safe }} + + {% for restriction in offer.availability_restrictions %} + {% if not restriction.is_satisfied %} + + {% else %} + {{ restriction.description }} +
    + {% endif %} + {% endfor %} +
    + {% trans "No offers are attached to this voucher." %} +
    +
    +

    + {% trans "Voucher performance" %} +

    +
    + + + + + + + + + + + + + + + +
    + {% trans "Number of basket additions" %} + + {{ voucher.num_basket_additions }} +
    + {% trans "Number of orders" %} + + {{ voucher.num_orders }} +
    + {% trans "Total discount" %} + + {{ voucher.total_discount|currency }} +
    +
    +

    + {% trans "Recent orders" %} +

    +
    + + {% if not discounts %} + + + + {% else %} + + + + + + + + + + {% for discount in discounts %} + {% with order=discount.order %} + + + + + + + {% endwith %} + {% endfor %} + + {% endif %} +
    + {% trans "No orders have been placed that use this voucher." %} +
    + {% trans "Order number" %} + + {% trans "Order total" %} + + {% trans "Discount" %} + + {% trans "Date placed" %} +
    + + {{ order.number }} + + + {{ order.total_incl_tax|currency:order.currency }} + + {{ discount.amount|currency:order.currency }} + + {{ order.date_placed }} +
    + +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_form.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_form.html new file mode 100644 index 0000000..2be05f7 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_form.html @@ -0,0 +1,61 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {{ title }} | {% trans "Vouchers" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    +

    + + {% if voucher %} + {% trans "Edit voucher" %} + {% else %} + {% trans "Create voucher" %} + {% endif %} +

    +
    +
    + {% csrf_token %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form %} + {% block form_actions %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    + {% endblock form_actions %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_list.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_list.html new file mode 100644 index 0000000..81a4c9a --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_list.html @@ -0,0 +1,220 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load sorting_tags %} +{% load i18n %} +{% load widget_tweaks %} +{% block title %} + {% trans "Vouchers" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + {% block page_head %} +
    +

    + + {% trans "Search" %} +

    +
    +
    +
    + {% for field in form %} + {% if field.name in form.basic_fields %} + {% if field.is_hidden %} + {{ field }} + {% else %} +
    + {{ field.label_tag }} + {% render_field field class+='form-control' %} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} + {# No help text as it wraps #} +
    + {% endif %} + {% else %} + + {% endif %} + {% endfor %} + + + {% trans "Advanced Search" %} + + + {% trans "Reset" %} + +
    + {# Search modal, if there are form errors the form is automatically openend #} + {% include "oscar/dashboard/partials/advanced_search_modal.html" with form=advanced_form style='horizontal' %} + {% if search_filters %} +
    + + {% for filter in search_filters %} + {{ filter }} + {% endfor %} +
    + {% endif %} +
    +{% endblock page_head %} +{% block voucher_table %} + + + {% if vouchers %} + {% block table_head %} + + + + + + + + + {% if form.is_bound and form.cleaned_data.in_set is not False %} + + {% endif %} + + + {% endblock table_head %} + {% for voucher in vouchers %} + {% block table_row %} + + + + + + + + + {% if form.is_bound and form.cleaned_data.in_set is not False %} + + {% endif %} + + + {% endblock table_row %} + {% endfor %} + {% else %} + + + + {% endif %} +
    + + {% if search_filters %} + {% trans "Voucher Search Results" %} + {% else %} + {% trans "All Vouchers" %} + {% endif %} +
    {% trans "Name" %}{% trans "Code" %}{% trans "Status" %}{% trans "Num offers" %}{% anchor 'num_basket_additions' _("Num baskets") %}{% anchor 'num_orders' _("Num orders") %}{% anchor 'date_created' _("Date created") %}{% trans "Set" %}
    + + {{ voucher.name }} + + + {{ voucher.code }} + + {% if voucher.is_active %} + {% trans "Active" %} + {% else %} + {% trans "Inactive" %} + {% endif %} + + {{ voucher.offers.count }} + + {{ voucher.num_basket_additions }} + + {{ voucher.num_orders }} + + {{ voucher.date_created }} + + {% if voucher.voucher_set.pk %} + + {{ voucher.voucher_set.name }} + + {% else %} + - + {% endif %} + + {% block row_actions %} + + {% endblock row_actions %} +
    + {% trans "No vouchers found." %} +
    +{% endblock voucher_table %} +{% include "oscar/dashboard/partials/pagination.html" %}{% endblock dashboard_content %} +{% block onbodyload %} + {{ block.super }} + {% if advanced_form.errors %}$('#SearchModal').modal('show');{% endif %} +{% endblock onbodyload %} diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_delete.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_delete.html new file mode 100644 index 0000000..394e9cf --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_delete.html @@ -0,0 +1,59 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {% blocktrans with name=voucher_set.name %} + Delete voucher set '{{ name }}'? + {% endblocktrans %} + | {% trans "Voucher sets" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% blocktrans with name=voucher_set.name count=voucher_set.count %} + Delete voucher set '{{ name }}' and its {{ count }} vouchers? + {% endblocktrans %} +{% endblock %} +{% block dashboard_content %} +
    +

    {% trans "Voucher set details" %}

    +
    +
    + {% include "oscar/dashboard/vouchers/partials/voucher_set_details_table.html" %} +
    + {% csrf_token %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    +
    +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_detail.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_detail.html new file mode 100644 index 0000000..fd6a571 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_detail.html @@ -0,0 +1,222 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load sorting_tags %} +{% load i18n %} +{% block title %}{{ voucher_set.name }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + {% include "oscar/dashboard/vouchers/partials/voucher_set_details_table.html" %} +
    +

    + + {% trans "Search vouchers" %} +

    +
    +
    +
    + {% include 'oscar/partials/form_fields_inline.html' with form=form %} + + + {% trans "Reset" %} + +
    + {% if search_filters %} +
    + + {% for filter in search_filters %} + {{ filter }} + {% endfor %} +
    + {% endif %} +
    + + + {% if vouchers %} + + + + + + + + {% for voucher in vouchers %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    + + {% if search_filters %} + {% trans "Voucher Search Results" %} + {% else %} + {% trans "All Vouchers" %} + {% endif %} +
    {% trans "Code" %}{% anchor 'num_basket_additions' _("Num baskets") %}{% anchor 'num_orders' _("Num orders") %}{% anchor 'date_created' _("Date created") %}
    + {{ voucher.code }} + {{ voucher.num_basket_additions }}{{ voucher.num_orders }}{{ voucher.date_created }} +
    + +
    +
    {% trans "No vouchers found." %}
    + {% include "oscar/partials/pagination.html" %} +
    +

    + {% trans "Attached offers" %} +

    +
    + + {% if voucher_set.vouchers.first.offers.exists %} + + + + + + + + + + + + + + {% for offer in voucher_set.vouchers.first.offers.all %} + + + + + + + + + + + {% endfor %} + + {% else %} + + + + {% endif %} +
    + {% trans "Offer name" %} + + {% trans "Start date" %} + + {% trans "End date" %} + + {% trans "Is available?" %} + + {% trans "Priority" %} + + {% trans "Incentive" %} + + {% trans "Condition" %} + + {% trans "Restrictions" %} +
    + + {{ offer.name }} + + + {{ offer.start_datetime|default:"-" }} + + {{ offer.end_datetime|default:"-" }} + + {% if offer.is_available %} + {% trans "Yes" %} + {% else %} + {% trans "No" %} + {% endif %} + + {{ offer.priority }} + + {{ offer.benefit.description|safe }} + + {{ offer.condition.description|safe }} + + {% for restriction in offer.availability_restrictions %} + {% if not restriction.is_satisfied %} + + {% else %} + {{ restriction.description }} +
    + {% endif %} + {% endfor %} +
    + {% trans "No offers are attached to this voucher set." %} +
    + +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_form.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_form.html new file mode 100644 index 0000000..4da1642 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_form.html @@ -0,0 +1,61 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load i18n %} +{% block body_class %}{{ block.super }} create-page{% endblock %} +{% block title %} + {{ title }} | {% trans "Voucher sets" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ title }}{% endblock %} +{% block dashboard_content %} +
    +

    + + {% if voucher_set %} + {% trans "Edit voucher set" %} + {% else %} + {% trans "Create voucher set" %} + {% endif %} +

    +
    +
    + {% csrf_token %} + {% include "oscar/dashboard/partials/form_fields.html" with form=form %} + {% block form_actions %} +
    + + {% trans "or" %} + + {% trans "cancel" %} + +
    + {% endblock form_actions %} +
    +{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_list.html b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_list.html new file mode 100644 index 0000000..2aba0e3 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/vouchers/voucher_set_list.html @@ -0,0 +1,113 @@ +{% extends 'oscar/dashboard/layout.html' %} +{% load currency_filters %} +{% load sorting_tags %} +{% load i18n %} +{% block title %}{{ description }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block header %} + +{% endblock header %} +{% block dashboard_content %} + + {% if description != "All voucher sets" %} + + {% endif %} + {% if voucher_sets %} + + + + + + + + + + + {% for voucher_set in voucher_sets %} + + + + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} +
    + + {{ description }} +
    {% trans "Name" %}{% trans "Num" %}{% trans "Status" %}{% trans "Num offers" %}{% anchor 'num_basket_additions' _("Num baskets") %}{% anchor 'num_orders' _("Num orders") %}{% anchor 'date_created' _("Date created") %}
    + + {{ voucher_set.name }} + + {{ voucher_set.count }} + {% if voucher_set.is_active %} + {% trans "Active" %} + {% else %} + {% trans "Inactive" %} + {% endif %} + + {{ voucher_set.vouchers.first.offers.count|default:0 }} + + {{ voucher_set.num_basket_additions }} + + {{ voucher_set.num_orders }} + + {{ voucher_set.date_created }} + + +
    + {% trans "No voucher sets found." %} +
    + {% include "oscar/partials/pagination.html" %}{% endblock dashboard_content %} diff --git a/tests/django_oscar/oscar/dashboard/widgets/popup_response.html b/tests/django_oscar/oscar/dashboard/widgets/popup_response.html new file mode 100644 index 0000000..36233a7 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/widgets/popup_response.html @@ -0,0 +1,10 @@ +{% load i18n static %} + + + + {% trans 'Popup closing...' %} + + + + + diff --git a/tests/django_oscar/oscar/dashboard/widgets/related_multiple_widget_wrapper.html b/tests/django_oscar/oscar/dashboard/widgets/related_multiple_widget_wrapper.html new file mode 100644 index 0000000..71d8ec6 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/widgets/related_multiple_widget_wrapper.html @@ -0,0 +1,28 @@ +{% load i18n static %} + diff --git a/tests/django_oscar/oscar/dashboard/widgets/related_widget_wrapper.html b/tests/django_oscar/oscar/dashboard/widgets/related_widget_wrapper.html new file mode 100644 index 0000000..14b5f00 --- /dev/null +++ b/tests/django_oscar/oscar/dashboard/widgets/related_widget_wrapper.html @@ -0,0 +1,26 @@ +{% load i18n static %} + diff --git a/tests/django_oscar/oscar/error.html b/tests/django_oscar/oscar/error.html new file mode 100644 index 0000000..7e56c9d --- /dev/null +++ b/tests/django_oscar/oscar/error.html @@ -0,0 +1,23 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% block layout %} + {% include "oscar/partials/nav_accounts.html" %} +
    +
    +

    + {% block error_heading %} + {% trans 'Sorry!' %} + {% endblock %} +

    + {% block error_message %}{% endblock %} +

    + + {% trans 'Return to previous page' %} + + + {% trans "Go to homepage" %} + +

    +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/forms/widgets/date_time_picker.html b/tests/django_oscar/oscar/forms/widgets/date_time_picker.html new file mode 100644 index 0000000..81a317d --- /dev/null +++ b/tests/django_oscar/oscar/forms/widgets/date_time_picker.html @@ -0,0 +1,14 @@ +
    +
    + {% include "django/forms/widgets/input.html" %} +
    +
    + +
    +
    +
    +
    diff --git a/tests/django_oscar/oscar/forms/widgets/image_input_widget.html b/tests/django_oscar/oscar/forms/widgets/image_input_widget.html new file mode 100644 index 0000000..3385028 --- /dev/null +++ b/tests/django_oscar/oscar/forms/widgets/image_input_widget.html @@ -0,0 +1,18 @@ +{% load i18n %} +{% load image_tags %} +
    + {% if image_url %} + {% oscar_thumbnail image_url "200x200" upscale=False as thumb %} + {% trans + {% else %} + {% trans + + {% endif %} +
    + {% include "django/forms/widgets/input.html" %} +
    +
    diff --git a/tests/django_oscar/oscar/layout.html b/tests/django_oscar/oscar/layout.html new file mode 100644 index 0000000..bb821b5 --- /dev/null +++ b/tests/django_oscar/oscar/layout.html @@ -0,0 +1,60 @@ +{% extends "oscar/base.html" %} +{% load static %} +{% block styles %} + +{% endblock %} +{% block layout %} + {# Top-horizontal bar with account, notifictions, dashboard links #} + {% include "oscar/partials/nav_accounts.html" %} + {# Site logo/title, mini-basket, browse dropdown and searchbox #} +
    +
    +
    + {% include "oscar/partials/brand.html" %} + {# Mini-basket wrapped in a block so some templates can now display it #} + {% block mini_basket %} + {% include "oscar/partials/mini_basket.html" %}{% endblock %} +
    +
    + {% block navigation %} + {% include "oscar/partials/nav_primary.html" %}{% endblock %} +
    + {# Main content of page - other layout templates may override this block #} + {% block content_wrapper %} +
    +
    + {% block breadcrumbs %}{% endblock %} + {% block header %} + + {% endblock %} + {% include "oscar/partials/alert_messages.html" %} + {% block subnavigation %}{% endblock %} +
    + {% block subheader %}{% endblock subheader %} + {# Div exists for AJAX updates to entire content section #} +
    + {% block content %}{% endblock %} +
    +
    +
    +
    + {% endblock %} + {% include "oscar/partials/footer.html" %}{% endblock %} + {# Local scripts #} + {% block scripts %} + {{ block.super }} + + + + + {% endblock %} + {% block extrascripts %} + {% include "oscar/partials/extrascripts.html" %} + {{ block.super }} + {% endblock %} + {% block onbodyload %} + {{ block.super }} + oscar.init(); + {% endblock %} diff --git a/tests/django_oscar/oscar/layout_2_col.html b/tests/django_oscar/oscar/layout_2_col.html new file mode 100644 index 0000000..c96a6bc --- /dev/null +++ b/tests/django_oscar/oscar/layout_2_col.html @@ -0,0 +1,31 @@ +{% extends "oscar/layout.html" %} +{% comment %} +Keep the same header and footer as the standard layout template but override the +main content area to split it into a sidebar and a content block +{% endcomment %} +{% block content_wrapper %} +
    +
    + {% block breadcrumbs %}{% endblock %} +
    + +
    + {% block header %} + + {% endblock %} + {% include "oscar/partials/alert_messages.html" %} + {% block pre_content %}{% endblock %} + {% block content %}{% endblock %} +
    +
    + +
    + +
    + +{% endblock %} diff --git a/tests/django_oscar/oscar/layout_3_col.html b/tests/django_oscar/oscar/layout_3_col.html new file mode 100644 index 0000000..83e59b7 --- /dev/null +++ b/tests/django_oscar/oscar/layout_3_col.html @@ -0,0 +1,28 @@ +{% extends "oscar/layout.html" %} +{% block content_wrapper %} +
    +
    + {% block breadcrumbs %}{% endblock %} +
    + +
    + {% block header %} + + {% endblock %} + {% include "oscar/partials/alert_messages.html" %} + {% block content %}{% endblock %} +
    + +
    + +
    + +
    + +{% endblock %} diff --git a/tests/django_oscar/oscar/login_forbidden.html b/tests/django_oscar/oscar/login_forbidden.html new file mode 100644 index 0000000..250957b --- /dev/null +++ b/tests/django_oscar/oscar/login_forbidden.html @@ -0,0 +1,7 @@ +{% extends "oscar/403.html" %} +{% load i18n %} +{% block error_message %} +

    + {% trans "This page is only available to users who aren't logged in." %} +

    +{% endblock %} diff --git a/tests/django_oscar/oscar/offer/detail.html b/tests/django_oscar/oscar/offer/detail.html new file mode 100644 index 0000000..5694e5b --- /dev/null +++ b/tests/django_oscar/oscar/offer/detail.html @@ -0,0 +1,68 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% load product_tags %} +{% block title %}{{ offer.name }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %}{{ offer.name }}{% endblock %} +{% block content %} + {% if not offer.is_available %} +
    + {% trans " This offer is no longer available." %} +
    + {% endif %} + {% if upsell_message %} +
    + {% if offer.description %} +
    +

    + {{ offer.description|safe }} +

    +
    + {% endif %} +
    +
    +

    + + {% trans "What you need to do" %} +

    +

    + {{ upsell_message }} +

    +
    +
    +
    + {% endif %} + {% if products %} +
    +
    + {% include "oscar/partials/pagination.html" %} +
      + {% for product in products %} +
    1. + {% render_product product %} +
    2. + {% endfor %} +
    + {% include "oscar/partials/pagination.html" %} +
    +
    + {% else %} +

    + {% trans "No products found." %} +

    + {% endif %} +{% endblock content %} diff --git a/tests/django_oscar/oscar/offer/list.html b/tests/django_oscar/oscar/offer/list.html new file mode 100644 index 0000000..30920fd --- /dev/null +++ b/tests/django_oscar/oscar/offer/list.html @@ -0,0 +1,52 @@ +{% extends "oscar/layout.html" %} +{% load i18n %} +{% load product_tags %} +{% block title %} + {% trans "Offers" %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Offers" %} +{% endblock %} +{% block content %} + {% if not offers %} +

    + {% trans "There are no site offers at the moment." %} +

    + {% else %} + {% for offer in offers %} +

    {{ offer.name }}

    + {% if offer.description %} +

    + {{ offer.description|safe }} +

    + {% endif %} + {% if offer.has_products %} +
      + {% for product in offer.products|slice:":12" %} +
    • + {% render_product product %} +
    • + {% endfor %} +
    +

    + + {% trans "Browse products in offer" %} + +

    + {% endif %} +
    + {% endfor %} + {% endif %} +{% endblock content %} diff --git a/tests/django_oscar/oscar/offer/range.html b/tests/django_oscar/oscar/offer/range.html new file mode 100644 index 0000000..f91b1ab --- /dev/null +++ b/tests/django_oscar/oscar/offer/range.html @@ -0,0 +1,40 @@ +{% extends "oscar/layout.html" %} +{% load basket_tags %} +{% load category_tags %} +{% load i18n %} +{% load product_tags %} +{% block title %}{{ range.name }} | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock breadcrumbs %} +{% block headertext %}{{ range.name }}{% endblock %} +{% block content %} + {% if range.description %}{{ range.description|safe }}{% endif %} + {% if products %} +
    +
    +
      + {% for product in products %} +
    1. + {% render_product product %} +
    2. + {% endfor %} +
    + {% include "oscar/partials/pagination.html" %} +
    +
    + {% else %} +

    + {% trans "No products found." %} +

    + {% endif %} +{% endblock content %} diff --git a/tests/django_oscar/oscar/order/partials/basket_totals.html b/tests/django_oscar/oscar/order/partials/basket_totals.html new file mode 100644 index 0000000..c0fd6ea --- /dev/null +++ b/tests/django_oscar/oscar/order/partials/basket_totals.html @@ -0,0 +1,190 @@ +{% load i18n %} +{% load currency_filters %} +
    + + + + + {% with discounts=order.basket_discounts %} + {% block discount_totals %} + {% if discounts %} + + + + + {% for discount in discounts %} + + + + + {% endfor %} + {% endif %} + {% endblock discount_totals %} + {% block basket_total %} + {% if discounts %} + + + + + {% else %} + + + + + {% endif %} + {% endblock basket_total %} + {% endwith %} + {% block shipping_total %} + + + + + + + + + + + + {% if order.has_shipping_discounts %} + + + + + {% for discount in order.shipping_discounts %} + + + + + {% endfor %} + + + + + {% else %} + + + + + {% endif %} + {% endblock shipping_total %} + {% block surcharges %} + {% with surcharges=order.surcharges.all %} + {% if surcharges %} + + + + + + + + {% for charge in surcharges %} + + + + + {% endfor %} + {% endif %} + {% endwith %} +{% endblock %} +{% if show_tax_separately %} + + + + + + + +{% endif %} +{% block post_order_action_totals %} + {% with actions=order.post_order_actions %} + {% if actions %} + + + + + + + {% for action in order.post_order_actions %} + + + + {% endfor %} + {% endif %} +{% endwith %} +{% endblock post_order_action_totals %} +{% block order_total %} + + + + + + + +{% endblock order_total %} +
    +

    {% trans "Basket" %}

    +
    {% trans "Basket total (before discounts)" %} + {{ order.basket_total_before_discounts_incl_tax|currency:order.currency }} +
    + {% trans "Discount" %} + {{ discount.offer }} + - {{ discount.amount|currency:order.currency }}
    {% trans "Basket total (after discounts)" %} + {{ order.basket_total_incl_tax|currency:order.currency }} +
    {% trans "Basket total" %} + {% if show_tax_separately %} + {{ order.basket_total_excl_tax|currency:order.currency }} + {% else %} + {{ order.basket_total_incl_tax|currency:order.currency }} + {% endif %} +
     
    +

    {% trans "Shipping" %}

    +
    {% trans "Shipping method" %}{{ order.shipping_method }}
    {% trans "Shipping charge (before discounts)" %} + {{ order.shipping_before_discounts_incl_tax|currency:order.currency }} +
    + {% trans "Discount" %} + {{ discount.offer }} + - {{ discount.amount|currency:order.currency }}
    {% trans "Shipping charge (after discounts)" %} + {{ order.shipping_incl_tax|currency:order.currency }} +
    {% trans "Shipping charge" %} + {% if show_tax_separately %} + {{ order.shipping_excl_tax|currency:order.currency }} + {% else %} + {{ order.shipping_incl_tax|currency:order.currency }} + {% endif %} +
     
    +

    {% trans "Surcharges" %}

    +
    {{ charge.name }} + {% if show_tax_separately %} + {{ charge.excl_tax|currency:order.currency }} + {% else %} + {{ charge.incl_tax|currency:order.currency }} + {% endif %} +
    +   +
    + {% trans "Order tax" %} + + {{ order.total_tax|currency:order.currency }} +
    +   +
    +

    + {% trans "Post order actions" %} +

    +
    +

    + {{ action.message }} +

    +
    +   +
    +

    + {% trans "Order total" %} +

    +
    +

    + {{ order.total_incl_tax|currency:order.currency }} +

    +
    +
    diff --git a/tests/django_oscar/oscar/partials/alert_messages.html b/tests/django_oscar/oscar/partials/alert_messages.html new file mode 100644 index 0000000..b62dc70 --- /dev/null +++ b/tests/django_oscar/oscar/partials/alert_messages.html @@ -0,0 +1,39 @@ +{% load string_filters %} +{% comment %} +Use message tags to control these alerts. Available tags include: +- safe: allow HTML in the message +- block: for longer messages - this adds extra padding +- noicon: don't show an icon +- error/success/info - these change the connotation of the alert +{% endcomment %} +
    +{% if messages %} + {% for message in messages %} +
    + + × + +
    + {% if 'noicon' not in message.tags %} + {# Include an icon by default #} + {% if 'success' in message.tags %} + + {% elif 'info' in message.tags %} + + {% elif 'warning' in message.tags %} + + {% elif 'danger' in message.tags or 'error' in message.tags %} + + {% endif %} + {% endif %} + {# Allow HTML to be embedded in messages #} + {% if 'safe' in message.tags %} + {{ message|safe }} + {% else %} + {{ message }} + {% endif %} +
    +
    +{% endfor %} +{% endif %} +
    diff --git a/tests/django_oscar/oscar/partials/brand.html b/tests/django_oscar/oscar/partials/brand.html new file mode 100644 index 0000000..86b4d59 --- /dev/null +++ b/tests/django_oscar/oscar/partials/brand.html @@ -0,0 +1,8 @@ + diff --git a/tests/django_oscar/oscar/partials/extrascripts.html b/tests/django_oscar/oscar/partials/extrascripts.html new file mode 100644 index 0000000..6555625 --- /dev/null +++ b/tests/django_oscar/oscar/partials/extrascripts.html @@ -0,0 +1,4 @@ +{% comment %} +This file exists so you can easily add your own Javascript without +having to fork layout.html etc. Instead, just override this file. +{% endcomment %} diff --git a/tests/django_oscar/oscar/partials/footer.html b/tests/django_oscar/oscar/partials/footer.html new file mode 100644 index 0000000..a19937d --- /dev/null +++ b/tests/django_oscar/oscar/partials/footer.html @@ -0,0 +1,7 @@ +
    + {% block footer %} + {% comment %} + Could be used for displaying links to privacy policy, terms of service, etc. + {% endcomment %} +{% endblock %} +
    diff --git a/tests/django_oscar/oscar/partials/footer_checkout.html b/tests/django_oscar/oscar/partials/footer_checkout.html new file mode 100644 index 0000000..6fd4038 --- /dev/null +++ b/tests/django_oscar/oscar/partials/footer_checkout.html @@ -0,0 +1,3 @@ +
    + {% block footer %}{% endblock %} +
    diff --git a/tests/django_oscar/oscar/partials/form.html b/tests/django_oscar/oscar/partials/form.html new file mode 100644 index 0000000..366c724 --- /dev/null +++ b/tests/django_oscar/oscar/partials/form.html @@ -0,0 +1,24 @@ +{% load i18n %} +
    + {% if not method == "get" %} + {% csrf_token %} + {% endif %} + {% include 'oscar/partials/form_fields.html' %} +
    +
    + + {% trans "or" %} + + {% trans "cancel" %} + + . +
    +
    +
    diff --git a/tests/django_oscar/oscar/partials/form_field.html b/tests/django_oscar/oscar/partials/form_field.html new file mode 100644 index 0000000..6b3a253 --- /dev/null +++ b/tests/django_oscar/oscar/partials/form_field.html @@ -0,0 +1,62 @@ +{% load form_tags %} +{% load widget_tweaks %} +{% if field.is_hidden %} + {{ field }} +{% else %} + {% comment %} + Make the field widget type available to templates so we can mark-up + checkbox and radio inputs differently to other widgets. +{% endcomment %} +{% annotate_form_field field %} +{% block control_group %} +
    + {% block label %} + {% if not nolabel and field.widget_type != 'checkbox' %} + + {% endif %} +{% endblock %} +{% block controls %} +
    + {% block widget %} + {% if field.widget_type == 'checkbox' %} + + {% else %} + {% render_field field class+="form-control" %} + {% endif %} + {% endblock %} + {% block errors %} + {% for error in field.errors %} + + + {{ error }} + + {% endfor %} + {% endblock %} + {% block help_text %} + {% if field.help_text %} + + {# We allow HTML within form help fields #} + {{ field.help_text|safe }} + + {% endif %} + {% endblock %} +
    +{% endblock %} +
    +{% endblock %} +{% endif %} diff --git a/tests/django_oscar/oscar/partials/form_fields.html b/tests/django_oscar/oscar/partials/form_fields.html new file mode 100644 index 0000000..8e43ea0 --- /dev/null +++ b/tests/django_oscar/oscar/partials/form_fields.html @@ -0,0 +1,17 @@ +{% load i18n %} +{% if form.is_bound and not form.is_valid %} +
    + {% trans "Oops! We found some errors" %} + - {% trans "please check the error messages below and try again" %} +
    +{% endif %} +{% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
    + + {{ error }} +
    + {% endfor %} +{% endif %} +{% for field in form %} + {% include 'oscar/partials/form_field.html' with field=field style=style %}{% endfor %} diff --git a/tests/django_oscar/oscar/partials/form_fields_inline.html b/tests/django_oscar/oscar/partials/form_fields_inline.html new file mode 100644 index 0000000..796f02a --- /dev/null +++ b/tests/django_oscar/oscar/partials/form_fields_inline.html @@ -0,0 +1,20 @@ +{% load widget_tweaks %} +{{ form.non_field_errors }} +{% for field in form %} + {% if field.is_hidden %} + {{ field }} + {% else %} + + {{ field.label_tag }} + {% render_field field class+="form-control mr-sm-2" %} + {% for error in field.errors %} +
      +
    • + {{ error }} +
    • +
    + {% endfor %} + {# No help text as it wraps #} +
    +{% endif %} +{% endfor %} diff --git a/tests/django_oscar/oscar/partials/google_analytics.html b/tests/django_oscar/oscar/partials/google_analytics.html new file mode 100644 index 0000000..7056fc7 --- /dev/null +++ b/tests/django_oscar/oscar/partials/google_analytics.html @@ -0,0 +1,15 @@ +{% if google_analytics_id %} + + +{% endif %} diff --git a/tests/django_oscar/oscar/partials/google_analytics_transaction.html b/tests/django_oscar/oscar/partials/google_analytics_transaction.html new file mode 100644 index 0000000..0be6021 --- /dev/null +++ b/tests/django_oscar/oscar/partials/google_analytics_transaction.html @@ -0,0 +1,24 @@ +{% extends "oscar/partials/google_analytics.html" %} +{% load l10n %} +{% block extratracking %} + gtag('event', 'purchase', { + "transaction_id": '{{ order.number|escapejs }}', + "affiliation": '{{ shop_name|escapejs }}', + "value": '{{ order.total_incl_tax|unlocalize|escapejs }}', + "currency": '{{ order.currency|escapejs }}', + "tax": '{{ order.total_tax|unlocalize|escapejs }}', + "shipping": '{{ order.shipping_incl_tax|unlocalize|escapejs }}', + items: [ + {% for line in order.lines.all %} + { + 'id': '{{ line.partner_sku|escapejs }}', + 'name': '{{ line.title|escapejs }}', + 'category': '{{ line.category|default:"Uncategorised"|escapejs }}', + 'price': '{{ line.unit_price_incl_tax|unlocalize|escapejs }}', + 'quantity': '{{ line.quantity|escapejs }}' + } + {% if not forloop.last %},{% endif %} + {% endfor %} + ] + }); +{% endblock %} diff --git a/tests/django_oscar/oscar/partials/mini_basket.html b/tests/django_oscar/oscar/partials/mini_basket.html new file mode 100644 index 0000000..7497a48 --- /dev/null +++ b/tests/django_oscar/oscar/partials/mini_basket.html @@ -0,0 +1,27 @@ +{% load currency_filters %} +{% load i18n %} +
    + {% trans "Basket total:" %} + {% if request.basket.is_tax_known %} + {{ request.basket.total_incl_tax|currency:request.basket.currency }} + {% else %} + {{ request.basket.total_excl_tax|currency:request.basket.currency }} + {% endif %} +
    + + + +
    +
    diff --git a/tests/django_oscar/oscar/partials/nav_accounts.html b/tests/django_oscar/oscar/partials/nav_accounts.html new file mode 100644 index 0000000..e5aea2d --- /dev/null +++ b/tests/django_oscar/oscar/partials/nav_accounts.html @@ -0,0 +1,88 @@ +{% load i18n %} + diff --git a/tests/django_oscar/oscar/partials/nav_checkout.html b/tests/django_oscar/oscar/partials/nav_checkout.html new file mode 100644 index 0000000..1ecd4e8 --- /dev/null +++ b/tests/django_oscar/oscar/partials/nav_checkout.html @@ -0,0 +1,35 @@ + + diff --git a/tests/django_oscar/oscar/partials/nav_primary.html b/tests/django_oscar/oscar/partials/nav_primary.html new file mode 100644 index 0000000..16bcc97 --- /dev/null +++ b/tests/django_oscar/oscar/partials/nav_primary.html @@ -0,0 +1,79 @@ +{% load currency_filters %} +{% load category_tags %} +{% load i18n %} + diff --git a/tests/django_oscar/oscar/partials/pagination.html b/tests/django_oscar/oscar/partials/pagination.html new file mode 100644 index 0000000..8931ce0 --- /dev/null +++ b/tests/django_oscar/oscar/partials/pagination.html @@ -0,0 +1,31 @@ +{% load display_tags %} +{% load i18n %} +{% if paginator.num_pages > 1 %} + +{% endif %} diff --git a/tests/django_oscar/oscar/partials/search.html b/tests/django_oscar/oscar/partials/search.html new file mode 100644 index 0000000..b50562a --- /dev/null +++ b/tests/django_oscar/oscar/partials/search.html @@ -0,0 +1,7 @@ +{% load i18n %} +
    + + +
    diff --git a/tests/django_oscar/oscar/registration/password_reset_complete.html b/tests/django_oscar/oscar/registration/password_reset_complete.html new file mode 100644 index 0000000..7a0b5d4 --- /dev/null +++ b/tests/django_oscar/oscar/registration/password_reset_complete.html @@ -0,0 +1,35 @@ +{% extends 'oscar/layout.html' %} +{% load i18n %} +{% block title %} + {% trans 'Password reset complete' %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Password reset complete" %} +{% endblock %} +{% block content %} +

    + {% trans "Your password has been set. You may go ahead and log in now." %} +

    +

    + + {% trans 'Log in' %} + +

    +{% endblock %} diff --git a/tests/django_oscar/oscar/registration/password_reset_confirm.html b/tests/django_oscar/oscar/registration/password_reset_confirm.html new file mode 100644 index 0000000..328958f --- /dev/null +++ b/tests/django_oscar/oscar/registration/password_reset_confirm.html @@ -0,0 +1,46 @@ +{% extends 'oscar/layout.html' %} +{% load i18n %} +{% block title %} + {% trans 'Enter a new password' %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Enter a new password" %} +{% endblock %} +{% block content %} + {% if validlink %} +

    + {% trans "Please enter your new password twice so we can verify you typed it in correctly." %} +

    +
    + {% csrf_token %} + {% include 'oscar/partials/form_fields.html' %} +
    + +
    +
    + {% else %} +

    {% trans 'Password reset unsuccessful' %}

    +

    + {% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %} +

    + {% endif %} +{% endblock %} diff --git a/tests/django_oscar/oscar/registration/password_reset_done.html b/tests/django_oscar/oscar/registration/password_reset_done.html new file mode 100644 index 0000000..e0fde2e --- /dev/null +++ b/tests/django_oscar/oscar/registration/password_reset_done.html @@ -0,0 +1,38 @@ +{% extends 'oscar/layout.html' %} +{% load i18n %} +{% block title %} + {% trans 'Password reset email sent' %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Email sent" %} +{% endblock %} +{% block content %} +

    + {% blocktrans %} + We've e-mailed you instructions for resetting your password. You should be receiving it shortly. + {% endblocktrans %} +

    +

    + {% blocktrans %} + If you don't receive an email, please make sure you've entered the address you registered with, and check + your spam folder. + {% endblocktrans %} +

    +{% endblock %} diff --git a/tests/django_oscar/oscar/registration/password_reset_form.html b/tests/django_oscar/oscar/registration/password_reset_form.html new file mode 100644 index 0000000..40fce8d --- /dev/null +++ b/tests/django_oscar/oscar/registration/password_reset_form.html @@ -0,0 +1,34 @@ +{% extends 'oscar/layout.html' %} +{% load i18n %} +{% block title %} + {% trans 'Password reset' %} | {{ block.super }} +{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block headertext %} + {% trans "Password reset" %} +{% endblock %} +{% block content %} +
    + {% csrf_token %} +

    + {% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %} +

    + {% include 'oscar/partials/form_fields.html' with style='stacked' %} +
    + +
    +
    +{% endblock %} diff --git a/tests/django_oscar/oscar/search/indexes/product/item_text.txt b/tests/django_oscar/oscar/search/indexes/product/item_text.txt new file mode 100644 index 0000000..8fae4f4 --- /dev/null +++ b/tests/django_oscar/oscar/search/indexes/product/item_text.txt @@ -0,0 +1,3 @@ +{{ object.upc|default:"" }} +{{ object.title }} +{{ object.description|default:"" }} diff --git a/tests/django_oscar/oscar/search/partials/facet.html b/tests/django_oscar/oscar/search/partials/facet.html new file mode 100644 index 0000000..8b37073 --- /dev/null +++ b/tests/django_oscar/oscar/search/partials/facet.html @@ -0,0 +1,25 @@ +{% load i18n %} +
    + + {% for item in items %} +
    + {% if item.selected %} + + + {{ item.name }} + {% else %} + {% if item.disabled %} + + {{ item.name }} + {% else %} + + + {{ item.name }} + {% endif %} + {% endif %} + {% if item.show_count %}({{ item.count }}){% endif %} +
    + {% endfor %} +
    diff --git a/tests/django_oscar/oscar/search/results.html b/tests/django_oscar/oscar/search/results.html new file mode 100644 index 0000000..9a0bd7e --- /dev/null +++ b/tests/django_oscar/oscar/search/results.html @@ -0,0 +1,105 @@ +{% extends "oscar/layout_2_col.html" %} +{% load currency_filters %} +{% load product_tags %} +{% load i18n %} +{% block title %}"{{ query }}" | {{ block.super }}{% endblock %} +{% block breadcrumbs %} + +{% endblock %} +{% block column_left %} + {% if has_facets %} +

    {% trans "Refine your search" %}

    +
    + {% for field, data in facet_data.items %} + {% if data.results %} + {% include 'oscar/search/partials/facet.html' with name=data.name items=data.results %}{% endif %} + {% endfor %} +
    + {% endif %} + {% endblock %} + {% block headertext %} + {% blocktrans with q=query %} + Products matching "{{ q }}" + {% endblocktrans %} + {% endblock %} + {% block content %} +
    + {# Render other search params as hidden inputs #} + {% for value in selected_facets %} + + {% endfor %} + + {% if paginator.count %} + {% if paginator.num_pages > 1 %} + {% blocktrans with start=page.start_index end=page.end_index num_results=paginator.count %} + Found + {{ num_results }} + results, showing + {{ start }} + to + {{ end }} + . + {% endblocktrans %} + {% else %} + {% blocktrans count num_results=paginator.count %} + Found + {{ num_results }} + result. + {% plural %} + Found + {{ num_results }} + results. + {% endblocktrans %} + {% endif %} +
    + {% include "oscar/partials/form_field.html" with field=search_form.sort_by %} +
    + {% else %} +

    + {% trans "Found + 0 + results." %} + {% if suggestion %} + {% url 'search:search' as search_url %} + {% blocktrans %} + Did you mean + + "{{ suggestion }}" + + ? + {% endblocktrans %} + {% endif %} +

    + {% endif %} +
    + {% if page.object_list %} +
    +
    +
      + {% for result in page.object_list %} +
    1. + {% render_product result.object %} +
    2. + {% endfor %} +
    + {% include "oscar/partials/pagination.html" with page_obj=page %} +
    +
    + {% endif %} + {% endblock %} + {% block onbodyload %} + {{ block.super }} + oscar.search.init(); + {% endblock %} diff --git a/tests/django_rest/admin.html b/tests/django_rest/admin.html new file mode 100644 index 0000000..295f4fa --- /dev/null +++ b/tests/django_rest/admin.html @@ -0,0 +1,316 @@ +{% load static %} +{% load i18n %} +{% load rest_framework %} + + + + {% block head %} + {% block meta %} + + + {% endblock %} + + {% block title %}Django REST framework{% endblock %} + + {% block style %} + {% block bootstrap_theme %} + + + {% endblock %} + + + {% endblock %} + {% endblock %} + + {% block body %} + +
    + {% block navbar %} + + {% endblock %} +
    + {% block breadcrumbs %} + + {% endblock %} + +
    + {% if 'GET' in allowed_methods %} +
    +
    +
    + + +
    +
    +
    + {% endif %} + {% if post_form %} + + {% endif %} + {% if put_form %} + + {% endif %} + {% if delete_form %} +
    + +
    + {% endif %} + {% if extra_actions %} + + {% endif %} + {% if filter_form %} + + {% endif %} +
    + +
    + {% block description %}{{ description }}{% endblock %} +
    + {% if paginator %} + + {% endif %} +
    + {% if style == 'list' %} + {% include "rest_framework/admin/list.html" %} + {% else %} + {% include "rest_framework/admin/detail.html" %}{% endif %} +
    + {% if paginator %} + + {% endif %} +
    +
    + +
    + +
    + + + + + + {% if error_form %} + + + {% endif %} + {% if filter_form %}{{ filter_form }}{% endif %} + {% block script %} + + + + + + + + + {% endblock %} + +{% endblock %} + diff --git a/tests/django_rest/admin/detail.html b/tests/django_rest/admin/detail.html new file mode 100644 index 0000000..7537956 --- /dev/null +++ b/tests/django_rest/admin/detail.html @@ -0,0 +1,13 @@ +{% load rest_framework %} + + + {% for key, value in results|items %} + {% if key in details %} + + + + + {% endif %} + {% endfor %} + +
    {{ key|capfirst }}{{ value|format_value }}
    diff --git a/tests/django_rest/admin/dict_value.html b/tests/django_rest/admin/dict_value.html new file mode 100644 index 0000000..37bf0be --- /dev/null +++ b/tests/django_rest/admin/dict_value.html @@ -0,0 +1,11 @@ +{% load rest_framework %} + + + {% for k, v in value|items %} + + + + + {% endfor %} + +
    {{ k|format_value }}{{ v|format_value }}
    diff --git a/tests/django_rest/admin/list.html b/tests/django_rest/admin/list.html new file mode 100644 index 0000000..b159ffe --- /dev/null +++ b/tests/django_rest/admin/list.html @@ -0,0 +1,29 @@ +{% load rest_framework %} + + + + {% for column in columns %}{% endfor %} + + + + + {% for row in results %} + + {% for key, value in row|items %} + {% if key in columns %} + + {% endif %} + {% endfor %} + + + {% endfor %} + +
    {{ column|capfirst }}
    {{ value|format_value }} + {% if row.url %} + + + + {% else %} + + {% endif %} +
    diff --git a/tests/django_rest/admin/list_value.html b/tests/django_rest/admin/list_value.html new file mode 100644 index 0000000..24ee569 --- /dev/null +++ b/tests/django_rest/admin/list_value.html @@ -0,0 +1,11 @@ +{% load rest_framework %} + + + {% for item in value %} + + + + + {% endfor %} + +
    {{ forloop.counter0 }}{{ item|format_value }}
    diff --git a/tests/django_rest/admin/simple_list_value.html b/tests/django_rest/admin/simple_list_value.html new file mode 100644 index 0000000..01997f6 --- /dev/null +++ b/tests/django_rest/admin/simple_list_value.html @@ -0,0 +1,5 @@ +{% load rest_framework %} +{% for item in value %} + {% if not forloop.first %},{% endif %} + {{ item|format_value }} +{% endfor %} diff --git a/tests/django_rest/api.html b/tests/django_rest/api.html new file mode 100644 index 0000000..0b5ef96 --- /dev/null +++ b/tests/django_rest/api.html @@ -0,0 +1,2 @@ +{% extends "rest_framework/base.html" %} +{# Override this template in your own templates directory to customize #} diff --git a/tests/django_rest/base.html b/tests/django_rest/base.html new file mode 100644 index 0000000..07c119c --- /dev/null +++ b/tests/django_rest/base.html @@ -0,0 +1,372 @@ +{% load static %} +{% load i18n %} +{% load rest_framework %} + + + + {% block head %} + {% block meta %} + + + {% endblock %} + + {% block title %} + {% if name %}{{ name }} – {% endif %} + Django REST framework + {% endblock %} + + {% block style %} + {% block bootstrap_theme %} + + + {% endblock %} + + + {% if code_style %} + + {% endif %} + {% endblock %} + {% endblock %} + + {% block body %} + +
    + {% block navbar %} + + {% endblock %} +
    + {% block breadcrumbs %} + + {% endblock %} + +
    + {% block content %} +
    + {% block request_forms %} + {% if 'GET' in allowed_methods %} +
    +
    + {% if api_settings.URL_FORMAT_OVERRIDE %} +
    + + GET + + + +
    + {% else %} + + GET + + {% endif %} +
    +
    + {% endif %} + {% if options_form %} +
    + +
    + {% endif %} + {% if delete_form %} + + + + {% endif %} + {% if extra_actions %} + + {% endif %} + {% if filter_form %} + + {% endif %} + {% endblock request_forms %} +
    +
    + +
    + {% block description %}{{ description }}{% endblock %} +
    + {% if paginator %} + + {% endif %} +
    +
    +                            {{ request.method }} {{ request.get_full_path }}
    +
    +
    +
    HTTP {{ response.status_code }} {{ response.status_text }}{% for key, val in response_headers|items %}
    +{{ key }}: {{ val|break_long_headers|urlize }}{% endfor %}
    +
    +{{ content|urlize }}
    +                        
    +
    +
    + {% if display_edit_forms %} + {% if post_form or raw_data_post_form %} +
    + {% if post_form %} + + {% endif %} +
    + {% if post_form %} +
    + {% with form=post_form %} +
    +
    + {% csrf_token %} + {{ post_form }} +
    + +
    +
    +
    + {% endwith %} +
    + {% endif %} +
    + {% with form=raw_data_post_form %} +
    +
    + {% include "rest_framework/raw_data_form.html" %} +
    + +
    +
    +
    + {% endwith %} +
    +
    +
    + {% endif %} + {% if put_form or raw_data_put_form or raw_data_patch_form %} +
    + {% if put_form %} + + {% endif %} +
    + {% if put_form %} +
    +
    +
    + {{ put_form }} +
    + +
    +
    +
    +
    + {% endif %} +
    + {% with form=raw_data_put_or_patch_form %} +
    +
    + {% include "rest_framework/raw_data_form.html" %} +
    + {% if raw_data_put_form %} + + {% endif %} + {% if raw_data_patch_form %} + + {% endif %} +
    +
    +
    + {% endwith %} +
    +
    +
    +{% endif %} +{% endif %} +{% endblock content %} +
    + +
    + +
    + +{% if filter_form %}{{ filter_form }}{% endif %} +{% block script %} + + + + + + + + +{% endblock %} + +{% endblock %} + diff --git a/tests/django_rest/docs/auth/basic.html b/tests/django_rest/docs/auth/basic.html new file mode 100644 index 0000000..6aea910 --- /dev/null +++ b/tests/django_rest/docs/auth/basic.html @@ -0,0 +1,46 @@ +{% load rest_framework %} + + diff --git a/tests/django_rest/docs/auth/session.html b/tests/django_rest/docs/auth/session.html new file mode 100644 index 0000000..d92e3c5 --- /dev/null +++ b/tests/django_rest/docs/auth/session.html @@ -0,0 +1,41 @@ +{% load rest_framework %} + + diff --git a/tests/django_rest/docs/auth/token.html b/tests/django_rest/docs/auth/token.html new file mode 100644 index 0000000..707b804 --- /dev/null +++ b/tests/django_rest/docs/auth/token.html @@ -0,0 +1,74 @@ +{% load rest_framework %} + + diff --git a/tests/django_rest/docs/document.html b/tests/django_rest/docs/document.html new file mode 100644 index 0000000..048e9d2 --- /dev/null +++ b/tests/django_rest/docs/document.html @@ -0,0 +1,31 @@ +{% load rest_framework %} +
    +
    +

    {{ document.title }}

    + {% if document.description %} +

    + {% render_markdown document.description %} +

    + {% endif %} +
    +
    + {% for html in lang_intro_htmls %} + {% include html %}{% endfor %} +
    +
    + {% if document|data %} + {% for section_key, section in document|data|items %} + {% if section_key %} +

    + {{ section_key }} + + + +

    + {% endif %} + {% for link_key, link in section|schema_links|items %} + {% include "rest_framework/docs/link.html" %}{% endfor %} + {% endfor %} + {% for link_key, link in document.links|items %} + {% include "rest_framework/docs/link.html" %}{% endfor %} + {% endif %} diff --git a/tests/django_rest/docs/error.html b/tests/django_rest/docs/error.html new file mode 100644 index 0000000..3b8e296 --- /dev/null +++ b/tests/django_rest/docs/error.html @@ -0,0 +1,71 @@ +{% load static %} + + + + + + + Error Rendering Schema + + +

    Error

    +
    +{{ data }}
    +        
    + {% if debug is True %} +
    +

    Additional Information

    +

    Note: You are seeing this message because DEBUG==True.

    +

    Seeing this page is usually a configuration error: are your + DEFAULT_AUTHENTICATION_CLASSES or DEFAULT_PERMISSION_CLASSES + being applied unexpectedly?

    +

    Your response status code is: {{ response.status_code }}

    +

    401 Unauthorised.

    +
      +
    • Do you have SessionAuthentication enabled?
    • +
    • Are you logged in?
    • +
    +

    403 Forbidden.

    +
      +
    • Do you have sufficient permissions to access this view?
    • +
    • Is you schema non-empty? (An empty schema will lead to a permission denied error being raised.)
    • +
    +

    Most commonly the intended solution is to disable authentication and permissions + when including the docs urls:

    +
    +   path('docs/', include_docs_urls(title='Your API',
    +                                    authentication_classes=[],
    +                                    permission_classes=[])),
    +                
    +

    Overriding this template

    +

    + If you wish access to your docs to be authenticated you may override this template + at + + rest_framework/docs/error.html + + . +

    +

    + The available context is: + + data + + the error dict above, + + request + + , + + response + + and the + + debug + + flag. +

    + {% endif %} + + + diff --git a/tests/django_rest/docs/index.html b/tests/django_rest/docs/index.html new file mode 100644 index 0000000..e3476ea --- /dev/null +++ b/tests/django_rest/docs/index.html @@ -0,0 +1,51 @@ +{% load static %} + + + + + + + {{ document.title }} + + + + + + + {% if code_style %} + + {% endif %} + + + + + {% include "rest_framework/docs/sidebar.html" %} +
    +
    +
    + {% include "rest_framework/docs/document.html" %} +
    +
    +
    + {% include "rest_framework/docs/auth/token.html" %} + {% include "rest_framework/docs/auth/basic.html" %} + {% include "rest_framework/docs/auth/session.html" %} + + + + + + + diff --git a/tests/django_rest/docs/interact.html b/tests/django_rest/docs/interact.html new file mode 100644 index 0000000..699b46d --- /dev/null +++ b/tests/django_rest/docs/interact.html @@ -0,0 +1,59 @@ +{% load rest_framework %} + + diff --git a/tests/django_rest/docs/langs/javascript-intro.html b/tests/django_rest/docs/langs/javascript-intro.html new file mode 100644 index 0000000..0f1fa7d --- /dev/null +++ b/tests/django_rest/docs/langs/javascript-intro.html @@ -0,0 +1,7 @@ +{% load rest_framework %} +{% load static %} +
    +    {% code html %}
    +    
    +    {% endcode %}
    +
    diff --git a/tests/django_rest/docs/langs/javascript.html b/tests/django_rest/docs/langs/javascript.html new file mode 100644 index 0000000..ae7b84b --- /dev/null +++ b/tests/django_rest/docs/langs/javascript.html @@ -0,0 +1,17 @@ +{% load rest_framework %} +
    +{% code javascript %}var coreapi = window.coreapi  // Loaded by `coreapi.js`
    +var schema = window.schema    // Loaded by `schema.js`
    +
    +// Initialize a client
    +var client = new coreapi.Client()
    +
    +// Interact with the API endpoint
    +var action = [{% if section_key %}"{{ section_key }}", {% endif %}"{{ link_key }}"]
    +{% if link.fields %}var params = {
    +{% for field in link.fields %}    {{ field.name }}: ...{% if not loop.last %},{% endif %}
    +{% endfor % }}
    +{% endif %}client.action(schema, action{% if link.fields %}, params{% endif %}).then(function(result) {
    +    // Return value is in 'result'
    +}){% endcode %}
    +
    diff --git a/tests/django_rest/docs/langs/python-intro.html b/tests/django_rest/docs/langs/python-intro.html new file mode 100644 index 0000000..50e3769 --- /dev/null +++ b/tests/django_rest/docs/langs/python-intro.html @@ -0,0 +1,5 @@ +{% load rest_framework %} +
    +{% code bash %}# Install the Python client library
    +$ pip install coreapi{% endcode %}
    +
    diff --git a/tests/django_rest/docs/langs/python.html b/tests/django_rest/docs/langs/python.html new file mode 100644 index 0000000..8c358e2 --- /dev/null +++ b/tests/django_rest/docs/langs/python.html @@ -0,0 +1,15 @@ +{% load rest_framework %} +
    +{% code python %}import coreapi
    +
    +# Initialize a client & load the schema document
    +client = coreapi.Client()
    +schema = client.get("{{ document.url }}"{% if schema_format %}, format="{{ schema_format }}"{% endif %})
    +
    +# Interact with the API endpoint
    +action = [{% if section_key %}"{{ section_key }}", {% endif %}"{{ link_key }}"]
    +{% if link.fields %}params = {
    +{% for field in link.fields %}    "{{ field.name }}": ...{% if not loop.last %},{% endif %}
    +{% endfor % }}
    +{% endif %}result = client.action(schema, action{% if link.fields %}, params=params{% endif %}){% endcode %}
    +
    diff --git a/tests/django_rest/docs/langs/shell-intro.html b/tests/django_rest/docs/langs/shell-intro.html new file mode 100644 index 0000000..9a32f9d --- /dev/null +++ b/tests/django_rest/docs/langs/shell-intro.html @@ -0,0 +1,5 @@ +{% load rest_framework %} +
    +{% code bash %}# Install the command line client
    +$ pip install coreapi-cli{% endcode %}
    +
    diff --git a/tests/django_rest/docs/langs/shell.html b/tests/django_rest/docs/langs/shell.html new file mode 100644 index 0000000..c7dc781 --- /dev/null +++ b/tests/django_rest/docs/langs/shell.html @@ -0,0 +1,8 @@ +{% load rest_framework %} +
    +{% code bash %}# Load the schema document
    +$ coreapi get {{ document.url }}{% if schema_format %}--format {{ schema_format }}{% endif %}
    +
    +# Interact with the API endpoint
    +$ coreapi action {% if section_key %}{{ section_key }} {% endif %}{{ link_key|cut:"> " }}{% for field in link.fields %}-p {{ field.name }}=...{% endfor %}{% endcode %}
    +
    diff --git a/tests/django_rest/docs/link.html b/tests/django_rest/docs/link.html new file mode 100644 index 0000000..e962b94 --- /dev/null +++ b/tests/django_rest/docs/link.html @@ -0,0 +1,194 @@ +{% load rest_framework %} + + {% include "rest_framework/docs/interact.html" with link=link %} diff --git a/tests/django_rest/docs/sidebar.html b/tests/django_rest/docs/sidebar.html new file mode 100644 index 0000000..b51bc2e --- /dev/null +++ b/tests/django_rest/docs/sidebar.html @@ -0,0 +1,89 @@ +{% load rest_framework %} + diff --git a/tests/django_rest/filters/base.html b/tests/django_rest/filters/base.html new file mode 100644 index 0000000..34e79d3 --- /dev/null +++ b/tests/django_rest/filters/base.html @@ -0,0 +1,18 @@ + diff --git a/tests/django_rest/filters/ordering.html b/tests/django_rest/filters/ordering.html new file mode 100644 index 0000000..a18da19 --- /dev/null +++ b/tests/django_rest/filters/ordering.html @@ -0,0 +1,17 @@ +{% load rest_framework %} +{% load i18n %} +

    {% trans "Ordering" %}

    +
    + {% for key, label in options %} + {% if key == current %} + + + {{ label }} + + {% else %} + + {{ label }} + + {% endif %} + {% endfor %} +
    diff --git a/tests/django_rest/filters/search.html b/tests/django_rest/filters/search.html new file mode 100644 index 0000000..32d07f5 --- /dev/null +++ b/tests/django_rest/filters/search.html @@ -0,0 +1,15 @@ +{% load i18n %} +

    {% trans "Search" %}

    +
    +
    +
    + + + + +
    +
    +
    diff --git a/tests/django_rest/horizontal/checkbox.html b/tests/django_rest/horizontal/checkbox.html new file mode 100644 index 0000000..a612393 --- /dev/null +++ b/tests/django_rest/horizontal/checkbox.html @@ -0,0 +1,18 @@ +
    +{% if field.label %} + +{% endif %} +
    + +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    +
    diff --git a/tests/django_rest/horizontal/checkbox_multiple.html b/tests/django_rest/horizontal/checkbox_multiple.html new file mode 100644 index 0000000..84ff98d --- /dev/null +++ b/tests/django_rest/horizontal/checkbox_multiple.html @@ -0,0 +1,41 @@ +{% load rest_framework %} +
    + {% if field.label %} + +{% endif %} +
    + {% if style.inline %} + {% for key, text in field.choices|items %} + + {% endfor %} + {% else %} + {% for key, text in field.choices|items %} +
    + +
    + {% endfor %} + {% endif %} + {% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} + {% endif %} + {% if field.help_text %} + {{ field.help_text|safe }} + {% endif %} +
    +
    diff --git a/tests/django_rest/horizontal/dict_field.html b/tests/django_rest/horizontal/dict_field.html new file mode 100644 index 0000000..2a79d8f --- /dev/null +++ b/tests/django_rest/horizontal/dict_field.html @@ -0,0 +1,12 @@ +
    + {% if field.label %} + +{% endif %} +
    +

    + Dictionaries are not currently supported in HTML input. +

    +
    +
    diff --git a/tests/django_rest/horizontal/fieldset.html b/tests/django_rest/horizontal/fieldset.html new file mode 100644 index 0000000..f845107 --- /dev/null +++ b/tests/django_rest/horizontal/fieldset.html @@ -0,0 +1,16 @@ +{% load rest_framework %} +
    + {% if field.label %} +
    + + {{ field.label }} + +
    +{% endif %} +{% for nested_field in field %} + {% if not nested_field.read_only %} + {% render_field nested_field style=style %} + {% endif %} +{% endfor %} +
    diff --git a/tests/django_rest/horizontal/form.html b/tests/django_rest/horizontal/form.html new file mode 100644 index 0000000..fa969e7 --- /dev/null +++ b/tests/django_rest/horizontal/form.html @@ -0,0 +1,6 @@ +{% load rest_framework %} +{% for field in form %} + {% if not field.read_only %} + {% render_field field style=style %} + {% endif %} +{% endfor %} diff --git a/tests/django_rest/horizontal/input.html b/tests/django_rest/horizontal/input.html new file mode 100644 index 0000000..c5f0185 --- /dev/null +++ b/tests/django_rest/horizontal/input.html @@ -0,0 +1,21 @@ +
    +{% if field.label %} + +{% endif %} +
    + +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    +
    diff --git a/tests/django_rest/horizontal/list_field.html b/tests/django_rest/horizontal/list_field.html new file mode 100644 index 0000000..a2e8c7b --- /dev/null +++ b/tests/django_rest/horizontal/list_field.html @@ -0,0 +1,12 @@ +
    + {% if field.label %} + +{% endif %} +
    +

    + Lists are not currently supported in HTML input. +

    +
    +
    diff --git a/tests/django_rest/horizontal/list_fieldset.html b/tests/django_rest/horizontal/list_fieldset.html new file mode 100644 index 0000000..b4b8806 --- /dev/null +++ b/tests/django_rest/horizontal/list_fieldset.html @@ -0,0 +1,14 @@ +{% load rest_framework %} +
    + {% if field.label %} +
    + + {{ field.label }} + +
    +{% endif %} +

    + Lists are not currently supported in HTML input. +

    +
    diff --git a/tests/django_rest/horizontal/radio.html b/tests/django_rest/horizontal/radio.html new file mode 100644 index 0000000..614926d --- /dev/null +++ b/tests/django_rest/horizontal/radio.html @@ -0,0 +1,60 @@ +{% load i18n %} +{% load rest_framework %} +{% trans "None" as none_choice %} +
    + {% if field.label %} + +{% endif %} +
    + {% if style.inline %} + {% if field.allow_null or field.allow_blank %} + + {% endif %} + {% for key, text in field.choices|items %} + + {% endfor %} + {% else %} + {% if field.allow_null or field.allow_blank %} +
    + +
    + {% endif %} + {% for key, text in field.choices|items %} +
    + +
    + {% endfor %} + {% endif %} + {% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} + {% endif %} + {% if field.help_text %} + {{ field.help_text|safe }} + {% endif %} +
    +
    diff --git a/tests/django_rest/horizontal/select.html b/tests/django_rest/horizontal/select.html new file mode 100644 index 0000000..35ca394 --- /dev/null +++ b/tests/django_rest/horizontal/select.html @@ -0,0 +1,41 @@ +{% load rest_framework %} +
    + {% if field.label %} + +{% endif %} +
    + + {% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} + {% endif %} + {% if field.help_text %} + {{ field.help_text|safe }} + {% endif %} +
    +
    diff --git a/tests/django_rest/horizontal/select_multiple.html b/tests/django_rest/horizontal/select_multiple.html new file mode 100644 index 0000000..58bd017 --- /dev/null +++ b/tests/django_rest/horizontal/select_multiple.html @@ -0,0 +1,40 @@ +{% load i18n %} +{% load rest_framework %} +{% trans "No items to select." as no_items %} +
    + {% if field.label %} + +{% endif %} +
    + + {% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} + {% endif %} + {% if field.help_text %} + {{ field.help_text|safe }} + {% endif %} +
    +
    diff --git a/tests/django_rest/horizontal/textarea.html b/tests/django_rest/horizontal/textarea.html new file mode 100644 index 0000000..ec56c49 --- /dev/null +++ b/tests/django_rest/horizontal/textarea.html @@ -0,0 +1,21 @@ +
    +{% if field.label %} + +{% endif %} +
    + +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    +
    diff --git a/tests/django_rest/inline/checkbox.html b/tests/django_rest/inline/checkbox.html new file mode 100644 index 0000000..5bd809f --- /dev/null +++ b/tests/django_rest/inline/checkbox.html @@ -0,0 +1,10 @@ +
    +
    + +
    +
    diff --git a/tests/django_rest/inline/checkbox_multiple.html b/tests/django_rest/inline/checkbox_multiple.html new file mode 100644 index 0000000..4e4bcef --- /dev/null +++ b/tests/django_rest/inline/checkbox_multiple.html @@ -0,0 +1,20 @@ +{% load rest_framework %} +
    +{% if field.label %} + +{% endif %} +{% for key, text in field.choices|items %} +
    + +
    +{% endfor %} +
    diff --git a/tests/django_rest/inline/dict_field.html b/tests/django_rest/inline/dict_field.html new file mode 100644 index 0000000..a9dd2b1 --- /dev/null +++ b/tests/django_rest/inline/dict_field.html @@ -0,0 +1,10 @@ +
    + {% if field.label %} + + {% endif %} +

    + Dictionaries are not currently supported in HTML input. +

    +
    diff --git a/tests/django_rest/inline/fieldset.html b/tests/django_rest/inline/fieldset.html new file mode 100644 index 0000000..e49b42f --- /dev/null +++ b/tests/django_rest/inline/fieldset.html @@ -0,0 +1,6 @@ +{% load rest_framework %} +{% for nested_field in field %} + {% if not nested_field.read_only %} + {% render_field nested_field style=style %} + {% endif %} +{% endfor %} diff --git a/tests/django_rest/inline/form.html b/tests/django_rest/inline/form.html new file mode 100644 index 0000000..fa969e7 --- /dev/null +++ b/tests/django_rest/inline/form.html @@ -0,0 +1,6 @@ +{% load rest_framework %} +{% for field in form %} + {% if not field.read_only %} + {% render_field field style=style %} + {% endif %} +{% endfor %} diff --git a/tests/django_rest/inline/input.html b/tests/django_rest/inline/input.html new file mode 100644 index 0000000..1068bc9 --- /dev/null +++ b/tests/django_rest/inline/input.html @@ -0,0 +1,16 @@ +
    +{% if field.label %} + +{% endif %} + +
    diff --git a/tests/django_rest/inline/list_field.html b/tests/django_rest/inline/list_field.html new file mode 100644 index 0000000..9cdb6b5 --- /dev/null +++ b/tests/django_rest/inline/list_field.html @@ -0,0 +1,10 @@ +
    + {% if field.label %} + + {% endif %} +

    + Lists are not currently supported in HTML input. +

    +
    diff --git a/tests/django_rest/inline/list_fieldset.html b/tests/django_rest/inline/list_fieldset.html new file mode 100644 index 0000000..2ae56d7 --- /dev/null +++ b/tests/django_rest/inline/list_fieldset.html @@ -0,0 +1 @@ +Lists are not currently supported in HTML input. diff --git a/tests/django_rest/inline/radio.html b/tests/django_rest/inline/radio.html new file mode 100644 index 0000000..97718d5 --- /dev/null +++ b/tests/django_rest/inline/radio.html @@ -0,0 +1,32 @@ +{% load i18n %} +{% load rest_framework %} +{% trans "None" as none_choice %} +
    +{% if field.label %} + +{% endif %} +{% if field.allow_null or field.allow_blank %} +
    + +
    +{% endif %} +{% for key, text in field.choices|items %} +
    + +
    +{% endfor %} +
    diff --git a/tests/django_rest/inline/select.html b/tests/django_rest/inline/select.html new file mode 100644 index 0000000..2b42ae8 --- /dev/null +++ b/tests/django_rest/inline/select.html @@ -0,0 +1,33 @@ +{% load rest_framework %} +
    +{% if field.label %} + +{% endif %} + +
    diff --git a/tests/django_rest/inline/select_multiple.html b/tests/django_rest/inline/select_multiple.html new file mode 100644 index 0000000..62bd975 --- /dev/null +++ b/tests/django_rest/inline/select_multiple.html @@ -0,0 +1,32 @@ +{% load i18n %} +{% load rest_framework %} +{% trans "No items to select." as no_items %} +
    +{% if field.label %} + +{% endif %} + +
    diff --git a/tests/django_rest/inline/textarea.html b/tests/django_rest/inline/textarea.html new file mode 100644 index 0000000..c491b26 --- /dev/null +++ b/tests/django_rest/inline/textarea.html @@ -0,0 +1,11 @@ +
    +{% if field.label %} + +{% endif %} + +
    diff --git a/tests/django_rest/login.html b/tests/django_rest/login.html new file mode 100644 index 0000000..6c8d589 --- /dev/null +++ b/tests/django_rest/login.html @@ -0,0 +1,2 @@ +{% extends "rest_framework/login_base.html" %} +{# Override this template in your own templates directory to customize #} diff --git a/tests/django_rest/login_base.html b/tests/django_rest/login_base.html new file mode 100644 index 0000000..f47f089 --- /dev/null +++ b/tests/django_rest/login_base.html @@ -0,0 +1,83 @@ +{% extends "rest_framework/base.html" %} +{% load rest_framework %} +{% block body %} + +
    +
    +
    +
    +
    + {% block branding %} +

    Django REST framework

    + {% endblock %} +
    +
    + +
    +
    +
    + {% csrf_token %} + +
    +
    + + + {% if form.username.errors %} +

    + {{ form.username.errors|striptags }} +

    + {% endif %} +
    +
    +
    +
    + + + {% if form.password.errors %} +

    + {{ form.password.errors|striptags }} +

    + {% endif %} +
    +
    + {% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
    + {{ error }} +
    + {% endfor %} + {% endif %} +
    + +
    +
    +
    +
    + +
    + +
    + +
    + + +{% endblock %} diff --git a/tests/django_rest/pagination/numbers.html b/tests/django_rest/pagination/numbers.html new file mode 100644 index 0000000..137a198 --- /dev/null +++ b/tests/django_rest/pagination/numbers.html @@ -0,0 +1,47 @@ + diff --git a/tests/django_rest/pagination/previous_and_next.html b/tests/django_rest/pagination/previous_and_next.html new file mode 100644 index 0000000..42c96e0 --- /dev/null +++ b/tests/django_rest/pagination/previous_and_next.html @@ -0,0 +1,20 @@ + diff --git a/tests/django_rest/raw_data_form.html b/tests/django_rest/raw_data_form.html new file mode 100644 index 0000000..f3c27d4 --- /dev/null +++ b/tests/django_rest/raw_data_form.html @@ -0,0 +1,11 @@ +{% load rest_framework %} +{{ form.non_field_errors }} +{% for field in form %} +
    + {{ field.label_tag|add_class:"col-sm-2 control-label" }} +
    + {{ field|add_class:"form-control" }} + {{ field.help_text|safe }} +
    +
    +{% endfor %} diff --git a/tests/django_rest/schema.js b/tests/django_rest/schema.js new file mode 100644 index 0000000..692cb90 --- /dev/null +++ b/tests/django_rest/schema.js @@ -0,0 +1,3 @@ +var codec = new window.coreapi.codecs.CoreJSONCodec() +var coreJSON = window.atob('{{ schema }}') +window.schema = codec.decode(coreJSON) diff --git a/tests/django_rest/vertical/checkbox.html b/tests/django_rest/vertical/checkbox.html new file mode 100644 index 0000000..d0f9f67 --- /dev/null +++ b/tests/django_rest/vertical/checkbox.html @@ -0,0 +1,16 @@ +
    +
    + +
    +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    diff --git a/tests/django_rest/vertical/checkbox_multiple.html b/tests/django_rest/vertical/checkbox_multiple.html new file mode 100644 index 0000000..127a14b --- /dev/null +++ b/tests/django_rest/vertical/checkbox_multiple.html @@ -0,0 +1,43 @@ +{% load rest_framework %} +
    +{% if field.label %} + +{% endif %} +{% if style.inline %} +
    + {% for key, text in field.choices|items %} + + {% endfor %} +
    +{% else %} + {% for key, text in field.choices|items %} +
    + +
    + {% endfor %} +{% endif %} +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    diff --git a/tests/django_rest/vertical/dict_field.html b/tests/django_rest/vertical/dict_field.html new file mode 100644 index 0000000..75ffb16 --- /dev/null +++ b/tests/django_rest/vertical/dict_field.html @@ -0,0 +1,12 @@ +
    + {% if field.label %} + + {% endif %} +

    + Dictionaries are not currently supported in HTML input. +

    +
    diff --git a/tests/django_rest/vertical/fieldset.html b/tests/django_rest/vertical/fieldset.html new file mode 100644 index 0000000..5c11108 --- /dev/null +++ b/tests/django_rest/vertical/fieldset.html @@ -0,0 +1,15 @@ +{% load rest_framework %} +
    + {% if field.label %} + + {{ field.label }} + + {% endif %} + {% for nested_field in field %} + {% if not nested_field.read_only %} + {% render_field nested_field style=style %} + {% endif %} + {% endfor %} +
    diff --git a/tests/django_rest/vertical/form.html b/tests/django_rest/vertical/form.html new file mode 100644 index 0000000..fa969e7 --- /dev/null +++ b/tests/django_rest/vertical/form.html @@ -0,0 +1,6 @@ +{% load rest_framework %} +{% for field in form %} + {% if not field.read_only %} + {% render_field field style=style %} + {% endif %} +{% endfor %} diff --git a/tests/django_rest/vertical/input.html b/tests/django_rest/vertical/input.html new file mode 100644 index 0000000..39c50f3 --- /dev/null +++ b/tests/django_rest/vertical/input.html @@ -0,0 +1,21 @@ +
    +{% if field.label %} + +{% endif %} + +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    diff --git a/tests/django_rest/vertical/list_field.html b/tests/django_rest/vertical/list_field.html new file mode 100644 index 0000000..d562ff5 --- /dev/null +++ b/tests/django_rest/vertical/list_field.html @@ -0,0 +1,12 @@ +
    + {% if field.label %} + + {% endif %} +

    + Lists are not currently supported in HTML input. +

    +
    diff --git a/tests/django_rest/vertical/list_fieldset.html b/tests/django_rest/vertical/list_fieldset.html new file mode 100644 index 0000000..e834558 --- /dev/null +++ b/tests/django_rest/vertical/list_fieldset.html @@ -0,0 +1,12 @@ +
    + {% if field.label %} + + {{ field.label }} + + {% endif %} +

    + Lists are not currently supported in HTML input. +

    +
    diff --git a/tests/django_rest/vertical/radio.html b/tests/django_rest/vertical/radio.html new file mode 100644 index 0000000..045a6f5 --- /dev/null +++ b/tests/django_rest/vertical/radio.html @@ -0,0 +1,62 @@ +{% load i18n %} +{% load rest_framework %} +{% trans "None" as none_choice %} +
    +{% if field.label %} + +{% endif %} +{% if style.inline %} +
    + {% if field.allow_null or field.allow_blank %} + + {% endif %} + {% for key, text in field.choices|items %} + + {% endfor %} +
    +{% else %} + {% if field.allow_null or field.allow_blank %} +
    + +
    + {% endif %} + {% for key, text in field.choices|items %} +
    + +
    + {% endfor %} +{% endif %} +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    diff --git a/tests/django_rest/vertical/select.html b/tests/django_rest/vertical/select.html new file mode 100644 index 0000000..80cccb5 --- /dev/null +++ b/tests/django_rest/vertical/select.html @@ -0,0 +1,41 @@ +{% load rest_framework %} +
    +{% if field.label %} + +{% endif %} + +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    diff --git a/tests/django_rest/vertical/select_multiple.html b/tests/django_rest/vertical/select_multiple.html new file mode 100644 index 0000000..c055f56 --- /dev/null +++ b/tests/django_rest/vertical/select_multiple.html @@ -0,0 +1,40 @@ +{% load i18n %} +{% load rest_framework %} +{% trans "No items to select." as no_items %} +
    +{% if field.label %} + +{% endif %} + +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    diff --git a/tests/django_rest/vertical/textarea.html b/tests/django_rest/vertical/textarea.html new file mode 100644 index 0000000..0b6e6b1 --- /dev/null +++ b/tests/django_rest/vertical/textarea.html @@ -0,0 +1,21 @@ +
    +{% if field.label %} + +{% endif %} + +{% if field.errors %} + {% for error in field.errors %}{{ error }}{% endfor %} +{% endif %} +{% if field.help_text %} + {{ field.help_text|safe }} +{% endif %} +
    diff --git a/tests/flask_admin/bootstrap2/admin/actions.html b/tests/flask_admin/bootstrap2/admin/actions.html new file mode 100644 index 0000000..ee0d23c --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/actions.html @@ -0,0 +1,40 @@ +{% import 'admin/static.html' as admin_static with context %} +{% macro dropdown(actions, btn_class='dropdown-toggle') - %} + + {{ _gettext('With selected') }} + + + +{% endmacro %} +{% macro form(actions, url) %} +{% if actions %} + +{% endif %} +{% endmacro %} +{% macro script(message, actions, actions_confirmation) %} +{% if actions %} + + + +{% endif %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap2/admin/base.html b/tests/flask_admin/bootstrap2/admin/base.html new file mode 100644 index 0000000..82d0113 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/base.html @@ -0,0 +1,79 @@ +{% import 'admin/layout.html' as layout with context - %} +{% import 'admin/static.html' as admin_static with context %} + + + + + {% block title %} + {% if admin_view.category %}{{ admin_view.category }} - {% endif %} + {{ admin_view.name }} - {{ admin_view.admin.name }} + {% endblock %} + + {% block head_meta %} + + + + + + {% endblock %} + {% block head_css %} + + + + {% if admin_view.extra_css %} + {% for css_url in admin_view.extra_css %} + + {% endfor %} + {% endif %} + + {% endblock %} + {% block head %}{% endblock %} + {% block head_tail %}{% endblock %} + + + {% block page_body %} +
    + + {% block messages %}{{ layout.messages() }}{% endblock %} + {# store the jinja2 context for form_rules rendering logic #} + {% set render_ctx = h.resolve_ctx() %} + {% block body %}{% endblock %}
    {% endblock %} + {% block tail_js %} + + + + + {% if admin_view.extra_js %} + {% for js_url in admin_view.extra_js %} + + {% endfor %} + {% endif %} + {% endblock %} + {% block tail %}{% endblock %} + + diff --git a/tests/flask_admin/bootstrap2/admin/file/form.html b/tests/flask_admin/bootstrap2/admin/file/form.html new file mode 100644 index 0000000..3052310 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/file/form.html @@ -0,0 +1,6 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {% block header %}

    {{ header_text }}

    {% endblock %} + {% block fa_form %}{{ lib.render_form(form, dir_url) }}{% endblock %} +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/file/list.html b/tests/flask_admin/bootstrap2/admin/file/list.html new file mode 100644 index 0000000..64af028 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/file/list.html @@ -0,0 +1,215 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/actions.html' as actionslib with context %} +{% block body %} + {% block breadcrums %} + + {% endblock %} + {% block file_list_table %} +
    + + + + {% block list_header scoped %} + {% if actions %} + + {% endif %} + + {% for column in admin_view.column_list %} + + {% endfor %} + {% endblock %} + + + {% for name, path, is_dir, size, date in items %} + + {% block list_row scoped %} + {% if actions %} + + {% endif %} + + {% if is_dir %} + + {% else %} + + {% if admin_view.is_column_visible('size') %} + + {% endif %} + {% if admin_view.is_column_visible('date') %} + + {% endif %} + {% endif %} + {% endblock %} + + {% endfor %} +
    + +   + {% if admin_view.is_column_sortable(column) %} + {% if sort_column == column %} + + {{ admin_view.column_label(column) }} + {% if sort_desc %} + + {% else %} + + {% endif %} + + {% else %} + + {{ admin_view.column_label(column) }} + + {% endif %} + {% else %} + {{ _gettext(admin_view.column_label(column)) }} + {% endif %} +
    + {% if not is_dir %} + + {% endif %} + + {% block list_row_actions scoped %} + {% if admin_view.can_rename and path and name != '..' %} + {%- if admin_view.rename_modal - %} + {{ lib.add_modal_button(url=get_url('.rename', path=path, modal=True), + title=_gettext('Rename File'), + content=' + + ') }} + {% else %} + + + + {%- endif - %} + {% endif %} + {%- if admin_view.can_delete and path - %} + {% if is_dir %} + {% if name != '..' and admin_view.can_delete_dirs %} +
    + {{ delete_form.path(value=path) }} + {% if delete_form.csrf_token %} + {{ delete_form.csrf_token }} + {% elif csrf_token %} + + {% endif %} + +
    + {% endif %} + {% else %} +
    + {{ delete_form.path(value=path) }} + {% if delete_form.csrf_token %} + {{ delete_form.csrf_token }} + {% elif csrf_token %} + + {% endif %} + +
    + {% endif %} + {%- endif - %} + {% endblock %} +
    + + + {{ name }} + + + {% if admin_view.can_download %} + {%- if admin_view.edit_modal and admin_view.is_file_editable(path) - %} + {{ lib.add_modal_button(url=get_file_url(path, modal=True)|safe, + btn_class='', content=name) }} + {% else %} + + {{ name }} + + {%- endif - %} + {% else %} + {{ name }} + {% endif %} + + {{ size|filesizeformat }} + {{ timestamp_format(date) }}
    +
    + {% endblock %} + {% block toolbar %} +
    + {% if admin_view.can_upload %} +
    + {%- if admin_view.upload_modal - %} + {{ lib.add_modal_button(url=get_dir_url('.upload', path=dir_path, modal=True), + btn_class="btn btn-large", + content=_gettext('Upload File')) }} + {% else %} + + {{ _gettext('Upload File') }} + + {%- endif - %} +
    + {% endif %} + {% if admin_view.can_mkdir %} +
    + {%- if admin_view.mkdir_modal - %} + {{ lib.add_modal_button(url=get_dir_url('.mkdir', path=dir_path, modal=True), + btn_class="btn btn-large", + content=_gettext('Create Directory')) }} + {% else %} + + {{ _gettext('Create Directory') }} + + {%- endif - %} +
    + {% endif %} + {% if actions %} +
    + {{ actionslib.dropdown(actions, 'dropdown-toggle btn btn-large') }} +
    + {% endif %} +
    + {% endblock %} + {% block actions %} + {{ actionslib.form(actions, get_url('.action_view')) }} + {% endblock %} + {%- if admin_view.rename_modal or admin_view.mkdir_modal + or admin_view.upload_modal or admin_view.edit_modal -%} + {{ lib.add_modal_window() }} + {%- endif - %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ actionslib.script(_gettext('Please select at least one file.'), + actions, + actions_confirmation) }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/file/modals/form.html b/tests/flask_admin/bootstrap2/admin/file/modals/form.html new file mode 100644 index 0000000..c9efe92 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/file/modals/form.html @@ -0,0 +1,15 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {# content added to modal-content #} + {% block fa_form %} + {{ lib.render_form(form, dir_url, action=request.url, is_modal=True) }} + {% endblock %} +{% endblock %} +{% block tail %} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/index.html b/tests/flask_admin/bootstrap2/admin/index.html new file mode 100644 index 0000000..6c4bda4 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/index.html @@ -0,0 +1,2 @@ +{% extends 'admin/master.html' %} +{% block body %}{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/layout.html b/tests/flask_admin/bootstrap2/admin/layout.html new file mode 100644 index 0000000..dfb9128 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/layout.html @@ -0,0 +1,104 @@ +{% macro menu_icon(item) - %} +{% set icon_type = item.get_icon_type() %} +{%- if icon_type %} +{% set icon_value = item.get_icon_value() %} +{% if icon_type == 'glyph' %} + +{% elif icon_type == 'fa' %} + +{% elif icon_type == 'image' %} + menu image + {% elif icon_type == 'image-url' %} + menu image + {% endif %} + {% endif %} + {%- endmacro %} + {% macro menu(menu_root=None) %} + {% if menu_root is none %} + {% set menu_root = admin_view.admin.menu() %} + {% endif %} + {%- for item in menu_root %} + {%- if item.is_category() - %} + {% set children = item.get_children() %} + {%- if children %} + {% set class_name = item.get_class_name() or '' %} + {%- if item.is_active(admin_view) %} + +{% endif %} +{%- else %} +{%- if item.is_accessible() and item.is_visible() - %} +{% set class_name = item.get_class_name() %} +{%- if item.is_active(admin_view) %} +
  • +{%- else %} + +{%- endif %} + +{{ menu_icon(item) }}{{ item.name }} + +
  • +{%- endif - %} +{% endif - %} +{% endfor %} +{% endmacro %} +{% macro menu_links(links=None) %} +{% if links is none %}{% set links = admin_view.admin.menu_links() %}{% endif %} +{% for item in links %} +{% set class_name = item.get_class_name() %} +{% if item.is_accessible() and item.is_visible() %} + +{{ menu_icon(item) }}{{ item.name }} + +{% endif %} +{% endfor %} +{% endmacro %} +{% macro messages() %} +{% with messages = get_flashed_messages(with_categories=True) %} +{% if messages %} +{% for category, m in messages %} +{% if category %} +
    +{% else %} +
    +{% endif %} + +x + +{{ m }} +
    +{% endfor %} +{% endif %} +{% endwith %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap2/admin/lib.html b/tests/flask_admin/bootstrap2/admin/lib.html new file mode 100644 index 0000000..3b7995c --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/lib.html @@ -0,0 +1,267 @@ +{% import 'admin/static.html' as admin_static with context %} +{# ---------------------- Pager -------------------------- #} +{% macro pager(page, pages, generator) - %} +{% if pages > 1 %} + +{% endif %} +{%- endmacro %} +{% macro simple_pager(page, have_next, generator) - %} + +{%- endmacro %} +{# ---------------------- Modal Window -------------------------- #} +{% macro add_modal_window(modal_window_id='fa_modal_window') %} + +{% endmacro %} +{% macro add_modal_button(url='', title='', content='', modal_window_id='fa_modal_window', btn_class='icon') %} + +{{ content|safe }} + +{% endmacro %} +{# ---------------------- Forms -------------------------- #} +{% macro render_field(form, field, kwargs={}, caller=None) %} +{% set direct_error = h.is_field_error(field.errors) %} +
    +
    + +
    +
    +
    + {{ field(**kwargs)|safe }} +
    + {% if field.description %} +

    + {{ field.description|safe }} +

    + {% endif %} + {% if direct_error %} +
      + {% for e in field.errors if e is string %} +
    • + {{ e }} +
    • + {% endfor %} +
    + {% endif %} +
    +{% if caller %}{{ caller(form, field, direct_error, kwargs) }}{% endif %} +
    +{% endmacro %} +{% macro render_header(form, text) %} +

    {{ text }}

    +{% endmacro %} +{% macro render_form_fields(form, form_opts=None) %} +{% if form.hidden_tag is defined %} +{{ form.hidden_tag() }} +{% else %} +{% if csrf_token %} + +{% endif %} +{% for f in form if f.widget.input_type == 'hidden' %} +{{ f }} +{% endfor %} +{% endif %} +{% if form_opts and form_opts.form_rules %} +{% for r in form_opts.form_rules %}{{ r(form, form_opts=form_opts) }}{% endfor %} +{% else %} +{% for f in form if f.widget.input_type != 'hidden' %} +{% if form_opts %} +{% set kwargs = form_opts.widget_args.get(f.short_name, {}) %} +{% else %} +{% set kwargs = {} %} +{% endif %} +{{ render_field(form, f, kwargs) }} +{% endfor %} +{% endif %} +{% endmacro %} +{% macro form_tag(form=None, action=None) %} +
    +
    +{{ caller() }} +
    +
    +{% endmacro %} +{% macro render_form_buttons(cancel_url, extra=None, is_modal=False) %} +
    +
    +
    + +{% if extra %}{{ extra }}{% endif %} +{% if cancel_url %} + +{{ _gettext('Cancel') }} + +{% endif %} +
    +
    +{% endmacro %} +{% macro render_form(form, cancel_url, extra=None, form_opts=None, action=None, is_modal=False) - %} +{% call form_tag(action=action) %} +{{ render_form_fields(form, form_opts=form_opts) }} +{{ render_form_buttons(cancel_url, extra, is_modal) }} +{% endcall %} +{% endmacro %} +{% macro form_css() %} + + +{% if config.MAPBOX_MAP_ID %} + + +{% endif %} +{% if editable_columns %} + +{% endif %} +{% endmacro %} +{% macro form_js() %} +{% if config.MAPBOX_MAP_ID %} + + + +{% if config.MAPBOX_SEARCH %} + + +{% endif %} +{% endif %} + +{% if editable_columns %} + +{% endif %} + +{% endmacro %} +{% macro extra() %} +{% if admin_view.can_create %} + +{% endif %} +{% if admin_view.can_edit %} + +{% endif %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap2/admin/master.html b/tests/flask_admin/bootstrap2/admin/master.html new file mode 100644 index 0000000..8f27dad --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/master.html @@ -0,0 +1 @@ +{% extends admin_base_template %} diff --git a/tests/flask_admin/bootstrap2/admin/model/create.html b/tests/flask_admin/bootstrap2/admin/model/create.html new file mode 100644 index 0000000..697a38e --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/create.html @@ -0,0 +1,26 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% from 'admin/lib.html' import extra with context %} {# backward compatible #} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block create_form %} + {{ lib.render_form(form, return_url, extra(), form_opts) }} + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ lib.form_js() }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/model/details.html b/tests/flask_admin/bootstrap2/admin/model/details.html new file mode 100644 index 0000000..2627da8 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/details.html @@ -0,0 +1,54 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block details_search %} +
    +
    + {{ _gettext('Filter') }} + +
    +
    + {% endblock %} + {% block details_table %} + + {% for c, name in details_columns %} + + + + + {% endfor %} +
    + + {{ name }} + + {{ get_value(model, c) }}
    + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/model/edit.html b/tests/flask_admin/bootstrap2/admin/model/edit.html new file mode 100644 index 0000000..9eef6a7 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/edit.html @@ -0,0 +1,40 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% from 'admin/lib.html' import extra with context %} {# backward compatible #} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block edit_form %} + {{ lib.render_form(form, return_url, extra(), form_opts) }} + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ lib.form_js() }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/model/inline_field_list.html b/tests/flask_admin/bootstrap2/admin/model/inline_field_list.html new file mode 100644 index 0000000..c46db1b --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/inline_field_list.html @@ -0,0 +1,14 @@ +{% import 'admin/model/inline_list_base.html' as base with context %} +{% macro render_field(field) %} +{{ field }} +{% if h.is_field_error(field.errors) %} +
      + {% for e in field.errors if e is string %} +
    • + {{ e }} +
    • + {% endfor %} +
    +{% endif %} +{% endmacro %} +{{ base.render_inline_fields(field, template, render_field, check) }} diff --git a/tests/flask_admin/bootstrap2/admin/model/inline_form.html b/tests/flask_admin/bootstrap2/admin/model/inline_form.html new file mode 100644 index 0000000..9a4b9fa --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/inline_form.html @@ -0,0 +1,4 @@ +{% import 'admin/lib.html' as lib with context %} +
    + {{ lib.render_form_fields(field.form, form_opts=form_opts) }} +
    diff --git a/tests/flask_admin/bootstrap2/admin/model/inline_list_base.html b/tests/flask_admin/bootstrap2/admin/model/inline_list_base.html new file mode 100644 index 0000000..66327b8 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/inline_list_base.html @@ -0,0 +1,55 @@ +{% macro render_inline_fields(field, template, render, check=None) %} +
    + {# existing inline form fields #} +
    + {% for subfield in field %} +
    + {%- if not check or check(subfield) %} + + {{ field.label.text }} #{{ loop.index }} +
    + {% if subfield.get_pk and subfield.get_pk() %} + + + {% else %} + + + + {% endif %} +
    +
    + {%- endif - %} + {{ render(subfield) }} +
    + {% endfor %} +
    + {# template for new inline form fields #} +
    + {% filter forceescape %} +
    + + {{ _gettext('New') }} {{ field.label.text }} +
    + + + +
    +
    + {{ render(template) }} +
    + {% endfilter %} +
    + + {{ _gettext('Add') }} {{ field.label.text }} + +
    +{% endmacro %} diff --git a/tests/flask_admin/bootstrap2/admin/model/layout.html b/tests/flask_admin/bootstrap2/admin/model/layout.html new file mode 100644 index 0000000..ac6c849 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/layout.html @@ -0,0 +1,130 @@ +{% macro filter_options(btn_class='dropdown-toggle') %} + + {{ _gettext('Add Filter') }} + + + +{% endmacro %} +{% macro export_options(btn_class='dropdown-toggle') %} +{% if admin_view.export_types|length > 1 %} + +{% else %} +
  • + + {{ _gettext('Export') }} + +
  • +{% endif %} +{% endmacro %} +{% macro filter_form() %} +
    +{% for arg_name, arg_value in extra_args.items() %} + +{% endfor %} +{% if sort_column is not none %} + +{% endif %} +{% if sort_desc %} + +{% endif %} +{% if search %} + +{% endif %} +{% if page_size != default_page_size %} + +{% endif %} +
    + +{% if active_filters %} + + {{ _gettext('Reset Filters') }} + +{% endif %} +
    +
    +
    +
    +{% endmacro %} +{% macro search_form(input_class=None) %} +
    +{% for flt_name, flt_value in filter_args.items() %} + +{% endfor %} +{% for arg_name, arg_value in extra_args.items() %} + +{% endfor %} +{% if page_size != default_page_size %} + +{% endif %} +{% if sort_column is not none %} + +{% endif %} +{% if sort_desc %} + +{% endif %} +{%- set full_search_placeholder = _gettext('Search') %} +{%- if search_placeholder %}{% set full_search_placeholder = [full_search_placeholder, search_placeholder] | join(": ") %} +{% endif %} +{% if search %} +
    + + + + +
    +{% else %} + +{% endif %} +
    +{% endmacro %} +{% macro page_size_form(generator, btn_class='dropdown-toggle') %} + +{{ page_size }} {{ _gettext('items') }} + + + +{% endmacro %} diff --git a/tests/flask_admin/bootstrap2/admin/model/list.html b/tests/flask_admin/bootstrap2/admin/model/list.html new file mode 100755 index 0000000..a9185d1 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/list.html @@ -0,0 +1,194 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/model/layout.html' as model_layout with context %} +{% import 'admin/actions.html' as actionlib with context %} +{% import 'admin/model/row_actions.html' as row_actions with context %} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block model_menu_bar %} + + {% endblock %} + {% if filters %} + {{ model_layout.filter_form() }} +
    + {% endif %} + {% block model_list_table %} +
    + + + + {% block list_header scoped %} + {% if actions %} + + {% endif %} + {% block list_row_actions_header %} + {% if admin_view.column_display_actions %} + + {% endif %} + {% endblock %} + {% for c, name in list_columns %} + {% set column = loop.index0 %} + + {% endfor %} + {% endblock %} + + + {% for row in data %} + + {% block list_row scoped %} + {% if actions %} + + {% endif %} + {% block list_row_actions_column scoped %} + {% if admin_view.column_display_actions %} + + {%- endif - %} + {% endblock %} + {% for c, name in list_columns %} + + {% endfor %} + {% endblock %} + + {% else %} + + + + {% endfor %} +
    + +   + {% if admin_view.is_sortable(c) %} + {% if sort_column == column %} + + {{ name }} + {% if sort_desc %} + + {% else %} + + {% endif %} + + {% else %} + + {{ name }} + + {% endif %} + {% else %} + {{ name }} + {% endif %} + {% if admin_view.column_descriptions.get(c) %} + + {% endif %} +
    + + + {% block list_row_actions scoped %} + {% for action in list_row_actions %}{{ action.render_ctx(get_pk_value(row), row) }}{% endfor %} + {% endblock %} + + {% if admin_view.is_editable(c) %} + {% set form = list_forms[get_pk_value(row)] %} + {% if form.csrf_token %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c), csrf=form.csrf_token._value()) }} + {% elif csrf_token %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c), csrf=csrf_token()) }} + {% else %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c)) }} + {% endif %} + {% else %} + {{ get_value(row, c) }} + {% endif %} +
    + {% block empty_list_message %} +
    + {{ admin_view.get_empty_list_message() }} +
    + {% endblock %} +
    +
    + {% block list_pager %} + {% if num_pages is not none %} + {{ lib.pager(page, num_pages, pager_url) }} + {% else %} + {{ lib.simple_pager(page, data|length == page_size, pager_url) }} + {% endif %} + {% endblock %} + {% endblock %} + {{ actionlib.form(actions, get_url('.action_view')) }} + {%- if admin_view.edit_modal or admin_view.create_modal or admin_view.details_modal - %} + {{ lib.add_modal_window() }} + {%- endif - %} + {% endblock %} + {% block tail %} + {{ super() }} + {% if filter_groups %} + + + {% endif %} + {{ lib.form_js() }} + + {{ actionlib.script(_gettext('Please select at least one record.'), + actions, + actions_confirmation) }} + {% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/model/modals/create.html b/tests/flask_admin/bootstrap2/admin/model/modals/create.html new file mode 100644 index 0000000..b0b961b --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/modals/create.html @@ -0,0 +1,21 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{# store the jinja2 context for form_rules rendering logic #} +{% set render_ctx = h.resolve_ctx() %} +{% block body %} + {# "save and add" button is removed from modal (it won't function properly) #} + {% block create_form %} + {{ lib.render_form(form, return_url, extra=None, form_opts=form_opts, + action=url_for('.create_view', url=return_url), + is_modal=True) }} + {% endblock %} +{% endblock %} +{% block tail %} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/model/modals/details.html b/tests/flask_admin/bootstrap2/admin/model/modals/details.html new file mode 100755 index 0000000..47894df --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/modals/details.html @@ -0,0 +1,36 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {% block details_search %} +
    +
    + {{ _gettext('Filter') }} + +
    +
    + {% endblock %} + {% block details_table %} + + {% for c, name in details_columns %} + + + + + {% endfor %} +
    + + {{ name }} + + {{ get_value(model, c) }}
    + {% endblock %} +{% endblock %} +{% block tail %} + + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/model/modals/edit.html b/tests/flask_admin/bootstrap2/admin/model/modals/edit.html new file mode 100644 index 0000000..7d4f3e3 --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/modals/edit.html @@ -0,0 +1,21 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{# store the jinja2 context for form_rules rendering logic #} +{% set render_ctx = h.resolve_ctx() %} +{% block body %} + {# "save and continue" button is removed from modal (it won't function properly) #} + {% block edit_form %} + {{ lib.render_form(form, return_url, extra=None, form_opts=form_opts, + action=url_for('.edit_view', id=request.args.get('id'), url=return_url), + is_modal=True) }} + {% endblock %} +{% endblock %} +{% block tail %} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/model/row_actions.html b/tests/flask_admin/bootstrap2/admin/model/row_actions.html new file mode 100644 index 0000000..01e248c --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/model/row_actions.html @@ -0,0 +1,37 @@ +{% import 'admin/lib.html' as lib with context %} +{% macro link(action, url, icon_class=None) %} + + + +{% endmacro %} +{% macro view_row(action, row_id, row) %} +{{ link(action, get_url('.details_view', id=row_id, url=return_url), 'fa fa-eye glyphicon icon-eye-open') }} +{% endmacro %} +{% macro view_row_popup(action, row_id, row) %} +{{ lib.add_modal_button(url=get_url('.details_view', id=row_id, url=return_url, modal=True), title=action.title, content=' + +') }} +{% endmacro %} +{% macro edit_row(action, row_id, row) %} +{{ link(action, get_url('.edit_view', id=row_id, url=return_url), 'fa fa-pencil glyphicon icon-pencil') }} +{% endmacro %} +{% macro edit_row_popup(action, row_id, row) %} +{{ lib.add_modal_button(url=get_url('.edit_view', id=row_id, url=return_url, modal=True), title=action.title, content=' + +') }} +{% endmacro %} +{% macro delete_row(action, row_id, row) %} +
    +{{ delete_form.id(value=get_pk_value(row)) }} +{{ delete_form.url(value=return_url) }} +{% if delete_form.csrf_token %} +{{ delete_form.csrf_token }} +{% elif csrf_token %} + +{% endif %} + +
    +{% endmacro %} diff --git a/tests/flask_admin/bootstrap2/admin/rediscli/console.html b/tests/flask_admin/bootstrap2/admin/rediscli/console.html new file mode 100644 index 0000000..441c5ce --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/rediscli/console.html @@ -0,0 +1,24 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/static.html' as admin_static with context %} +{% block head %} + {{ super() }} + +{% endblock %} +{% block body %} +
    +
    +
    +
    + +
    +
    +
    +{% endblock %} +{% block tail %} + {{ super() }} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap2/admin/rediscli/response.html b/tests/flask_admin/bootstrap2/admin/rediscli/response.html new file mode 100644 index 0000000..661852c --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/rediscli/response.html @@ -0,0 +1,35 @@ +{% macro render(item, depth=0) %} +{% set type = type_name(item) %} +{% if type == 'tuple' or type == 'list' %} + {% if not item %} + Empty {{ type }}. + {% else %} + {% for n in item %} + {{ loop.index }}) {{ render(n, depth + 1) }} +
    + {% endfor %} + {% endif %} +{% elif type == 'bool' %} + {% if depth == 0 and item %} + OK + {% else %} + {{ item }} + {% endif %} +{% elif type == 'str' or type == 'unicode' %} + "{{ item }}" +{% elif type == 'bytes' %} + "{{ item.decode('utf-8') }}" +{% elif type == 'TextWrapper' %} +
    +{{ item }}
    +    
    +{% elif type == 'dict' %} + {% for k, v in item.items() %} + {{ loop.index }}) {{ k }} - {{ render(v, depth + 1) }} +
    + {% endfor %} +{% else %} + {{ item }} +{% endif %} +{% endmacro %} +{{ render(result) }} diff --git a/tests/flask_admin/bootstrap2/admin/static.html b/tests/flask_admin/bootstrap2/admin/static.html new file mode 100644 index 0000000..811f9ba --- /dev/null +++ b/tests/flask_admin/bootstrap2/admin/static.html @@ -0,0 +1,3 @@ +{% macro url() - %} +{{ get_url('{admin_endpoint}.static'.format(admin_endpoint=admin_view.admin.endpoint), *varargs, **kwargs) }} +{%- endmacro %} diff --git a/tests/flask_admin/bootstrap3/admin/actions.html b/tests/flask_admin/bootstrap3/admin/actions.html new file mode 100644 index 0000000..d91a83d --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/actions.html @@ -0,0 +1,40 @@ +{% import 'admin/static.html' as admin_static with context %} +{% macro dropdown(actions, btn_class='btn dropdown-toggle') - %} + + {{ _gettext('With selected') }} + + + +{% endmacro %} +{% macro form(actions, url) %} +{% if actions %} + +{% endif %} +{% endmacro %} +{% macro script(message, actions, actions_confirmation) %} +{% if actions %} + + + +{% endif %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap3/admin/base.html b/tests/flask_admin/bootstrap3/admin/base.html new file mode 100644 index 0000000..ff272eb --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/base.html @@ -0,0 +1,96 @@ +{% import 'admin/layout.html' as layout with context - %} +{% import 'admin/static.html' as admin_static with context %} + + + + + {% block title %} + {% if admin_view.category %}{{ admin_view.category }} - {% endif %} + {{ admin_view.name }} - {{ admin_view.admin.name }} + {% endblock %} + + {% block head_meta %} + + + + + + {% endblock %} + {% block head_css %} + + {% if config.get('FLASK_ADMIN_SWATCH', 'default') == 'default' %} + + {% endif %} + + + {% if admin_view.extra_css %} + {% for css_url in admin_view.extra_css %} + + {% endfor %} + {% endif %} + + {% endblock %} + {% block head %}{% endblock %} + {% block head_tail %}{% endblock %} + + + {% block page_body %} +
    + + {% block messages %}{{ layout.messages() }}{% endblock %} + {# store the jinja2 context for form_rules rendering logic #} + {% set render_ctx = h.resolve_ctx() %} + {% block body %}{% endblock %}
    {% endblock %} + {% block tail_js %} + + + + + + {% if admin_view.extra_js %} + {% for js_url in admin_view.extra_js %} + + {% endfor %} + {% endif %} + {% endblock %} + {% block tail %}{% endblock %} + + diff --git a/tests/flask_admin/bootstrap3/admin/file/form.html b/tests/flask_admin/bootstrap3/admin/file/form.html new file mode 100644 index 0000000..3052310 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/file/form.html @@ -0,0 +1,6 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {% block header %}

    {{ header_text }}

    {% endblock %} + {% block fa_form %}{{ lib.render_form(form, dir_url) }}{% endblock %} +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/file/list.html b/tests/flask_admin/bootstrap3/admin/file/list.html new file mode 100644 index 0000000..67da4ed --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/file/list.html @@ -0,0 +1,211 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/actions.html' as actionslib with context %} +{% block body %} + {% block breadcrums %} + + {% endblock %} + {% block file_list_table %} +
    + + + + {% block list_header scoped %} + {% if actions %} + + {% endif %} + + {% for column in admin_view.column_list %} + + {% endfor %} + {% endblock %} + + + {% for name, path, is_dir, size, date in items %} + + {% block list_row scoped %} + {% if actions %} + + {% endif %} + + {% if is_dir %} + + {% else %} + + {% if admin_view.is_column_visible('size') %} + + {% endif %} + {% endif %} + {% if admin_view.is_column_visible('date') %} + + {% endif %} + {% endblock %} + + {% endfor %} +
    + +   + {% if admin_view.is_column_sortable(column) %} + {% if sort_column == column %} + + {{ admin_view.column_label(column) }} + {% if sort_desc %} + + {% else %} + + {% endif %} + + {% else %} + + {{ admin_view.column_label(column) }} + + {% endif %} + {% else %} + {{ _gettext(admin_view.column_label(column)) }} + {% endif %} +
    + {% if not is_dir %} + + {% endif %} + + {% block list_row_actions scoped %} + {% if admin_view.can_rename and path and name != '..' %} + {%- if admin_view.rename_modal - %} + {{ lib.add_modal_button(url=get_url('.rename', path=path, modal=True), + title=_gettext('Rename File'), + content=' + + ') }} + {% else %} + + + + {%- endif - %} + {% endif %} + {%- if admin_view.can_delete and path - %} + {% if is_dir %} + {% if name != '..' and admin_view.can_delete_dirs %} +
    + {{ delete_form.path(value=path) }} + {% if delete_form.csrf_token %} + {{ delete_form.csrf_token }} + {% elif csrf_token %} + + {% endif %} + +
    + {% endif %} + {% else %} +
    + {{ delete_form.path(value=path) }} + {% if delete_form.csrf_token %} + {{ delete_form.csrf_token }} + {% elif csrf_token %} + + {% endif %} + +
    + {% endif %} + {%- endif - %} + {% endblock %} +
    + + + {{ name }} + + + {% if admin_view.can_download %} + {%- if admin_view.edit_modal and admin_view.is_file_editable(path) - %} + {{ lib.add_modal_button(url=get_file_url(path, modal=True)|safe, + btn_class='', content=name) }} + {% else %} + + {{ name }} + + {%- endif - %} + {% else %} + {{ name }} + {% endif %} + {{ size|filesizeformat }}{{ timestamp_format(date) }}
    +
    + {% endblock %} + {% block toolbar %} +
    + {% if admin_view.can_upload %} +
    + {%- if admin_view.upload_modal - %} + {{ lib.add_modal_button(url=get_dir_url('.upload', path=dir_path, modal=True), + btn_class="btn btn-default btn-large", + content=_gettext('Upload File')) }} + {% else %} + + {{ _gettext('Upload File') }} + + {%- endif - %} +
    + {% endif %} + {% if admin_view.can_mkdir %} +
    + {%- if admin_view.mkdir_modal - %} + {{ lib.add_modal_button(url=get_dir_url('.mkdir', path=dir_path, modal=True), + btn_class="btn btn-default btn-large", + content=_gettext('Create Directory')) }} + {% else %} + + {{ _gettext('Create Directory') }} + + {%- endif - %} +
    + {% endif %} + {% if actions %} +
    + {{ actionslib.dropdown(actions, 'dropdown-toggle btn btn-default btn-large') }} +
    + {% endif %} +
    + {% endblock %} + {% block actions %} + {{ actionslib.form(actions, get_url('.action_view')) }} + {% endblock %} + {%- if admin_view.rename_modal or admin_view.mkdir_modal + or admin_view.upload_modal or admin_view.edit_modal -%} + {{ lib.add_modal_window() }} + {%- endif - %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ actionslib.script(_gettext('Please select at least one file.'), + actions, + actions_confirmation) }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/file/modals/form.html b/tests/flask_admin/bootstrap3/admin/file/modals/form.html new file mode 100644 index 0000000..6937032 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/file/modals/form.html @@ -0,0 +1,19 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {# content added to modal-content #} + + +{% endblock %} +{% block tail %} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/index.html b/tests/flask_admin/bootstrap3/admin/index.html new file mode 100644 index 0000000..6c4bda4 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/index.html @@ -0,0 +1,2 @@ +{% extends 'admin/master.html' %} +{% block body %}{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/layout.html b/tests/flask_admin/bootstrap3/admin/layout.html new file mode 100644 index 0000000..c4b5e45 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/layout.html @@ -0,0 +1,108 @@ +{% macro menu_icon(item) - %} +{% set icon_type = item.get_icon_type() %} +{%- if icon_type %} +{% set icon_value = item.get_icon_value() %} +{% if icon_type == 'glyph' %} + +{% elif icon_type == 'fa' %} + +{% elif icon_type == 'image' %} + menu image + {% elif icon_type == 'image-url' %} + menu image + {% endif %} + {% endif %} + {%- endmacro %} + {% macro menu(menu_root=None) %} + {% if menu_root is none %} + {% set menu_root = admin_view.admin.menu() %} + {% endif %} + {%- for item in menu_root %} + {%- if item.is_category() - %} + {% set children = item.get_children() %} + {%- if children %} + {% set class_name = item.get_class_name() or '' %} + {%- if item.is_active(admin_view) %} + +{% endif %} +{%- else %} +{%- if item.is_accessible() and item.is_visible() - %} +{% set class_name = item.get_class_name() %} +{%- if item.is_active(admin_view) %} +
  • +{%- else %} + +{%- endif %} + +{{ menu_icon(item) }}{{ item.name }} + +
  • +{%- endif - %} +{% endif - %} +{% endfor %} +{% endmacro %} +{% macro menu_links(links=None) %} +{% if links is none %}{% set links = admin_view.admin.menu_links() %}{% endif %} +{% for item in links %} +{% set class_name = item.get_class_name() %} +{% if item.is_accessible() and item.is_visible() %} + +{{ menu_icon(item) }}{{ item.name }} + +{% endif %} +{% endfor %} +{% endmacro %} +{% macro messages() %} +{% with messages = get_flashed_messages(with_categories=True) %} +{% if messages %} +{% for category, m in messages %} +{% if category %} +{# alert-error changed to alert-danger in bootstrap 3, mapping is for backwards compatibility #} +{% set mapping = {'message': 'info', 'error': 'danger'} %} +
    +{% else %} +
    +{% endif %} + +{{ m }} +
    +{% endfor %} +{% endif %} +{% endwith %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap3/admin/lib.html b/tests/flask_admin/bootstrap3/admin/lib.html new file mode 100644 index 0000000..6af5105 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/lib.html @@ -0,0 +1,262 @@ +{% import 'admin/static.html' as admin_static with context %} +{# ---------------------- Pager -------------------------- #} +{% macro pager(page, pages, generator) - %} +{% if pages > 1 %} +
      + {% set min = page - 3 %} + {% set max = page + 3 + 1 %} + {% if min < 0 %} + {% set max = max - min %} + {% endif %} + {% if max >= pages %} + {% set min = min - max + pages %} + {% endif %} + {% if min < 0 %} + {% set min = 0 %} + {% endif %} + {% if max >= pages %} + {% set max = pages %} + {% endif %} + {% if min > 0 %} +
    • + « +
    • + {% else %} +
    • + « +
    • + {% endif %} + {% if page > 0 %} +
    • + < +
    • + {% else %} +
    • + < +
    • + {% endif %} + {% for p in range(min, max) %} + {% if page == p %} +
    • + {{ p + 1 }} +
    • + {% else %} +
    • + {{ p + 1 }} +
    • + {% endif %} + {% endfor %} + {% if page + 1 < pages %} +
    • + + > + +
    • + {% else %} +
    • + > +
    • + {% endif %} + {% if max < pages %} +
    • + + » + +
    • + {% else %} +
    • + » +
    • + {% endif %} +
    +{% endif %} +{%- endmacro %} +{% macro simple_pager(page, have_next, generator) - %} +
      + {% if page > 0 %} +
    • + + < + +
    • + {% else %} +
    • + < +
    • + {% endif %} + {% if have_next %} +
    • + + > + +
    • + {% else %} +
    • + > +
    • + {% endif %} +
    +{%- endmacro %} +{# ---------------------- Modal Window ------------------- #} +{% macro add_modal_window(modal_window_id='fa_modal_window', modal_label_id='fa_modal_label') %} + +{% endmacro %} +{% macro add_modal_button(url='', title='', content='', modal_window_id='fa_modal_window', btn_class='icon') %} + +{{ content|safe }} + +{% endmacro %} +{# ---------------------- Forms -------------------------- #} +{% macro render_field(form, field, kwargs={}, caller=None) %} +{% set direct_error = h.is_field_error(field.errors) %} +
    + +
    + {% set _dummy = kwargs.setdefault('class', 'form-control') %} + {{ field(**kwargs)|safe }} + {% if field.description %} +

    + {{ field.description|safe }} +

    + {% endif %} + {% if direct_error %} +
      + {% for e in field.errors if e is string %} +
    • + {{ e }} +
    • + {% endfor %} +
    + {% endif %} +
    +{% if caller %}{{ caller(form, field, direct_error, kwargs) }}{% endif %} +
    +{% endmacro %} +{% macro render_header(form, text) %} +

    {{ text }}

    +{% endmacro %} +{% macro render_form_fields(form, form_opts=None) %} +{% if form.hidden_tag is defined %} +{{ form.hidden_tag() }} +{% else %} +{% if csrf_token %} + +{% endif %} +{% for f in form if f.widget.input_type == 'hidden' %} +{{ f }} +{% endfor %} +{% endif %} +{% if form_opts and form_opts.form_rules %} +{% for r in form_opts.form_rules %}{{ r(form, form_opts=form_opts) }}{% endfor %} +{% else %} +{% for f in form if f.widget.input_type != 'hidden' %} +{% if form_opts %} +{% set kwargs = form_opts.widget_args.get(f.short_name, {}) %} +{% else %} +{% set kwargs = {} %} +{% endif %} +{{ render_field(form, f, kwargs) }} +{% endfor %} +{% endif %} +{% endmacro %} +{% macro form_tag(form=None, action=None) %} +
    +{{ caller() }} +
    +{% endmacro %} +{% macro render_form_buttons(cancel_url, extra=None, is_modal=False) %} +
    +
    +
    + +{% if extra %}{{ extra }}{% endif %} +{% if cancel_url %} + +{{ _gettext('Cancel') }} + +{% endif %} +
    +
    +{% endmacro %} +{% macro render_form(form, cancel_url, extra=None, form_opts=None, action=None, is_modal=False) - %} +{% call form_tag(action=action) %} +{{ render_form_fields(form, form_opts=form_opts) }} +{{ render_form_buttons(cancel_url, extra, is_modal) }} +{% endcall %} +{% endmacro %} +{% macro form_css() %} + + + +{% if config.MAPBOX_MAP_ID %} + + +{% endif %} +{% if editable_columns %} + +{% endif %} +{% endmacro %} +{% macro form_js() %} +{% if config.MAPBOX_MAP_ID %} + + + +{% if config.MAPBOX_SEARCH %} + + +{% endif %} +{% endif %} + +{% if editable_columns %} + +{% endif %} + +{% endmacro %} +{% macro extra() %} +{% if admin_view.can_create %} + +{% endif %} +{% if admin_view.can_edit %} + +{% endif %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap3/admin/master.html b/tests/flask_admin/bootstrap3/admin/master.html new file mode 100644 index 0000000..8f27dad --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/master.html @@ -0,0 +1 @@ +{% extends admin_base_template %} diff --git a/tests/flask_admin/bootstrap3/admin/model/create.html b/tests/flask_admin/bootstrap3/admin/model/create.html new file mode 100644 index 0000000..697a38e --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/create.html @@ -0,0 +1,26 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% from 'admin/lib.html' import extra with context %} {# backward compatible #} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block create_form %} + {{ lib.render_form(form, return_url, extra(), form_opts) }} + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ lib.form_js() }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/model/details.html b/tests/flask_admin/bootstrap3/admin/model/details.html new file mode 100644 index 0000000..de674a8 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/details.html @@ -0,0 +1,52 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block details_search %} +
    + {{ _gettext('Filter') }} + +
    + {% endblock %} + {% block details_table %} + + {% for c, name in details_columns %} + + + + + {% endfor %} +
    + + {{ name }} + + {{ get_value(model, c) }}
    + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/model/edit.html b/tests/flask_admin/bootstrap3/admin/model/edit.html new file mode 100644 index 0000000..9eef6a7 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/edit.html @@ -0,0 +1,40 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% from 'admin/lib.html' import extra with context %} {# backward compatible #} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block edit_form %} + {{ lib.render_form(form, return_url, extra(), form_opts) }} + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ lib.form_js() }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/model/inline_field_list.html b/tests/flask_admin/bootstrap3/admin/model/inline_field_list.html new file mode 100644 index 0000000..347977c --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/inline_field_list.html @@ -0,0 +1,14 @@ +{% import 'admin/model/inline_list_base.html' as base with context %} +{% macro render_field(field) %} +{{ field }} +{% if h.is_field_error(field.errors) %} +
      + {% for e in field.errors if e is string %} +
    • + {{ e }} +
    • + {% endfor %} +
    +{% endif %} +{% endmacro %} +{{ base.render_inline_fields(field, template, render_field, check) }} diff --git a/tests/flask_admin/bootstrap3/admin/model/inline_form.html b/tests/flask_admin/bootstrap3/admin/model/inline_form.html new file mode 100644 index 0000000..9a4b9fa --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/inline_form.html @@ -0,0 +1,4 @@ +{% import 'admin/lib.html' as lib with context %} +
    + {{ lib.render_form_fields(field.form, form_opts=form_opts) }} +
    diff --git a/tests/flask_admin/bootstrap3/admin/model/inline_list_base.html b/tests/flask_admin/bootstrap3/admin/model/inline_list_base.html new file mode 100644 index 0000000..fac497e --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/inline_list_base.html @@ -0,0 +1,61 @@ +{% macro render_inline_fields(field, template, render, check=None) %} +
    + {# existing inline form fields #} +
    + {% for subfield in field %} +
    + {%- if not check or check(subfield) %} + + + {{ field.label.text }} #{{ loop.index }} +
    + {% if subfield.get_pk and subfield.get_pk() %} + + + {% else %} + + + + {% endif %} +
    +
    +
    +
    + {%- endif - %} + {{ render(subfield) }} +
    + {% endfor %} +
    + {# template for new inline form fields #} +
    + {% filter forceescape %} +
    + + + {{ _gettext('New') }} {{ field.label.text }} + +
    + + + +
    +
    +
    + {{ render(template) }} +
    + {% endfilter %} +
    + + {{ _gettext('Add') }} {{ field.label.text }} + +
    +{% endmacro %} diff --git a/tests/flask_admin/bootstrap3/admin/model/layout.html b/tests/flask_admin/bootstrap3/admin/model/layout.html new file mode 100644 index 0000000..fb61a35 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/layout.html @@ -0,0 +1,136 @@ +{% macro filter_options(btn_class='dropdown-toggle') %} + + {{ _gettext('Add Filter') }} + + + +{% endmacro %} +{% macro export_options(btn_class='dropdown-toggle') %} +{% if admin_view.export_types|length > 1 %} + +{% else %} +
  • + + {{ _gettext('Export') }} + +
  • +{% endif %} +{% endmacro %} +{% macro filter_form() %} +
    +{% for arg_name, arg_value in extra_args.items() %} + +{% endfor %} +{% if sort_column is not none %} + +{% endif %} +{% if sort_desc %} + +{% endif %} +{% if search %} + +{% endif %} +{% if page_size != default_page_size %} + +{% endif %} +
    + +{% if active_filters %} + + {{ _gettext('Reset Filters') }} + +{% endif %} +
    +
    +
    +
    +{% endmacro %} +{% macro search_form(input_class=None) %} + +{% endmacro %} +{% macro page_size_form(generator, btn_class='dropdown-toggle') %} + +{{ page_size }} {{ _gettext('items') }} + + + +{% endmacro %} diff --git a/tests/flask_admin/bootstrap3/admin/model/list.html b/tests/flask_admin/bootstrap3/admin/model/list.html new file mode 100755 index 0000000..4ad7d02 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/list.html @@ -0,0 +1,196 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/model/layout.html' as model_layout with context %} +{% import 'admin/actions.html' as actionlib with context %} +{% import 'admin/model/row_actions.html' as row_actions with context %} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block model_menu_bar %} + + {% endblock %} + {% if filters %} + {{ model_layout.filter_form() }} +
    + {% endif %} + {% block model_list_table %} +
    + + + + {% block list_header scoped %} + {% if actions %} + + {% endif %} + {% block list_row_actions_header %} + {% if admin_view.column_display_actions %} + + {% endif %} + {% endblock %} + {% for c, name in list_columns %} + {% set column = loop.index0 %} + + {% endfor %} + {% endblock %} + + + {% for row in data %} + + {% block list_row scoped %} + {% if actions %} + + {% endif %} + {% block list_row_actions_column scoped %} + {% if admin_view.column_display_actions %} + + {%- endif - %} + {% endblock %} + {% for c, name in list_columns %} + + {% endfor %} + {% endblock %} + + {% else %} + + + + {% endfor %} +
    + +   + {% if admin_view.is_sortable(c) %} + {% if sort_column == column %} + + {{ name }} + {% if sort_desc %} + + {% else %} + + {% endif %} + + {% else %} + + {{ name }} + + {% endif %} + {% else %} + {{ name }} + {% endif %} + {% if admin_view.column_descriptions.get(c) %} + + {% endif %} +
    + + + {% block list_row_actions scoped %} + {% for action in list_row_actions %}{{ action.render_ctx(get_pk_value(row), row) }}{% endfor %} + {% endblock %} + + {% if admin_view.is_editable(c) %} + {% set form = list_forms[get_pk_value(row)] %} + {% if form.csrf_token %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c), csrf=form.csrf_token._value()) }} + {% elif csrf_token %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c), csrf=csrf_token()) }} + {% else %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c)) }} + {% endif %} + {% else %} + {{ get_value(row, c) }} + {% endif %} +
    + {% block empty_list_message %} +
    + {{ admin_view.get_empty_list_message() }} +
    + {% endblock %} +
    +
    + {% block list_pager %} + {% if num_pages is not none %} + {{ lib.pager(page, num_pages, pager_url) }} + {% else %} + {{ lib.simple_pager(page, data|length == page_size, pager_url) }} + {% endif %} + {% endblock %} + {% endblock %} + {% block actions %} + {{ actionlib.form(actions, get_url('.action_view')) }} + {% endblock %} + {%- if admin_view.edit_modal or admin_view.create_modal or admin_view.details_modal - %} + {{ lib.add_modal_window() }} + {%- endif - %} + {% endblock %} + {% block tail %} + {{ super() }} + {% if filter_groups %} + + + {% endif %} + {{ lib.form_js() }} + + {{ actionlib.script(_gettext('Please select at least one record.'), + actions, + actions_confirmation) }} + {% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/model/modals/create.html b/tests/flask_admin/bootstrap3/admin/model/modals/create.html new file mode 100644 index 0000000..bc3f9a8 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/modals/create.html @@ -0,0 +1,23 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{# store the jinja2 context for form_rules rendering logic #} +{% set render_ctx = h.resolve_ctx() %} +{% block body %} + + +{% endblock %} +{% block tail %} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/model/modals/details.html b/tests/flask_admin/bootstrap3/admin/model/modals/details.html new file mode 100755 index 0000000..a0e8e32 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/modals/details.html @@ -0,0 +1,38 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + + +{% endblock %} +{% block tail %} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/model/modals/edit.html b/tests/flask_admin/bootstrap3/admin/model/modals/edit.html new file mode 100644 index 0000000..bdfe7f9 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/modals/edit.html @@ -0,0 +1,25 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{# store the jinja2 context for form_rules rendering logic #} +{% set render_ctx = h.resolve_ctx() %} +{% block body %} + + +{% endblock %} +{% block tail %} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/model/row_actions.html b/tests/flask_admin/bootstrap3/admin/model/row_actions.html new file mode 100644 index 0000000..816b509 --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/model/row_actions.html @@ -0,0 +1,37 @@ +{% import 'admin/lib.html' as lib with context %} +{% macro link(action, url, icon_class=None) %} + + + +{% endmacro %} +{% macro view_row(action, row_id, row) %} +{{ link(action, get_url('.details_view', id=row_id, url=return_url), 'fa fa-eye glyphicon glyphicon-eye-open') }} +{% endmacro %} +{% macro view_row_popup(action, row_id, row) %} +{{ lib.add_modal_button(url=get_url('.details_view', id=row_id, url=return_url, modal=True), title=action.title, content=' + +') }} +{% endmacro %} +{% macro edit_row(action, row_id, row) %} +{{ link(action, get_url('.edit_view', id=row_id, url=return_url), 'fa fa-pencil glyphicon glyphicon-pencil') }} +{% endmacro %} +{% macro edit_row_popup(action, row_id, row) %} +{{ lib.add_modal_button(url=get_url('.edit_view', id=row_id, url=return_url, modal=True), title=action.title, content=' + +') }} +{% endmacro %} +{% macro delete_row(action, row_id, row) %} +
    +{{ delete_form.id(value=get_pk_value(row)) }} +{{ delete_form.url(value=return_url) }} +{% if delete_form.csrf_token %} +{{ delete_form.csrf_token }} +{% elif csrf_token %} + +{% endif %} + +
    +{% endmacro %} diff --git a/tests/flask_admin/bootstrap3/admin/rediscli/console.html b/tests/flask_admin/bootstrap3/admin/rediscli/console.html new file mode 100644 index 0000000..e7e3c0e --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/rediscli/console.html @@ -0,0 +1,24 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/static.html' as admin_static with context %} +{% block head %} + {{ super() }} + +{% endblock %} +{% block body %} +
    +
    +
    +
    + +
    +
    +
    +{% endblock %} +{% block tail %} + {{ super() }} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap3/admin/rediscli/response.html b/tests/flask_admin/bootstrap3/admin/rediscli/response.html new file mode 100644 index 0000000..661852c --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/rediscli/response.html @@ -0,0 +1,35 @@ +{% macro render(item, depth=0) %} +{% set type = type_name(item) %} +{% if type == 'tuple' or type == 'list' %} + {% if not item %} + Empty {{ type }}. + {% else %} + {% for n in item %} + {{ loop.index }}) {{ render(n, depth + 1) }} +
    + {% endfor %} + {% endif %} +{% elif type == 'bool' %} + {% if depth == 0 and item %} + OK + {% else %} + {{ item }} + {% endif %} +{% elif type == 'str' or type == 'unicode' %} + "{{ item }}" +{% elif type == 'bytes' %} + "{{ item.decode('utf-8') }}" +{% elif type == 'TextWrapper' %} +
    +{{ item }}
    +    
    +{% elif type == 'dict' %} + {% for k, v in item.items() %} + {{ loop.index }}) {{ k }} - {{ render(v, depth + 1) }} +
    + {% endfor %} +{% else %} + {{ item }} +{% endif %} +{% endmacro %} +{{ render(result) }} diff --git a/tests/flask_admin/bootstrap3/admin/static.html b/tests/flask_admin/bootstrap3/admin/static.html new file mode 100644 index 0000000..811f9ba --- /dev/null +++ b/tests/flask_admin/bootstrap3/admin/static.html @@ -0,0 +1,3 @@ +{% macro url() - %} +{{ get_url('{admin_endpoint}.static'.format(admin_endpoint=admin_view.admin.endpoint), *varargs, **kwargs) }} +{%- endmacro %} diff --git a/tests/flask_admin/bootstrap4/admin/actions.html b/tests/flask_admin/bootstrap4/admin/actions.html new file mode 100644 index 0000000..53da13b --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/actions.html @@ -0,0 +1,43 @@ +{% import 'admin/static.html' as admin_static with context %} +{% macro dropdown(actions, btn_class='nav-link dropdown-toggle') - %} + + +{% endmacro %} +{% macro form(actions, url) %} +{% if actions %} + +{% endif %} +{% endmacro %} +{% macro script(message, actions, actions_confirmation) %} +{% if actions %} + + + +{% endif %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap4/admin/base.html b/tests/flask_admin/bootstrap4/admin/base.html new file mode 100644 index 0000000..157f3d2 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/base.html @@ -0,0 +1,99 @@ +{% import 'admin/layout.html' as layout with context - %} +{% import 'admin/static.html' as admin_static with context %} + + + + + {% block title %} + {% if admin_view.category %}{{ admin_view.category }} - {% endif %} + {{ admin_view.name }} - {{ admin_view.admin.name }} + {% endblock %} + + {% block head_meta %} + + + + + + {% endblock %} + {% block head_css %} + + {% if config.get('FLASK_ADMIN_SWATCH', 'default') == 'default' %} + + {% endif %} + + + {% if admin_view.extra_css %} + {% for css_url in admin_view.extra_css %} + + {% endfor %} + {% endif %} + + {% endblock %} + {% block head %}{% endblock %} + {% block head_tail %}{% endblock %} + + + {% block page_body %} +
    + + {% block messages %}{{ layout.messages() }}{% endblock %} + {# store the jinja2 context for form_rules rendering logic #} + {% set render_ctx = h.resolve_ctx() %} + {% block body %}{% endblock %}
    {% endblock %} + {% block tail_js %} + + + + + + + + + + {% if admin_view.extra_js %} + {% for js_url in admin_view.extra_js %} + + {% endfor %} + {% endif %} + {% endblock %} + {% block tail %}{% endblock %} + + diff --git a/tests/flask_admin/bootstrap4/admin/file/form.html b/tests/flask_admin/bootstrap4/admin/file/form.html new file mode 100644 index 0000000..3052310 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/file/form.html @@ -0,0 +1,6 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {% block header %}

    {{ header_text }}

    {% endblock %} + {% block fa_form %}{{ lib.render_form(form, dir_url) }}{% endblock %} +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/file/list.html b/tests/flask_admin/bootstrap4/admin/file/list.html new file mode 100644 index 0000000..9f3252a --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/file/list.html @@ -0,0 +1,206 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/actions.html' as actionslib with context %} +{% block body %} + {% block breadcrums %} + + {% endblock %} + {% block file_list_table %} +
    + + + + {% block list_header scoped %} + {% if actions %} + + {% endif %} + + {% for column in admin_view.column_list %} + + {% endfor %} + {% endblock %} + + + {% for name, path, is_dir, size, date in items %} + + {% block list_row scoped %} + {% if actions %} + + {% endif %} + + {% if is_dir %} + + {% else %} + + {% if admin_view.is_column_visible('size') %} + + {% endif %} + {% endif %} + {% if admin_view.is_column_visible('date') %} + + {% endif %} + {% endblock %} + + {% endfor %} +
    + +   + {% if admin_view.is_column_sortable(column) %} + {% if sort_column == column %} + + {{ admin_view.column_label(column) }} + {% if sort_desc %} + + {% else %} + + {% endif %} + + {% else %} + + {{ admin_view.column_label(column) }} + + {% endif %} + {% else %} + {{ _gettext(admin_view.column_label(column)) }} + {% endif %} +
    + {% if not is_dir %} + + {% endif %} + + {% block list_row_actions scoped %} + {% if admin_view.can_rename and path and name != '..' %} + {%- if admin_view.rename_modal - %} + {{ lib.add_modal_button(url=get_url('.rename', path=path, modal=True), + title=_gettext('Rename File'), + content=' + + ') }} + {% else %} + + + + {%- endif - %} + {% endif %} + {%- if admin_view.can_delete and path - %} + {% if is_dir %} + {% if name != '..' and admin_view.can_delete_dirs %} +
    + {{ delete_form.path(value=path) }} + {{ delete_form.csrf_token }} + +
    + {% endif %} + {% else %} +
    + {{ delete_form.path(value=path) }} + {{ delete_form.csrf_token }} + +
    + {% endif %} + {%- endif - %} + {% endblock %} +
    + + + {{ name }} + + + {% if admin_view.can_download %} + {%- if admin_view.edit_modal and admin_view.is_file_editable(path) - %} + {{ lib.add_modal_button(url=get_file_url(path, modal=True)|safe, + btn_class='', content=name) }} + {% else %} + + {{ name }} + + {%- endif - %} + {% else %} + {{ name }} + {% endif %} + {{ size|filesizeformat }}{{ timestamp_format(date) }}
    +
    + {% endblock %} + {% block toolbar %} +
    + {% if admin_view.can_upload %} +
    + {%- if admin_view.upload_modal - %} + {{ lib.add_modal_button(url=get_dir_url('.upload', path=dir_path, modal=True), + btn_class="btn btn-secondary", + content=_gettext('Upload File')) }} + {% else %} + + {{ _gettext('Upload File') }} + + {%- endif - %} +
    + {% endif %} + {% if admin_view.can_mkdir %} +
    + {%- if admin_view.mkdir_modal - %} + {{ lib.add_modal_button(url=get_dir_url('.mkdir', path=dir_path, modal=True), + btn_class="btn btn-secondary", + content=_gettext('Create Directory')) }} + {% else %} + + {{ _gettext('Create Directory') }} + + {%- endif - %} +
    + {% endif %} + {% if actions %} +
    + {{ actionslib.dropdown(actions, 'dropdown-toggle btn btn-secondary') }} +
    + {% endif %} +
    + {% endblock %} + {% block actions %} + {{ actionslib.form(actions, get_url('.action_view')) }} + {% endblock %} + {%- if admin_view.rename_modal or admin_view.mkdir_modal + or admin_view.upload_modal or admin_view.edit_modal -%} + {{ lib.add_modal_window() }} + {%- endif - %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ actionslib.script(_gettext('Please select at least one file.'), + actions, + actions_confirmation) }} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/file/modals/form.html b/tests/flask_admin/bootstrap4/admin/file/modals/form.html new file mode 100644 index 0000000..7ed7708 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/file/modals/form.html @@ -0,0 +1,19 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {# content added to modal-content #} + + +{% endblock %} +{% block tail %} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/index.html b/tests/flask_admin/bootstrap4/admin/index.html new file mode 100644 index 0000000..6c4bda4 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/index.html @@ -0,0 +1,2 @@ +{% extends 'admin/master.html' %} +{% block body %}{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/layout.html b/tests/flask_admin/bootstrap4/admin/layout.html new file mode 100644 index 0000000..b91b988 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/layout.html @@ -0,0 +1,116 @@ +{% macro menu_icon(item) - %} +{% set icon_type = item.get_icon_type() %} +{%- if icon_type %} +{% set icon_value = item.get_icon_value() %} +{% if icon_type == 'glyph' %} + +{% elif icon_type == 'fa' %} + +{% elif icon_type == 'image' %} + menu image + {% elif icon_type == 'image-url' %} + menu image + {% endif %} + {% endif %} + {%- endmacro %} + {% macro menu(menu_root=None) %} + {% set is_main_nav = menu_root == None %} + {% if menu_root is none %} + {% set menu_root = admin_view.admin.menu() %} + {% endif %} + {%- for item in menu_root %} + {%- if item.is_category() - %} + {% set children = item.get_children() %} + {%- if children %} + {% set class_name = item.get_class_name() or '' %} + {%- if item.is_active(admin_view) %} + +{% endif %} +{%- else %} +{%- if item.is_accessible() and item.is_visible() - %} +{% set class_name = item.get_class_name() %} +{%- if item.is_active(admin_view) %} +
  • +{%- else %} + +{%- endif %} + +{{ menu_icon(item) }}{{ item.name }} + +
  • +{%- endif - %} +{% endif - %} +{% endfor %} +{% endmacro %} +{% macro menu_links(links=None) %} +{% if links is none %}{% set links = admin_view.admin.menu_links() %}{% endif %} +{% for item in links %} +{% set class_name = item.get_class_name() %} +{% if item.is_accessible() and item.is_visible() %} + + +{{ menu_icon(item) }}{{ item.name }} + + +{% endif %} +{% endfor %} +{% endmacro %} +{% macro messages() %} +{% with messages = get_flashed_messages(with_categories=True) %} +{% if messages %} +{% for category, m in messages %} +{% if category %} +{# alert-error changed to alert-danger in bootstrap 3, mapping is for backwards compatibility #} +{% set mapping = {'message': 'info', 'error': 'danger'} %} +
    +{% else %} +
    +{% endif %} + +{{ m }} +
    +{% endfor %} +{% endif %} +{% endwith %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap4/admin/lib.html b/tests/flask_admin/bootstrap4/admin/lib.html new file mode 100644 index 0000000..7e78ab6 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/lib.html @@ -0,0 +1,313 @@ +{% import 'admin/static.html' as admin_static with context %} +{# ---------------------- Pager -------------------------- #} +{% macro pager(page, pages, generator) - %} +{% if pages > 1 %} +
      + {% set min = page - 3 %} + {% set max = page + 3 + 1 %} + {% if min < 0 %} + {% set max = max - min %} + {% endif %} + {% if max >= pages %} + {% set min = min - max + pages %} + {% endif %} + {% if min < 0 %} + {% set min = 0 %} + {% endif %} + {% if max >= pages %} + {% set max = pages %} + {% endif %} + {% if min > 0 %} +
    • + + « + +
    • + {% else %} +
    • + + « + +
    • + {% endif %} + {% if page > 0 %} +
    • + + < + +
    • + {% else %} +
    • + + < + +
    • + {% endif %} + {% for p in range(min, max) %} + {% if page == p %} +
    • + + {{ p + 1 }} + +
    • + {% else %} +
    • + + {{ p + 1 }} + +
    • + {% endif %} + {% endfor %} + {% if page + 1 < pages %} +
    • + + > + +
    • + {% else %} +
    • + + > + +
    • + {% endif %} + {% if max < pages %} +
    • + + » + +
    • + {% else %} +
    • + + » + +
    • + {% endif %} +
    +{% endif %} +{%- endmacro %} +{% macro simple_pager(page, have_next, generator) - %} +
      + {% if page > 0 %} +
    • + + < + +
    • + {% else %} +
    • + < +
    • + {% endif %} + {% if have_next %} +
    • + + > + +
    • + {% else %} +
    • + > +
    • + {% endif %} +
    +{%- endmacro %} +{# ---------------------- Modal Window ------------------- #} +{% macro add_modal_window(modal_window_id='fa_modal_window', modal_label_id='fa_modal_label') %} + +{% endmacro %} +{% macro add_modal_button(url='', title='', content='', modal_window_id='fa_modal_window', btn_class='icon') %} + +{{ content|safe }} + +{% endmacro %} +{# ---------------------- Forms -------------------------- #} +{% macro render_field(form, field, kwargs={}, caller=None) %} +{% set direct_error = h.is_field_error(field.errors) %} +{% set prepend = kwargs.pop('prepend', None) %} +{% set append = kwargs.pop('append', None) %} +
    + +{% if prepend or append %} +
    + {%- if prepend - %} +
    + {{ prepend }} +
    + {%- endif - %} + {% endif %} + {% if field.widget.input_type == 'checkbox' %} + {% set _class = kwargs.setdefault('class', 'form-control-lg') %} + {% elif field.widget.input_type == 'file' %} + {% set _class = kwargs.setdefault('class', 'form-control-file') %} + {% else %} + {% set _class = kwargs.setdefault('class', 'form-control') %} + {% endif %} + {%- if direct_error %} {% set _ = kwargs.update({'class': kwargs['class'] ~ ' is-invalid'}) %} +{% endif - %} +{{ field(**kwargs) | safe }} +{%- if append - %} +
    + {{ append }} +
    +{%- endif - %} +{% if direct_error %} +
    +
      + {% for e in field.errors if e is string %} +
    • + {{ e }} +
    • + {% endfor %} +
    +
    +{% elif field.description %} +
    + {{ field.description|safe }} +
    +{% endif %} +{% if prepend or append %}
    {% endif %} +{% if caller %}{{ caller(form, field, direct_error, kwargs) }}{% endif %} +
    +{% endmacro %} +{% macro render_header(form, text) %} +

    {{ text }}

    +{% endmacro %} +{% macro render_form_fields(form, form_opts=None) %} +{% if form.hidden_tag is defined %} +{{ form.hidden_tag() }} +{% else %} +{% if csrf_token %} + +{% endif %} +{% for f in form if f.widget.input_type == 'hidden' %} +{{ f }} +{% endfor %} +{% endif %} +{% if form_opts and form_opts.form_rules %} +{% for r in form_opts.form_rules %}{{ r(form, form_opts=form_opts) }}{% endfor %} +{% else %} +{% for f in form if f.widget.input_type != 'hidden' %} +{% if form_opts %} +{% set kwargs = form_opts.widget_args.get(f.short_name, {}) %} +{% else %} +{% set kwargs = {} %} +{% endif %} +{{ render_field(form, f, kwargs) }} +{% endfor %} +{% endif %} +{% endmacro %} +{% macro form_tag(form=None, action=None) %} +
    +
    +{{ caller() }} +
    +
    +{% endmacro %} +{% macro render_form_buttons(cancel_url, extra=None, is_modal=False) %} +{% if is_modal %} + +{% if extra %}{{ extra }}{% endif %} +{% if cancel_url %} + +{{ _gettext('Cancel') }} + +{% endif %} +{% else %} +
    +
    +
    + +{% if extra %}{{ extra }}{% endif %} +{% if cancel_url %} + +{{ _gettext('Cancel') }} + +{% endif %} +
    +
    +{% endif %} +{% endmacro %} +{% macro render_form(form, cancel_url, extra=None, form_opts=None, action=None, is_modal=False) - %} +{% call form_tag(action=action) %} +{{ render_form_fields(form, form_opts=form_opts) }} +{{ render_form_buttons(cancel_url, extra, is_modal) }} +{% endcall %} +{% endmacro %} +{% macro form_css() %} + + + +{% if config.MAPBOX_MAP_ID %} + + +{% endif %} +{% if editable_columns %} + +{% endif %} +{% endmacro %} +{% macro form_js() %} +{% if config.MAPBOX_MAP_ID %} + + + +{% if config.MAPBOX_SEARCH %} + + +{% endif %} +{% endif %} + +{% if editable_columns %} + +{% endif %} + +{% endmacro %} +{% macro extra() %} +{% if admin_view.can_create %} + +{% endif %} +{% if admin_view.can_edit %} + +{% endif %} +{% endmacro %} diff --git a/tests/flask_admin/bootstrap4/admin/master.html b/tests/flask_admin/bootstrap4/admin/master.html new file mode 100644 index 0000000..8f27dad --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/master.html @@ -0,0 +1 @@ +{% extends admin_base_template %} diff --git a/tests/flask_admin/bootstrap4/admin/model/create.html b/tests/flask_admin/bootstrap4/admin/model/create.html new file mode 100644 index 0000000..01ba57b --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/create.html @@ -0,0 +1,30 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% from 'admin/lib.html' import extra with context %} {# backward compatible #} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block create_form %} + {{ lib.render_form(form, return_url, extra(), form_opts) }} + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ lib.form_js() }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/model/details.html b/tests/flask_admin/bootstrap4/admin/model/details.html new file mode 100644 index 0000000..2e416f9 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/details.html @@ -0,0 +1,58 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block details_search %} +
    + + +
    + {% endblock %} + {% block details_table %} + + {% for c, name in details_columns %} + + + + + {% endfor %} +
    + + {{ name }} + + {{ get_value(model, c) }}
    + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/model/edit.html b/tests/flask_admin/bootstrap4/admin/model/edit.html new file mode 100644 index 0000000..781751e --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/edit.html @@ -0,0 +1,44 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% from 'admin/lib.html' import extra with context %} {# backward compatible #} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block navlinks %} + + {% endblock %} + {% block edit_form %} + {{ lib.render_form(form, return_url, extra(), form_opts) }} + {% endblock %} +{% endblock %} +{% block tail %} + {{ super() }} + {{ lib.form_js() }} +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/model/inline_field_list.html b/tests/flask_admin/bootstrap4/admin/model/inline_field_list.html new file mode 100644 index 0000000..347977c --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/inline_field_list.html @@ -0,0 +1,14 @@ +{% import 'admin/model/inline_list_base.html' as base with context %} +{% macro render_field(field) %} +{{ field }} +{% if h.is_field_error(field.errors) %} +
      + {% for e in field.errors if e is string %} +
    • + {{ e }} +
    • + {% endfor %} +
    +{% endif %} +{% endmacro %} +{{ base.render_inline_fields(field, template, render_field, check) }} diff --git a/tests/flask_admin/bootstrap4/admin/model/inline_form.html b/tests/flask_admin/bootstrap4/admin/model/inline_form.html new file mode 100644 index 0000000..9a4b9fa --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/inline_form.html @@ -0,0 +1,4 @@ +{% import 'admin/lib.html' as lib with context %} +
    + {{ lib.render_form_fields(field.form, form_opts=form_opts) }} +
    diff --git a/tests/flask_admin/bootstrap4/admin/model/inline_list_base.html b/tests/flask_admin/bootstrap4/admin/model/inline_list_base.html new file mode 100644 index 0000000..3a9a442 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/inline_list_base.html @@ -0,0 +1,62 @@ +{% macro render_inline_fields(field, template, render, check=None) %} +
    + {# existing inline form fields #} +
    + {% for subfield in field %} +
    + {%- if not check or check(subfield) %} + + + {{ field.label.text }} #{{ loop.index }} +
    + {% if subfield.get_pk and subfield.get_pk() %} + + + {% else %} + + + + {% endif %} +
    +
    +
    +
    + {%- endif - %} + {{ render(subfield) }} +
    + {% endfor %} +
    + {# template for new inline form fields #} +
    + {% filter forceescape %} +
    + + + {{ _gettext('New') }} {{ field.label.text }} + +
    + + + +
    +
    +
    + {{ render(template) }} +
    + {% endfilter %} +
    + + {{ _gettext('Add') }} {{ field.label.text }} + +
    +{% endmacro %} diff --git a/tests/flask_admin/bootstrap4/admin/model/layout.html b/tests/flask_admin/bootstrap4/admin/model/layout.html new file mode 100644 index 0000000..e6470aa --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/layout.html @@ -0,0 +1,138 @@ +{% macro filter_options(btn_class='dropdown-toggle') %} + + {{ _gettext('Add Filter') }} + + + +{% endmacro %} +{% macro export_options(btn_class='dropdown-toggle') %} +{% if admin_view.export_types|length > 1 %} + +{% else %} +
  • + + {{ _gettext('Export') }} + +
  • +{% endif %} +{% endmacro %} +{% macro filter_form() %} +
    +{% if sort_column is not none %} + +{% endif %} +{% if sort_desc %} + +{% endif %} +{% if search %} + +{% endif %} +{% if page_size != default_page_size %} + +{% endif %} +
    + +{% if active_filters %} + + {{ _gettext('Reset Filters') }} + +{% endif %} +
    +
    +
    +
    +{% endmacro %} +{% macro search_form(input_class="col-auto") %} + +{% endmacro %} +{% macro page_size_form(generator, btn_class='nav-link dropdown-toggle') %} + +{{ page_size }} {{ _gettext('items') }} + + + +{% endmacro %} diff --git a/tests/flask_admin/bootstrap4/admin/model/list.html b/tests/flask_admin/bootstrap4/admin/model/list.html new file mode 100755 index 0000000..f5aa267 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/list.html @@ -0,0 +1,198 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/model/layout.html' as model_layout with context %} +{% import 'admin/actions.html' as actionlib with context %} +{% import 'admin/model/row_actions.html' as row_actions with context %} +{% block head %} + {{ super() }} + {{ lib.form_css() }} +{% endblock %} +{% block body %} + {% block model_menu_bar %} + + {% endblock %} + {% if filters %} + {{ model_layout.filter_form() }} +
    + {% endif %} + {% block model_list_table %} +
    + + + + {% block list_header scoped %} + {% if actions %} + + {% endif %} + {% block list_row_actions_header %} + {% if admin_view.column_display_actions %} + + {% endif %} + {% endblock %} + {% for c, name in list_columns %} + {% set column = loop.index0 %} + + {% endfor %} + {% endblock %} + + + {% for row in data %} + + {% block list_row scoped %} + {% if actions %} + + {% endif %} + {% block list_row_actions_column scoped %} + {% if admin_view.column_display_actions %} + + {%- endif - %} + {% endblock %} + {% for c, name in list_columns %} + + {% endfor %} + {% endblock %} + + {% else %} + + + + {% endfor %} +
    + +   + {% if admin_view.is_sortable(c) %} + {% if sort_column == column %} + + {{ name }} + {% if sort_desc %} + + {% else %} + + {% endif %} + + {% else %} + + {{ name }} + + {% endif %} + {% else %} + {{ name }} + {% endif %} + {% if admin_view.column_descriptions.get(c) %} + + {% endif %} +
    + + + {% block list_row_actions scoped %} + {% for action in list_row_actions %}{{ action.render_ctx(get_pk_value(row), row) }}{% endfor %} + {% endblock %} + + {% if admin_view.is_editable(c) %} + {% set form = list_forms[get_pk_value(row)] %} + {% if form.csrf_token %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c), csrf=form.csrf_token._value()) }} + {% elif csrf_token %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c), csrf=csrf_token()) }} + {% else %} + {{ form[c](pk=get_pk_value(row), display_value=get_value(row, c)) }} + {% endif %} + {% else %} + {{ get_value(row, c) }} + {% endif %} +
    + {% block empty_list_message %} +
    + {{ admin_view.get_empty_list_message() }} +
    + {% endblock %} +
    +
    + {% block list_pager %} + {% if num_pages is not none %} + {{ lib.pager(page, num_pages, pager_url) }} + {% else %} + {{ lib.simple_pager(page, data|length == page_size, pager_url) }} + {% endif %} + {% endblock %} + {% endblock %} + {% block actions %} + {{ actionlib.form(actions, get_url('.action_view')) }} + {% endblock %} + {%- if admin_view.edit_modal or admin_view.create_modal or admin_view.details_modal - %} + {{ lib.add_modal_window() }} + {%- endif - %} + {% endblock %} + {% block tail %} + {{ super() }} + {% if filter_groups %} + + + {% endif %} + {{ lib.form_js() }} + + + {{ actionlib.script(_gettext('Please select at least one record.'), + actions, + actions_confirmation) }} + {% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/model/modals/create.html b/tests/flask_admin/bootstrap4/admin/model/modals/create.html new file mode 100644 index 0000000..3eba723 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/modals/create.html @@ -0,0 +1,31 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{# store the jinja2 context for form_rules rendering logic #} +{% set render_ctx = h.resolve_ctx() %} +{% block body %} + + {% call lib.form_tag(action=url_for('.create_view', url=return_url)) %} + + +{% endcall %} +{# "save and add" button is removed from modal (it won't function properly) #} + {# % block create_form %} +{{ lib.render_form(form, return_url, extra=None, form_opts=form_opts, +action=url_for('.create_view', url=return_url), +is_modal=True) }} +{% endblock % #} +{% endblock %} +{% block tail %} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/model/modals/details.html b/tests/flask_admin/bootstrap4/admin/model/modals/details.html new file mode 100755 index 0000000..4d816a1 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/modals/details.html @@ -0,0 +1,40 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{% block body %} + + +{% endblock %} +{% block tail %} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/model/modals/edit.html b/tests/flask_admin/bootstrap4/admin/model/modals/edit.html new file mode 100644 index 0000000..fd62e4c --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/modals/edit.html @@ -0,0 +1,27 @@ +{% import 'admin/static.html' as admin_static with context %} +{% import 'admin/lib.html' as lib with context %} +{# store the jinja2 context for form_rules rendering logic #} +{% set render_ctx = h.resolve_ctx() %} +{% block body %} + + {% call lib.form_tag(action=url_for('.edit_view', id=request.args.get('id'), url=return_url)) %} + + +{% endcall %} +{% endblock %} +{% block tail %} + +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/model/row_actions.html b/tests/flask_admin/bootstrap4/admin/model/row_actions.html new file mode 100644 index 0000000..816b509 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/model/row_actions.html @@ -0,0 +1,37 @@ +{% import 'admin/lib.html' as lib with context %} +{% macro link(action, url, icon_class=None) %} + + + +{% endmacro %} +{% macro view_row(action, row_id, row) %} +{{ link(action, get_url('.details_view', id=row_id, url=return_url), 'fa fa-eye glyphicon glyphicon-eye-open') }} +{% endmacro %} +{% macro view_row_popup(action, row_id, row) %} +{{ lib.add_modal_button(url=get_url('.details_view', id=row_id, url=return_url, modal=True), title=action.title, content=' + +') }} +{% endmacro %} +{% macro edit_row(action, row_id, row) %} +{{ link(action, get_url('.edit_view', id=row_id, url=return_url), 'fa fa-pencil glyphicon glyphicon-pencil') }} +{% endmacro %} +{% macro edit_row_popup(action, row_id, row) %} +{{ lib.add_modal_button(url=get_url('.edit_view', id=row_id, url=return_url, modal=True), title=action.title, content=' + +') }} +{% endmacro %} +{% macro delete_row(action, row_id, row) %} +
    +{{ delete_form.id(value=get_pk_value(row)) }} +{{ delete_form.url(value=return_url) }} +{% if delete_form.csrf_token %} +{{ delete_form.csrf_token }} +{% elif csrf_token %} + +{% endif %} + +
    +{% endmacro %} diff --git a/tests/flask_admin/bootstrap4/admin/rediscli/console.html b/tests/flask_admin/bootstrap4/admin/rediscli/console.html new file mode 100644 index 0000000..82cb982 --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/rediscli/console.html @@ -0,0 +1,24 @@ +{% extends 'admin/master.html' %} +{% import 'admin/lib.html' as lib with context %} +{% import 'admin/static.html' as admin_static with context %} +{% block head %} + {{ super() }} + +{% endblock %} +{% block body %} +
    +
    +
    +
    + +
    +
    +
    +{% endblock %} +{% block tail %} + {{ super() }} + + +{% endblock %} diff --git a/tests/flask_admin/bootstrap4/admin/rediscli/response.html b/tests/flask_admin/bootstrap4/admin/rediscli/response.html new file mode 100644 index 0000000..661852c --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/rediscli/response.html @@ -0,0 +1,35 @@ +{% macro render(item, depth=0) %} +{% set type = type_name(item) %} +{% if type == 'tuple' or type == 'list' %} + {% if not item %} + Empty {{ type }}. + {% else %} + {% for n in item %} + {{ loop.index }}) {{ render(n, depth + 1) }} +
    + {% endfor %} + {% endif %} +{% elif type == 'bool' %} + {% if depth == 0 and item %} + OK + {% else %} + {{ item }} + {% endif %} +{% elif type == 'str' or type == 'unicode' %} + "{{ item }}" +{% elif type == 'bytes' %} + "{{ item.decode('utf-8') }}" +{% elif type == 'TextWrapper' %} +
    +{{ item }}
    +    
    +{% elif type == 'dict' %} + {% for k, v in item.items() %} + {{ loop.index }}) {{ k }} - {{ render(v, depth + 1) }} +
    + {% endfor %} +{% else %} + {{ item }} +{% endif %} +{% endmacro %} +{{ render(result) }} diff --git a/tests/flask_admin/bootstrap4/admin/static.html b/tests/flask_admin/bootstrap4/admin/static.html new file mode 100644 index 0000000..811f9ba --- /dev/null +++ b/tests/flask_admin/bootstrap4/admin/static.html @@ -0,0 +1,3 @@ +{% macro url() - %} +{{ get_url('{admin_endpoint}.static'.format(admin_endpoint=admin_view.admin.endpoint), *varargs, **kwargs) }} +{%- endmacro %} diff --git a/tests/jinja_adminlte/calendar.html b/tests/jinja_adminlte/calendar.html new file mode 100644 index 0000000..526c4f4 --- /dev/null +++ b/tests/jinja_adminlte/calendar.html @@ -0,0 +1,345 @@ +{% extends "layouts/base.html" %} +{% block title %}Blank Page {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Calendar

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +

    Draggable Events

    +
    +
    + +
    +
    + Lunch +
    +
    + Go home +
    +
    + Do homework +
    +
    + Work on UI design +
    +
    + Sleep tight +
    +
    + +
    +
    +
    + +
    + +
    +
    +

    Create Event

    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/charts-chartjs.html b/tests/jinja_adminlte/charts-chartjs.html new file mode 100644 index 0000000..53ce15f --- /dev/null +++ b/tests/jinja_adminlte/charts-chartjs.html @@ -0,0 +1,383 @@ +{% extends "layouts/base.html" %} +{% block title %}ChartsJS {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    ChartJS

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +

    Area Chart

    +
    + + +
    +
    +
    +
    + +
    +
    + +
    + + +
    +
    +

    Donut Chart

    +
    + + +
    +
    +
    + +
    + +
    + + +
    +
    +

    Pie Chart

    +
    + + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +

    Line Chart

    +
    + + +
    +
    +
    +
    + +
    +
    + +
    + + +
    +
    +

    Bar Chart

    +
    + + +
    +
    +
    +
    + +
    +
    + +
    + + +
    +
    +

    Stacked Bar Chart

    +
    + + +
    +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/charts-flot.html b/tests/jinja_adminlte/charts-flot.html new file mode 100644 index 0000000..ac30b16 --- /dev/null +++ b/tests/jinja_adminlte/charts-flot.html @@ -0,0 +1,483 @@ +{% extends "layouts/base.html" %} +{% block title %}Flot Charts {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Flot Charts

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +

    + + Interactive Area Chart +

    +
    + Real time +
    + + +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    +
    + +
    +
    +

    + + Line Chart +

    +
    + + +
    +
    +
    +
    +
    + +
    + + +
    +
    +

    + + Area Chart +

    +
    + + +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    +
    +

    + + Bar Chart +

    +
    + + +
    +
    +
    +
    +
    + +
    + + +
    +
    +

    + + Donut Chart +

    +
    + + +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/charts-inline.html b/tests/jinja_adminlte/charts-inline.html new file mode 100644 index 0000000..9847af7 --- /dev/null +++ b/tests/jinja_adminlte/charts-inline.html @@ -0,0 +1,611 @@ +{% extends "layouts/base.html" %} +{% block title %}Inline Charts {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Inline Charts

    +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +

    + + jQuery Knob +

    +
    + + +
    +
    + +
    +
    +
    + +
    + New Visitors +
    +
    + +
    + +
    + Bounce Rate +
    +
    + +
    + +
    + Server Load +
    +
    + +
    + +
    + Disk Space +
    +
    + +
    + +
    +
    + +
    + Bandwidth +
    +
    + +
    + +
    + CPU +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + + jQuery Knob Different Sizes +

    +
    + + +
    +
    + +
    +
    +
    + +
    + data-width="90" +
    +
    + +
    + +
    + data-width="120" +
    +
    + +
    + +
    + data-thickness="0.1" +
    +
    + +
    + +
    + data-angleArc="250" +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + + jQuery Knob Tron Style +

    +
    + + +
    +
    + +
    +
    +
    + +
    + data-width="90" +
    +
    + +
    + +
    + data-width="120" +
    +
    + +
    + +
    + data-thickness="0.1" +
    +
    + +
    + +
    + data-angleArc="250" +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-404.html b/tests/jinja_adminlte/examples-404.html new file mode 100644 index 0000000..88545b6 --- /dev/null +++ b/tests/jinja_adminlte/examples-404.html @@ -0,0 +1,85 @@ +{% extends "layouts/base.html" %} +{% block title %}Error 404 {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    404 Error Page

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +

    404

    +
    +

    + + Oops! Page not found. +

    +

    + We could not find the page you were looking for. + Meanwhile, you may + return to dashboard + or try using the search form. +

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-500.html b/tests/jinja_adminlte/examples-500.html new file mode 100644 index 0000000..f4cf8d7 --- /dev/null +++ b/tests/jinja_adminlte/examples-500.html @@ -0,0 +1,83 @@ +{% extends "layouts/base.html" %} +{% block title %}Error 500 {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    500 Error Page

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +

    500

    +
    +

    + + Oops! Something went wrong. +

    +

    + We will work on fixing that right away. + Meanwhile, you may + return to dashboard + or try using the search form. +

    +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-blank.html b/tests/jinja_adminlte/examples-blank.html new file mode 100644 index 0000000..ee51f7c --- /dev/null +++ b/tests/jinja_adminlte/examples-blank.html @@ -0,0 +1,83 @@ +{% extends "layouts/base.html" %} +{% block title %}Blank Page {% endblock %} + +{% block body_class %} + sidebar-mini pace-primary +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Blank Page

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-contacts.html b/tests/jinja_adminlte/examples-contacts.html new file mode 100644 index 0000000..762934c --- /dev/null +++ b/tests/jinja_adminlte/examples-contacts.html @@ -0,0 +1,572 @@ +{% extends "layouts/base.html" %} +{% block title %}Contacts {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Contacts

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    +
    + Digital Strategist +
    +
    +
    +
    +

    + + Nicole Pearson + +

    +

    + + About: + + Web Designer / UX / Graphic Artist / Coffee Lover +

    +
      +
    • + + + + Address: Demo Street 123, Demo City 04312, NJ +
    • +
    • + + + + Phone #: + 800 - 12 12 23 52 +
    • +
    +
    +
    + user-avatar +
    +
    +
    + +
    +
    +
    +
    + + + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-e-commerce.html b/tests/jinja_adminlte/examples-e-commerce.html new file mode 100644 index 0000000..a9923c9 --- /dev/null +++ b/tests/jinja_adminlte/examples-e-commerce.html @@ -0,0 +1,275 @@ +{% extends "layouts/base.html" %} +{% block title %}eCommerce {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    E-commerce

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +

    + LOWA Men’s Renegade GTX Mid Hiking Boots Review +

    +
    + Product Image +
    +
    +
    + Product Image +
    +
    + Product Image +
    +
    + Product Image +
    +
    + Product Image +
    +
    + Product Image +
    +
    +
    +
    +

    LOWA Men’s Renegade GTX Mid Hiking Boots Review

    +

    + Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terr. +

    +
    +

    Available Colors

    +
    + + + + + +
    +

    + Size + + Please select one + +

    +
    + + + + +
    +
    +

    $80.00

    +

    + + Ex Tax: $80.00 + +

    +
    +
    +
    + + Add to Cart +
    +
    + + Add to Wishlist +
    +
    + +
    +
    +
    + + +
    +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-forgot-password.html b/tests/jinja_adminlte/examples-forgot-password.html new file mode 100644 index 0000000..723aae7 --- /dev/null +++ b/tests/jinja_adminlte/examples-forgot-password.html @@ -0,0 +1,72 @@ +{% extends "layouts/base-fullscreen.html" %} +{% block title %}Forgot Password {% endblock %} + +{% block body_class %} + login-page +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +{% endblock content %} + +{% block javascripts %} + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-invoice-print.html b/tests/jinja_adminlte/examples-invoice-print.html new file mode 100644 index 0000000..b8f51d0 --- /dev/null +++ b/tests/jinja_adminlte/examples-invoice-print.html @@ -0,0 +1,238 @@ + + + + + + Jinja2 AdminLTE - Invoice Print | AppSeed + + + + + + + + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + From +
    + Admin, Inc. +
    + 795 Folsom Ave, Suite 600 +
    + San Francisco, CA 94107 +
    + Phone: (804) 123-5432 +
    + Email: info@almasaeedstudio.com +
    +
    + +
    + To +
    + John Doe +
    + 795 Folsom Ave, Suite 600 +
    + San Francisco, CA 94107 +
    + Phone: (555) 539-1037 +
    + Email: john.doe@example.com +
    +
    + +
    + + Invoice #007612 + +
    +
    + + Order ID: + + 4F3S8J +
    + + Payment Due: + + 2/22/2014 +
    + + Account: + + 968-34567 +
    + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    QtyProductSerial #DescriptionSubtotal
    1Call of Duty + 455-981-221 + + El snort testosterone trophy driving gloves handsome + + $64.50 +
    + 1 + + Need for Speed IV + + 247-925-726 + + Wes Anderson umami biodiesel + + $50.00 +
    + 1 + + Monsters DVD + + 735-845-642 + + Terry Richardson helvetica tousled street art master + + $10.70 +
    + 1 + + Grown Ups Blue Ray + + 422-568-642 + + Tousled lomo letterpress + + $25.99 +
    +
    + +
    + +
    + +
    +

    + Payment Methods: +

    + Visa + Mastercard + American Express + Paypal +

    + Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles, weebly ning heekya handango imeem plugg dopplr + jibjab, movity jajah plickers sifteo edmodo ifttt zimbra. +

    +
    + +
    +

    + Amount Due 2/22/2014 +

    +
    + + + + + + + + + + + + + + + + + +
    Subtotal: + $250.30 +
    + Tax (9.3%) + + $10.34 +
    + Shipping: + + $5.80 +
    + Total: + + $265.24 +
    +
    +
    + +
    + +
    + +
    + + + + diff --git a/tests/jinja_adminlte/examples-invoice.html b/tests/jinja_adminlte/examples-invoice.html new file mode 100644 index 0000000..df31e82 --- /dev/null +++ b/tests/jinja_adminlte/examples-invoice.html @@ -0,0 +1,313 @@ +{% extends "layouts/base.html" %} +{% block title %}Invoice {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Invoice

    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + Note: +
    + This page has been enhanced for printing. Click the print button at the bottom of the invoice to test. +
    + +
    + +
    +
    +

    + + AdminLTE, Inc. + + Date: 2/10/2014 + +

    +
    + +
    + +
    +
    + From +
    + Admin, Inc. +
    + 795 Folsom Ave, Suite 600 +
    + San Francisco, CA 94107 +
    + Phone: (804) 123-5432 +
    + Email: info@almasaeedstudio.com +
    +
    + +
    + To +
    + John Doe +
    + 795 Folsom Ave, Suite 600 +
    + San Francisco, CA 94107 +
    + Phone: (555) 539-1037 +
    + Email: john.doe@example.com +
    +
    + +
    + + Invoice #007612 + +
    +
    + + Order ID: + + 4F3S8J +
    + + Payment Due: + + 2/22/2014 +
    + + Account: + + 968-34567 +
    + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    QtyProductSerial #DescriptionSubtotal
    1Call of Duty + 455-981-221 + + El snort testosterone trophy driving gloves handsome + + $64.50 +
    + 1 + + Need for Speed IV + + 247-925-726 + + Wes Anderson umami biodiesel + + $50.00 +
    + 1 + + Monsters DVD + + 735-845-642 + + Terry Richardson helvetica tousled street art master + + $10.70 +
    + 1 + + Grown Ups Blue Ray + + 422-568-642 + + Tousled lomo letterpress + + $25.99 +
    +
    + +
    + +
    + +
    +

    + Payment Methods: +

    + Visa + Mastercard + American Express + Paypal +

    + Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles, weebly ning heekya handango imeem + plugg + dopplr jibjab, movity jajah plickers sifteo edmodo ifttt zimbra. +

    +
    + +
    +

    + Amount Due 2/22/2014 +

    +
    + + + + + + + + + + + + + + + + + +
    Subtotal: + $250.30 +
    + Tax (9.3%) + + $10.34 +
    + Shipping: + + $5.80 +
    + Total: + + $265.24 +
    +
    +
    + +
    + + +
    +
    + + + Print + + + +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-language-menu.html b/tests/jinja_adminlte/examples-language-menu.html new file mode 100644 index 0000000..3bd9660 --- /dev/null +++ b/tests/jinja_adminlte/examples-language-menu.html @@ -0,0 +1,83 @@ +{% extends "layouts/base.html" %} +{% block title %}Language Menu {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Language Menu

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    + +
    + +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-legacy-user-menu.html b/tests/jinja_adminlte/examples-legacy-user-menu.html new file mode 100644 index 0000000..cff5ac2 --- /dev/null +++ b/tests/jinja_adminlte/examples-legacy-user-menu.html @@ -0,0 +1,81 @@ +{% extends "layouts/base.html" %} +{% block title %}Legacy User Menu {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Legacy User Menu

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    + +
    + +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-lockscreen.html b/tests/jinja_adminlte/examples-lockscreen.html new file mode 100644 index 0000000..6d99ed0 --- /dev/null +++ b/tests/jinja_adminlte/examples-lockscreen.html @@ -0,0 +1,77 @@ +{% extends "layouts/base-fullscreen.html" %} +{% block title %}Lockscreen {% endblock %} +{% block body_class %} + lockscreen +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + + +
    + John Doe +
    + +
    + +
    + User Image +
    + + +
    +
    + +
    + +
    +
    +
    + +
    + +
    + Enter your password to retrieve your session +
    + + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-login.html b/tests/jinja_adminlte/examples-login.html new file mode 100644 index 0000000..e0ff5cf --- /dev/null +++ b/tests/jinja_adminlte/examples-login.html @@ -0,0 +1,105 @@ +{% extends "layouts/base-fullscreen.html" %} +{% block title %}Login {% endblock %} + +{% block body_class %} + login-page +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +{% endblock content %} + +{% block javascripts %} + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-profile.html b/tests/jinja_adminlte/examples-profile.html new file mode 100644 index 0000000..90d000d --- /dev/null +++ b/tests/jinja_adminlte/examples-profile.html @@ -0,0 +1,566 @@ +{% extends "layouts/base.html" %} +{% block title %}Profile {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Profile

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    + User profile picture +
    +

    + Nina Mcintire +

    +

    + Software Engineer +

    +
      +
    • + + Followers + + 1,322 +
    • +
    • + + Following + + 543 +
    • +
    • + + Friends + + 13,287 +
    • +
    + + + Follow + + +
    + +
    + + +
    +
    +

    About Me

    +
    + +
    + + + Education + +

    + B.S. in Computer Science from the University of Tennessee at Knoxville +

    +
    + + + Location + +

    + Malibu, California +

    +
    + + + Skills + +

    + UI Design + Coding + Javascript + PHP + Node.js +

    +
    + + + Notes + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fermentum enim neque. +

    +
    + +
    + +
    + +
    +
    + + +
    +
    +
    + +
    +
    + user image + + + Jonathan Burke Jr. + + + + + + + Shared publicly - 7:30 PM today + +
    + +

    + Lorem ipsum represents a long-held tradition for designers, + typographers and the like. Some people hate it and argue for + its demise, but others ignore the hate as they create awesome + tools to help create filler text for everyone from bacon lovers + to Charlie Sheen fans. +

    +

    + + + Share + + + + Like + + + + + Comments (5) + + +

    + +
    + + +
    +
    + User Image + + + Sarah Ross + + + + + + + Sent you a message - 3 days ago + +
    + +

    + Lorem ipsum represents a long-held tradition for designers, + typographers and the like. Some people hate it and argue for + its demise, but others ignore the hate as they create awesome + tools to help create filler text for everyone from bacon lovers + to Charlie Sheen fans. +

    +
    +
    + +
    + +
    +
    +
    +
    + + +
    +
    + User Image + + + Adam Jones + + + + + + + Posted 5 photos - 5 days ago + +
    + +
    +
    + Photo +
    + +
    +
    +
    + Photo + Photo +
    + +
    + Photo + Photo +
    + +
    + +
    + +
    + +

    + + + Share + + + + Like + + + + + Comments (5) + + +

    + +
    + +
    + +
    + +
    + +
    + + 10 Feb. 2014 + +
    + + +
    + +
    + + + 12:05 + +

    + + Support Team + + sent you an email +

    +
    + Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles, + weebly ning heekya handango imeem plugg dopplr jibjab, movity + jajah plickers sifteo edmodo ifttt zimbra. Babblely odeo kaboodle + quora plaxo ideeli hulu weebly balihoo... +
    + +
    +
    + + +
    + +
    + + + 5 mins ago + +

    + + Sarah Young + + accepted your friend request +

    +
    +
    + + +
    + +
    + + + 27 mins ago + +

    + + Jay White + + commented on your post +

    +
    + Take me to your leader! + Switzerland is small and neutral! + We are more like Germany, ambitious and misunderstood! +
    + +
    +
    + + +
    + + 3 Jan. 2014 + +
    + + +
    + +
    + + + 2 days ago + +

    + + Mina Lee + + uploaded new photos +

    +
    + ... + ... + ... + ... +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-project-add.html b/tests/jinja_adminlte/examples-project-add.html new file mode 100644 index 0000000..9ef74d8 --- /dev/null +++ b/tests/jinja_adminlte/examples-project-add.html @@ -0,0 +1,167 @@ +{% extends "layouts/base.html" %} +{% block title %}Product Add {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Project Add

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +

    General

    +
    + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    +

    Budget

    +
    + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-project-detail.html b/tests/jinja_adminlte/examples-project-detail.html new file mode 100644 index 0000000..0dd2e3c --- /dev/null +++ b/tests/jinja_adminlte/examples-project-detail.html @@ -0,0 +1,257 @@ +{% extends "layouts/base.html" %} +{% block title %}Project Detail {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Project Detail

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +

    Projects Detail

    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + Estimated budget + + + 2300 + +
    +
    +
    +
    +
    +
    + + Total amount spent + + + 2000 + +
    +
    +
    +
    +
    +
    + + Estimated project duration + + + 20 + +
    +
    +
    +
    +
    +
    +

    Recent Activity

    +
    +
    + user image + + Jonathan Burke Jr. + + Shared publicly - 7:45 PM today +
    + +

    + Lorem ipsum represents a long-held tradition for designers, + typographers and the like. Some people hate it and argue for + its demise, but others ignore. +

    +

    + + + Demo File 1 v2 + +

    +
    +
    +
    + User Image + + Sarah Ross + + Sent you a message - 3 days ago +
    + +

    + Lorem ipsum represents a long-held tradition for designers, + typographers and the like. Some people hate it and argue for + its demise, but others ignore. +

    +

    + + + Demo File 2 + +

    +
    +
    +
    + user image + + Jonathan Burke Jr. + + Shared publicly - 5 days ago +
    + +

    + Lorem ipsum represents a long-held tradition for designers, + typographers and the like. Some people hate it and argue for + its demise, but others ignore. +

    +

    + + + Demo File 1 v1 + +

    +
    +
    +
    +
    +
    +

    + + AdminLTE v3 +

    +

    + Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terr. +

    +
    +
    +

    + Client Company + + Deveint Inc + +

    +

    + Project Leader + + Tony Chicken + +

    +
    +
    Project files
    + + +
    +
    +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-project-edit.html b/tests/jinja_adminlte/examples-project-edit.html new file mode 100644 index 0000000..2a43f98 --- /dev/null +++ b/tests/jinja_adminlte/examples-project-edit.html @@ -0,0 +1,278 @@ +{% extends "layouts/base.html" %} +{% block title %}Project Edit {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Project Edit

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +

    General

    +
    + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    +

    Budget

    +
    + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + +
    +
    +

    Files

    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    File NameFile Size
    Functional-requirements.docx49.8005 kb + +
    UAT.pdf28.4883 kb + +
    Email-from-flatbal.mln57.9003 kb + +
    + Logo.png + + 50.5190 kb + + +
    + Contract-10_12_2014.docx + + 44.9715 kb + + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-projects.html b/tests/jinja_adminlte/examples-projects.html new file mode 100644 index 0000000..10c3ec2 --- /dev/null +++ b/tests/jinja_adminlte/examples-projects.html @@ -0,0 +1,679 @@ +{% extends "layouts/base.html" %} +{% block title %}Projects {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Projects

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +

    Projects

    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #Project NameTeam MembersProject Progress + Status +
    # + AdminLTE v3 +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 57% Complete + +
    + Success + + + + View + + + + Edit + + + + Delete + +
    # + AdminLTE v3 +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 47% Complete + +
    + Success + + + + View + + + + Edit + + + + Delete + +
    # + AdminLTE v3 +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 77% Complete + +
    + Success + + + + View + + + + Edit + + + + Delete + +
    # + AdminLTE v3 +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 60% Complete + +
    + Success + + + + View + + + + Edit + + + + Delete + +
    + # + + + AdminLTE v3 + +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 12% Complete + +
    + + Success + + + + + View + + + + Edit + + + + Delete + +
    + # + + + AdminLTE v3 + +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 35% Complete + +
    + + Success + + + + + View + + + + Edit + + + + Delete + +
    + # + + + AdminLTE v3 + +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 87% Complete + +
    + + Success + + + + + View + + + + Edit + + + + Delete + +
    + # + + + AdminLTE v3 + +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 77% Complete + +
    + + Success + + + + + View + + + + Edit + + + + Delete + +
    + # + + + AdminLTE v3 + +
    + + Created 01.01.2019 + +
    +
      +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    • + Avatar +
    • +
    +
    +
    +
    +
    + + 77% Complete + +
    + + Success + + + + + View + + + + Edit + + + + Delete + +
    +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-recover-password.html b/tests/jinja_adminlte/examples-recover-password.html new file mode 100644 index 0000000..5e2af2e --- /dev/null +++ b/tests/jinja_adminlte/examples-recover-password.html @@ -0,0 +1,75 @@ +{% extends "layouts/base-fullscreen.html" %} +{% block title %}Recover Password {% endblock %} + +{% block body_class %} + login-page +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +{% endblock content %} + +{% block javascripts %} + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/examples-register.html b/tests/jinja_adminlte/examples-register.html new file mode 100644 index 0000000..d6f6c79 --- /dev/null +++ b/tests/jinja_adminlte/examples-register.html @@ -0,0 +1,114 @@ +{% extends "layouts/base-fullscreen.html" %} +{% block title %}Register {% endblock %} + +{% block body_class %} + register-page +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    + +
    + +
    +
    + + + I already have a membership + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/forms-advanced.html b/tests/jinja_adminlte/forms-advanced.html new file mode 100644 index 0000000..026f3d3 --- /dev/null +++ b/tests/jinja_adminlte/forms-advanced.html @@ -0,0 +1,1007 @@ +{% extends "layouts/base.html" %} +{% block title %}Forms Advanced {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + + + + + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Advanced Form

    +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    +

    Select2 (Default Theme)

    +
    + + +
    +
    + +
    +
    +
    +
    + + +
    + +
    + + +
    + +
    + +
    +
    + + +
    + +
    + + +
    + +
    + +
    + +
    Custom Color Variants
    +
    +
    +
    + + +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    + +
    + + +
    + + +
    +
    +

    Select2 (Bootstrap4 Theme)

    +
    + + +
    +
    + +
    +
    +
    +
    + + +
    + +
    + + +
    + +
    + +
    +
    + + +
    + +
    + + +
    + +
    + +
    + +
    + + +
    + +
    +
    +

    Bootstrap Duallistbox

    +
    + + +
    +
    + +
    +
    +
    +
    + + +
    + +
    + +
    + +
    + + +
    + +
    +
    +
    +
    +

    Input masks

    +
    +
    + +
    + +
    +
    + + + +
    + +
    + +
    + + +
    +
    +
    + + + +
    + +
    + +
    + + +
    + +
    +
    + + + +
    + +
    + +
    + + +
    + +
    +
    + + + +
    + +
    + +
    + + +
    + +
    +
    + + + +
    + +
    + +
    + +
    + +
    + +
    +
    +

    Color & Time Picker

    +
    +
    + +
    + + +
    + + +
    + +
    + +
    + + + +
    +
    + +
    + + +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    +

    Date picker

    +
    +
    + +
    + +
    + +
    +
    + +
    +
    +
    +
    + + +
    + +
    +
    + + + +
    + +
    + +
    + + +
    + +
    +
    + + + +
    + +
    + +
    + + +
    + +
    + +
    +
    + +
    + + +
    + + +
    +
    +

    iCheck Bootstrap - Checkbox & Radio Inputs

    +
    +
    + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    + + +
    + + +
    +
    +

    Bootstrap Switch

    +
    +
    + + +
    +
    + +
    + +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + + + + + + + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/forms-editors.html b/tests/jinja_adminlte/forms-editors.html new file mode 100644 index 0000000..90edf9a --- /dev/null +++ b/tests/jinja_adminlte/forms-editors.html @@ -0,0 +1,115 @@ +{% extends "layouts/base.html" %} +{% block title %}Forms Editor {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Text Editors

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +

    + Bootstrap WYSIHTML5 + + Simple and fast + +

    + +
    + + +
    + +
    + + +
    +
    + +
    + +
    + +
    + +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/forms-general.html b/tests/jinja_adminlte/forms-general.html new file mode 100644 index 0000000..12ae22b --- /dev/null +++ b/tests/jinja_adminlte/forms-general.html @@ -0,0 +1,874 @@ +{% extends "layouts/base.html" %} +{% block title %}Forms General {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    General Form

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +

    Quick Example

    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + Upload +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +

    Different Height

    +
    +
    + +
    + +
    + +
    + +
    + +
    +
    +

    Different Width

    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + + +
    +
    +

    Input Addon

    +
    +
    +
    +
    + @ +
    + +
    +
    + +
    + .00 +
    +
    +
    +
    + $ +
    + +
    + .00 +
    +
    +

    With icons

    +
    +
    + + + +
    + +
    +
    + +
    + + + +
    +
    +
    +
    + + + +
    + +
    +
    + +
    +
    +
    +
    + With checkbox and radio inputs +
    +
    +
    +
    +
    + + + +
    + +
    + +
    + +
    +
    +
    + + + +
    + +
    + +
    + +
    + +
    + With buttons +
    +

    + Large: + + .input-group.input-group-lg + +

    + + +

    + Normal +

    +
    +
    + +
    + + +
    + +

    + Small + + .input-group.input-group-sm + +

    +
    + + + + +
    + +
    + +
    + + +
    +
    +

    + Horizontal Form +

    +
    + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    + +
    + + +
    + +
    +
    +

    + General Elements +

    +
    + +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + + +
    +
    +

    + Custom Elements +

    +
    + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/forms-validation.html b/tests/jinja_adminlte/forms-validation.html new file mode 100644 index 0000000..c3b81ae --- /dev/null +++ b/tests/jinja_adminlte/forms-validation.html @@ -0,0 +1,176 @@ +{% extends "layouts/base.html" %} +{% block title %}Forms Validation {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Validation

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +

    + Quick Example + + jQuery Validation + +

    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    + +
    + + +
    + +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/gallery.html b/tests/jinja_adminlte/gallery.html new file mode 100644 index 0000000..363e138 --- /dev/null +++ b/tests/jinja_adminlte/gallery.html @@ -0,0 +1,404 @@ +{% extends "layouts/base.html" %} +{% block title %}Gallery {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Gallery

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    FilterizR Gallery with Ekko Lightbox

    +
    + +
    +
    +
    +
    +
    +

    Ekko Lightbox

    +
    +
    +
    +
    + + white sample + +
    +
    + + black sample + +
    +
    + + red sample + +
    +
    + + red sample + +
    +
    + + black sample + +
    +
    + + white sample + +
    +
    + + white sample + +
    +
    + + black sample + +
    +
    + + red sample + +
    +
    + + white sample + +
    +
    + + white sample + +
    +
    + + black sample + +
    +
    +
    +
    +
    +
    +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/includes/footer.html b/tests/jinja_adminlte/includes/footer.html new file mode 100644 index 0000000..571326d --- /dev/null +++ b/tests/jinja_adminlte/includes/footer.html @@ -0,0 +1,17 @@ + + diff --git a/tests/jinja_adminlte/includes/navigation.html b/tests/jinja_adminlte/includes/navigation.html new file mode 100644 index 0000000..b17aae3 --- /dev/null +++ b/tests/jinja_adminlte/includes/navigation.html @@ -0,0 +1,170 @@ + + + diff --git a/tests/jinja_adminlte/includes/scripts.html b/tests/jinja_adminlte/includes/scripts.html new file mode 100644 index 0000000..97f0964 --- /dev/null +++ b/tests/jinja_adminlte/includes/scripts.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/jinja_adminlte/includes/sidebar.html b/tests/jinja_adminlte/includes/sidebar.html new file mode 100644 index 0000000..5936332 --- /dev/null +++ b/tests/jinja_adminlte/includes/sidebar.html @@ -0,0 +1,685 @@ + + diff --git a/tests/jinja_adminlte/index.html b/tests/jinja_adminlte/index.html new file mode 100644 index 0000000..6b9ffad --- /dev/null +++ b/tests/jinja_adminlte/index.html @@ -0,0 +1,871 @@ +{% extends "layouts/base.html" %} +{% block title %}Dashboard {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + + + + + + + + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Dashboard

    +
    + +
    + +
    + +
    + +
    + +
    + + +
    +
    + +
    +
    + +
    +
    +

    150

    +

    + New Orders +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + +
    +
    +

    + 53 + + % + +

    +

    + Bounce Rate +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + +
    +
    +

    44

    +

    + User Registrations +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + +
    +
    +

    65

    +

    + Unique Visitors +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + + +
    + +
    + +
    +
    +

    + + Sales +

    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + + +
    +
    +

    Direct Chat

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + message user image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + message user image + +
    + You better believe it! +
    + +
    + + +
    +
    + + Alexander Pierce + + + 23 Jan 5:37 pm + +
    + + message user image + +
    + Working with AdminLTE on a great new app! Wanna join? +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 6:10 pm + +
    + + message user image + +
    + I would love to. +
    + +
    + +
    + + + + +
    + + + +
    + + +
    +
    +

    + + To Do List +

    +
    + +
    +
    + +
    +
      +
    • + + + + + + +
      + + +
      + + + Design a nice theme + + + + + 2 mins + + +
      + + +
      +
    • +
    • + + + + +
      + + +
      + + Make the theme responsive + + + + 4 hours + +
      + + +
      +
    • +
    • + + + + +
      + + +
      + + Let theme shine like a star + + + + 1 day + +
      + + +
      +
    • +
    • + + + + +
      + + +
      + + Let theme shine like a star + + + + 3 days + +
      + + +
      +
    • +
    • + + + + +
      + + +
      + + Check your messages and notifications + + + + 1 week + +
      + + +
      +
    • +
    • + + + + +
      + + +
      + + Let theme shine like a star + + + + 1 month + +
      + + +
      +
    • +
    +
    + + +
    + +
    + + +
    + +
    +
    +

    + + Visitors +

    + +
    + + +
    + +
    +
    +
    +
    + + +
    + + +
    +
    +

    + + Sales Graph +

    +
    + + +
    +
    +
    + +
    + + + +
    + + +
    +
    +

    + + Calendar +

    + + + +
    + +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/index2.html b/tests/jinja_adminlte/index2.html new file mode 100644 index 0000000..26f42de --- /dev/null +++ b/tests/jinja_adminlte/index2.html @@ -0,0 +1,1283 @@ +{% extends "layouts/base.html" %} +{% block title %}Dashboard2 {% endblock %} + +{% block body_class %} + sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Dashboard v2

    +
    + +
    + +
    + +
    + +
    + +
    + + +
    +
    + +
    +
    +
    + + + +
    + CPU Traffic + + 10 + + % + + +
    + +
    + +
    + +
    +
    + + + +
    + Likes + 41,410 +
    + +
    + +
    + + +
    +
    +
    + + + +
    + Sales + 760 +
    + +
    + +
    + +
    +
    + + + +
    + New Members + 2,000 +
    + +
    + +
    + +
    + +
    +
    +
    +
    +
    Monthly Recap Report
    + +
    + +
    +
    +
    +

    + Sales: 1 Jan, 2014 - 30 Jul, 2014 +

    +
    + + +
    + +
    + +
    +

    + Goal Completion +

    +
    + Add Products to Cart + + + 160 + + /200 + +
    +
    +
    +
    + +
    + Complete Purchase + + + 310 + + /400 + +
    +
    +
    +
    + +
    + + Visit Premium Page + + + + 480 + + /800 + +
    +
    +
    +
    + +
    + Send Inquiries + + + 250 + + /500 + +
    +
    +
    +
    + +
    + +
    + +
    + + + +
    + +
    + +
    + + +
    + +
    + +
    +
    +

    + US-Visitors Report +

    +
    + + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 90,70,90,70,75,80,70 +
    +
    + 8390 +
    + + Visits + +
    + +
    +
    + 90,50,90,70,61,83,63 +
    +
    + 30% +
    + + Referrals + +
    + +
    +
    + 90,50,90,70,61,83,63 +
    +
    + 70% +
    + + Organic + +
    + +
    + +
    + +
    + +
    + +
    +
    + +
    +
    +

    + Direct Chat +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + message user image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + message user image + +
    + You better believe it! +
    + +
    + + +
    +
    + + Alexander Pierce + + + 23 Jan 5:37 pm + +
    + + message user image + +
    + Working with AdminLTE on a great new app! Wanna join? +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 6:10 pm + +
    + + message user image + +
    + I would love to. +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +
    +
    +

    + Latest Members +

    +
    + + 8 New Members + + + +
    +
    + +
    + + +
    + + + +
    + +
    + +
    + + +
    +
    +

    + Latest Orders +

    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Order IDItemStatusPopularity
    + + OR9842 + + Call of Duty IV + + Shipped + + +
    + 90,80,90,-70,61,-83,63 +
    +
    + + OR1848 + + Samsung Smart TV + + Pending + + +
    + 90,80,-90,70,61,-83,68 +
    +
    + + OR7429 + + iPhone 6 Plus + + Delivered + + +
    + 90,-80,90,70,-61,83,63 +
    +
    + + OR7429 + + Samsung Smart TV + + Processing + + +
    + 90,80,-90,70,-61,83,63 +
    +
    + + OR1848 + + + Samsung Smart TV + + + Pending + + +
    + 90,80,-90,70,61,-83,68 +
    +
    + + OR7429 + + + iPhone 6 Plus + + + Delivered + + +
    + 90,-80,90,70,-61,83,63 +
    +
    + + OR9842 + + + Call of Duty IV + + + Shipped + + +
    + 90,80,90,-70,61,-83,63 +
    +
    +
    + +
    + + + +
    + +
    + +
    + +
    + + + +
    + + Inventory + + + 5,200 + +
    + +
    + +
    + + + +
    + + Mentions + + + 92,050 + +
    + +
    + +
    + + + +
    + + Downloads + + + 114,381 + +
    + +
    + +
    + + + +
    + + Direct Messages + + + 163,921 + +
    + +
    + +
    +
    +

    + Browser Usage +

    +
    + + +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    +
      +
    • + + Chrome +
    • +
    • + + IE +
    • +
    • + + FireFox +
    • +
    • + + Safari +
    • +
    • + + Opera +
    • +
    • + + Navigator +
    • +
    +
    + +
    + +
    + + + +
    + + +
    +
    +

    + Recently Added Products +

    +
    + + +
    +
    + +
    + +
    + + + +
    + +
    + +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/index3.html b/tests/jinja_adminlte/index3.html new file mode 100644 index 0000000..5b14537 --- /dev/null +++ b/tests/jinja_adminlte/index3.html @@ -0,0 +1,333 @@ +{% extends "layouts/base.html" %} +{% block title %}Dashboard3 {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Dashboard v3

    +
    + +
    + +
    + +
    + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Online Store Visitors

    + View Report +
    +
    +
    +
    +

    + 820 + Visitors Over Time +

    +

    + + + 12.5% + + Since last week +

    +
    + +
    + +
    +
    + + + This Week + + + + Last Week + +
    +
    +
    + +
    +
    +

    Products

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ProductPriceSalesMore
    + Product 1 + Some Product + $13 USD + + + 12% + + 12,000 Sold + + + + +
    + Product 1 + Another Product + $29 USD + + + 0.5% + + 123,234 Sold + + + + +
    + Product 1 + Amazing Product + $1,230 USD + + + 3% + + 198 Sold + + + + +
    + Product 1 + Perfect Item + NEW + $199 USD + + + 63% + + 87 Sold + + + + +
    +
    +
    + +
    + +
    +
    +
    +
    +

    Sales

    + View Report +
    +
    +
    +
    +

    + + $18,230.00 + + Sales Over Time +

    +

    + + + 33.1% + + + Since last month + +

    +
    + +
    + +
    +
    + + + This year + + + + Last year + +
    +
    +
    + +
    +
    +

    + Online Store Overview +

    + +
    +
    +
    +

    + +

    +

    + + + 12% + + + CONVERSION RATE + +

    +
    + +
    +

    + +

    +

    + + + 0.8% + + + SALES RATE + +

    +
    + +
    +

    + +

    +

    + + + 1% + + + REGISTRATION RATE + +

    +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/layout-boxed.html b/tests/jinja_adminlte/layout-boxed.html new file mode 100644 index 0000000..fd73668 --- /dev/null +++ b/tests/jinja_adminlte/layout-boxed.html @@ -0,0 +1,94 @@ +{% extends "layouts/base.html" %} +{% block title %}Layout Boxed {% endblock %} + +{% block body_class %} + sidebar-mini layout-boxed +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Boxed Layout

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    +
    +
    +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/layout-collapsed-sidebar.html b/tests/jinja_adminlte/layout-collapsed-sidebar.html new file mode 100644 index 0000000..e4646ce --- /dev/null +++ b/tests/jinja_adminlte/layout-collapsed-sidebar.html @@ -0,0 +1,94 @@ +{% extends "layouts/base.html" %} +{% block title %}Collapsed Sidebar {% endblock %} + +{% block body_class %} + sidebar-mini sidebar-collapse +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Collapsed Sidebar

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    +
    +
    +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/layout-fixed-footer.html b/tests/jinja_adminlte/layout-fixed-footer.html new file mode 100644 index 0000000..7611aba --- /dev/null +++ b/tests/jinja_adminlte/layout-fixed-footer.html @@ -0,0 +1,94 @@ +{% extends "layouts/base.html" %} +{% block title %}Fixed Footer Layout {% endblock %} + +{% block body_class %} + sidebar-mini layout-footer-fixed +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Fixed Footer Layout

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    +
    +
    +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/layout-fixed-sidebar.html b/tests/jinja_adminlte/layout-fixed-sidebar.html new file mode 100644 index 0000000..fd6ec53 --- /dev/null +++ b/tests/jinja_adminlte/layout-fixed-sidebar.html @@ -0,0 +1,98 @@ +{% extends "layouts/base.html" %} +{% block title %}Fixed Sidebar {% endblock %} + +{% block body_class %} + sidebar-mini layout-fixed +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Fixed Layout

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    +
    +
    +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/layout-fixed-topnav.html b/tests/jinja_adminlte/layout-fixed-topnav.html new file mode 100644 index 0000000..52794b0 --- /dev/null +++ b/tests/jinja_adminlte/layout-fixed-topnav.html @@ -0,0 +1,94 @@ +{% extends "layouts/base.html" %} +{% block title %}Fixed Navbar Layout {% endblock %} + +{% block body_class %} + sidebar-mini layout-navbar-fixed +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Fixed Navbar Layout

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    +
    +
    +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/layout-top-nav-sidebar.html b/tests/jinja_adminlte/layout-top-nav-sidebar.html new file mode 100644 index 0000000..2a3203f --- /dev/null +++ b/tests/jinja_adminlte/layout-top-nav-sidebar.html @@ -0,0 +1,133 @@ +{% extends "layouts/base.html" %} +{% block title %}Top Navigation + Sidebar {% endblock %} + +{% block body_class %} + sidebar-collapse layout-top-nav +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    + Top Navigation + + Example 3.0 + +

    +
    + +
    + +
    + +
    + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    Card title
    +

    + Some quick example text to build on the card title and make up the bulk of the card's + content. +

    + Card link + Another link +
    +
    +
    +
    +
    Card title
    +

    + Some quick example text to build on the card title and make up the bulk of the card's + content. +

    + Card link + Another link +
    +
    + +
    + +
    +
    +
    +
    Featured
    +
    +
    +
    Special title treatment
    +

    + With supporting text below as a natural lead-in to additional content. +

    + + Go somewhere + +
    +
    +
    +
    +
    + Featured +
    +
    +
    +
    + Special title treatment +
    +

    + With supporting text below as a natural lead-in to additional content. +

    + + Go somewhere + +
    +
    +
    + +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/layouts/base-fullscreen.html b/tests/jinja_adminlte/layouts/base-fullscreen.html new file mode 100644 index 0000000..5b31235 --- /dev/null +++ b/tests/jinja_adminlte/layouts/base-fullscreen.html @@ -0,0 +1,21 @@ + + + + + + + + + AdminLTE Jinja - + {% block title %}{% endblock %} + | AppSeed + + + {% block stylesheets %}{% endblock stylesheets %} + + + {% block content %}{% endblock content %} + + {% block javascripts %}{% endblock javascripts %} + + diff --git a/tests/jinja_adminlte/layouts/base.html b/tests/jinja_adminlte/layouts/base.html new file mode 100644 index 0000000..d6498b2 --- /dev/null +++ b/tests/jinja_adminlte/layouts/base.html @@ -0,0 +1,31 @@ + + + + + + + + + AdminLTE Jinja - + {% block title %}{% endblock %} + | AppSeed + + {% block stylesheets %}{% endblock stylesheets %} + + +
    + {% include 'includes/navigation.html' %} + {% include 'includes/sidebar.html' %} + {% block content %}{% endblock content %} + {% include 'includes/footer.html' %} + + + +
    + + + {% block javascripts %}{% endblock javascripts %} + + diff --git a/tests/jinja_adminlte/login.html b/tests/jinja_adminlte/login.html new file mode 100644 index 0000000..19b95c0 --- /dev/null +++ b/tests/jinja_adminlte/login.html @@ -0,0 +1,105 @@ +{% extends "layouts/base-fullscreen.html" %} +{% block title %}Login {% endblock %} + +{% block body_class %} + login-page +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +{% endblock content %} + +{% block javascripts %} + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/mailbox-compose.html b/tests/jinja_adminlte/mailbox-compose.html new file mode 100644 index 0000000..bda77bf --- /dev/null +++ b/tests/jinja_adminlte/mailbox-compose.html @@ -0,0 +1,257 @@ +{% extends "layouts/base.html" %} +{% block title %}Compose {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Compose

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + Back to Inbox + +
    +
    +

    Folders

    +
    + +
    +
    + + +
    + +
    +
    +

    Labels

    +
    + +
    +
    + + + +
    + +
    + +
    +
    +
    +

    Compose New Message

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Attachment + +
    +

    + Max. 32MB +

    +
    +
    + + + +
    + +
    + +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/mailbox-read-mail.html b/tests/jinja_adminlte/mailbox-read-mail.html new file mode 100644 index 0000000..74ac910 --- /dev/null +++ b/tests/jinja_adminlte/mailbox-read-mail.html @@ -0,0 +1,354 @@ +{% extends "layouts/base.html" %} +{% block title %}Read Email {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Compose

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + Back to Inbox + +
    +
    +

    Folders

    +
    + +
    +
    + + +
    + +
    +
    +

    Labels

    +
    + +
    +
    + + + +
    + +
    + +
    +
    +
    +

    Read Mail

    + +
    + +
    +
    +
    Message Subject Is Placed Here
    +
    + From: support@adminlte.io + + 15 Feb. 2015 11:03 PM + +
    +
    + +
    +
    + + + +
    + + +
    + +
    +

    + Hello John, +

    +

    + Keffiyeh blog actually fashion axe vegan, irony biodiesel. Cold-pressed hoodie chillwave put a bird + on it aesthetic, bitters brunch meggings vegan iPhone. Dreamcatcher vegan scenester mlkshk. Ethical + master cleanse Bushwick, occupy Thundercats banjo cliche ennui farm-to-table mlkshk fanny pack + gluten-free. Marfa butcher vegan quinoa, bicycle rights disrupt tofu scenester chillwave 3 wolf moon + asymmetrical taxidermy pour-over. Quinoa tote bag fashion axe, Godard disrupt migas church-key tofu + blog locavore. Thundercats cronut polaroid Neutra tousled, meh food truck selfies narwhal American + Apparel. +

    +

    + Raw denim McSweeney's bicycle rights, iPhone trust fund quinoa Neutra VHS kale chips vegan PBR&B + literally Thundercats +1. Forage tilde four dollar toast, banjo health goth paleo butcher. Four dollar + toast Brooklyn pour-over American Apparel sustainable, lumbersexual listicle gluten-free health goth + umami hoodie. Synth Echo Park bicycle rights DIY farm-to-table, retro kogi sriracha dreamcatcher PBR&B + flannel hashtag irony Wes Anderson. Lumbersexual Williamsburg Helvetica next level. Cold-pressed + slow-carb pop-up normcore Thundercats Portland, cardigan literally meditation lumbersexual crucifix. + Wayfarers raw denim paleo Bushwick, keytar Helvetica scenester keffiyeh 8-bit irony mumblecore + whatever viral Truffaut. +

    +

    + Post-ironic shabby chic VHS, Marfa keytar flannel lomo try-hard keffiyeh cray. Actually fap fanny + pack yr artisan trust fund. High Life dreamcatcher church-key gentrify. Tumblr stumptown four dollar + toast vinyl, cold-pressed try-hard blog authentic keffiyeh Helvetica lo-fi tilde Intelligentsia. Lomo + locavore salvia bespoke, twee fixie paleo cliche brunch Schlitz blog McSweeney's messenger bag swag + slow-carb. Odd Future photo booth pork belly, you probably haven't heard of them actually tofu ennui + keffiyeh lo-fi Truffaut health goth. Narwhal sustainable retro disrupt. +

    +

    + Skateboard artisan letterpress before they sold out High Life messenger bag. Bitters chambray + leggings listicle, drinking vinegar chillwave synth. Fanny pack hoodie American Apparel twee. American + Apparel PBR listicle, salvia aesthetic occupy sustainable Neutra kogi. Organic synth Tumblr viral + plaid, shabby chic single-origin coffee Etsy 3 wolf moon slow-carb Schlitz roof party tousled squid + vinyl. Readymade next level literally trust fund. Distillery master cleanse migas, Vice sriracha + flannel chambray chia cronut. +

    +

    + Thanks, +
    + Jane +

    +
    + +
    + + + + + +
    + +
    + +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/mailbox.html b/tests/jinja_adminlte/mailbox.html new file mode 100644 index 0000000..2e815a3 --- /dev/null +++ b/tests/jinja_adminlte/mailbox.html @@ -0,0 +1,718 @@ +{% extends "layouts/base.html" %} +{% block title %}Mailbox {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    Inbox

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    + + Compose + +
    +
    +

    Folders

    +
    + +
    +
    + + +
    + +
    +
    +

    Labels

    +
    + +
    +
    + + +
    + +
    + +
    +
    +
    +

    Inbox

    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    + + +
    + + + +
    + + +
    + 1-50/200 +
    + + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + + + + Alexander Pierce + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + 5 mins ago
    +
    + + +
    +
    + + + + + Alexander Pierce + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + 28 mins ago
    +
    + + +
    +
    + + + + + Alexander Pierce + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + 11 hours ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + 15 hours ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + Yesterday +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + 2 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + 2 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + 2 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + 2 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + 2 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + 4 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + 12 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + 12 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + 14 days ago +
    +
    + + +
    +
    + + + + + + Alexander Pierce + + + + AdminLTE 3.0 Issue + + - Trying to find a solution to this problem... + + + + 15 days ago +
    + +
    + +
    + + +
    + +
    + +
    + +
    + +
    + +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/page-403.html b/tests/jinja_adminlte/page-403.html new file mode 100644 index 0000000..b5890ff --- /dev/null +++ b/tests/jinja_adminlte/page-403.html @@ -0,0 +1,85 @@ +{% extends "layouts/base.html" %} +{% block title %}Error 403 {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} + +
    + +
    +
    +
    +
    +

    404 Error Page

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +

    404

    +
    +

    + + Oops! Page not found. +

    +

    + We could not find the page you were looking for. + Meanwhile, you may + return to dashboard + or try using the search form. +

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/page-404.html b/tests/jinja_adminlte/page-404.html new file mode 100644 index 0000000..1ac85ff --- /dev/null +++ b/tests/jinja_adminlte/page-404.html @@ -0,0 +1,84 @@ +{% extends "layouts/base.html" %} +{% block title %}Error 404 {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    404 Error Page

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +

    404

    +
    +

    + + Oops! Page not found. +

    +

    + We could not find the page you were looking for. + Meanwhile, you may + return to dashboard + or try using the search form. +

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/page-500.html b/tests/jinja_adminlte/page-500.html new file mode 100644 index 0000000..f4cf8d7 --- /dev/null +++ b/tests/jinja_adminlte/page-500.html @@ -0,0 +1,83 @@ +{% extends "layouts/base.html" %} +{% block title %}Error 500 {% endblock %} + +{% block body_class %} + sidebar-mini +{% endblock body_class %} + +{% block stylesheets %} + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    500 Error Page

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +

    500

    +
    +

    + + Oops! Something went wrong. +

    +

    + We will work on fixing that right away. + Meanwhile, you may + return to dashboard + or try using the search form. +

    +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/page-blank.html b/tests/jinja_adminlte/page-blank.html new file mode 100644 index 0000000..ee51f7c --- /dev/null +++ b/tests/jinja_adminlte/page-blank.html @@ -0,0 +1,83 @@ +{% extends "layouts/base.html" %} +{% block title %}Blank Page {% endblock %} + +{% block body_class %} + sidebar-mini pace-primary +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    +
    +
    +

    Blank Page

    +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +

    Title

    +
    + + +
    +
    +
    + Start creating your amazing application! +
    + + + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + + + + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/register.html b/tests/jinja_adminlte/register.html new file mode 100644 index 0000000..d6f6c79 --- /dev/null +++ b/tests/jinja_adminlte/register.html @@ -0,0 +1,114 @@ +{% extends "layouts/base-fullscreen.html" %} +{% block title %}Register {% endblock %} + +{% block body_class %} + register-page +{% endblock body_class %} + +{% block stylesheets %} + + + + + + + + +{% endblock stylesheets %} +{% block content %} +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    + +
    + +
    +
    + + + I already have a membership + +
    + +
    + +
    +{% endblock content %} + +{% block javascripts %} + + + + +{% endblock javascripts %} diff --git a/tests/jinja_adminlte/tables-data.html b/tests/jinja_adminlte/tables-data.html new file mode 100644 index 0000000..a0d3dbe --- /dev/null +++ b/tests/jinja_adminlte/tables-data.html @@ -0,0 +1,2128 @@ +{% extends "layouts/base.html" %} +{% block title %}Tables Data {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    DataTables

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    DataTable with minimal features & hover style

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Rendering engineBrowserPlatform(s)Engine versionCSS grade
    Trident + Internet + Explorer 4.0 + Win 95+4X
    + Trident + + Internet + Explorer 5.0 + + Win 95+ + + 5 + + C +
    + Trident + + Internet + Explorer 5.5 + + Win 95+ + + 5.5 + + A +
    + Trident + + Internet + Explorer 6 + + Win 98+ + + 6 + + A +
    + Trident + + Internet Explorer 7 + + Win XP SP2+ + + 7 + + A +
    + Trident + + AOL browser (AOL desktop) + + Win XP + + 6 + + A +
    + Gecko + + Firefox 1.0 + + Win 98+ / OSX.2+ + + 1.7 + + A +
    + Gecko + + Firefox 1.5 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Firefox 2.0 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Firefox 3.0 + + Win 2k+ / OSX.3+ + + 1.9 + + A +
    + Gecko + + Camino 1.0 + + OSX.2+ + + 1.8 + + A +
    + Gecko + + Camino 1.5 + + OSX.3+ + + 1.8 + + A +
    + Gecko + + Netscape 7.2 + + Win 95+ / Mac OS 8.6-9.2 + + 1.7 + + A +
    + Gecko + + Netscape Browser 8 + + Win 98SE+ + + 1.7 + + A +
    + Gecko + + Netscape Navigator 9 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Mozilla 1.0 + + Win 95+ / OSX.1+ + + 1 + + A +
    + Gecko + + Mozilla 1.1 + + Win 95+ / OSX.1+ + + 1.1 + + A +
    + Gecko + + Mozilla 1.2 + + Win 95+ / OSX.1+ + + 1.2 + + A +
    + Gecko + + Mozilla 1.3 + + Win 95+ / OSX.1+ + + 1.3 + + A +
    + Gecko + + Mozilla 1.4 + + Win 95+ / OSX.1+ + + 1.4 + + A +
    + Gecko + + Mozilla 1.5 + + Win 95+ / OSX.1+ + + 1.5 + + A +
    + Gecko + + Mozilla 1.6 + + Win 95+ / OSX.1+ + + 1.6 + + A +
    + Gecko + + Mozilla 1.7 + + Win 98+ / OSX.1+ + + 1.7 + + A +
    + Gecko + + Mozilla 1.8 + + Win 98+ / OSX.1+ + + 1.8 + + A +
    + Gecko + + Seamonkey 1.1 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Epiphany 2.20 + + Gnome + + 1.8 + + A +
    + Webkit + + Safari 1.2 + + OSX.3 + + 125.5 + + A +
    + Webkit + + Safari 1.3 + + OSX.3 + + 312.8 + + A +
    + Webkit + + Safari 2.0 + + OSX.4+ + + 419.3 + + A +
    + Webkit + + Safari 3.0 + + OSX.4+ + + 522.1 + + A +
    + Webkit + + OmniWeb 5.5 + + OSX.4+ + + 420 + + A +
    + Webkit + + iPod Touch / iPhone + + iPod + + 420.1 + + A +
    + Webkit + + S60 + + S60 + + 413 + + A +
    + Presto + + Opera 7.0 + + Win 95+ / OSX.1+ + + - + + A +
    + Presto + + Opera 7.5 + + Win 95+ / OSX.2+ + + - + + A +
    + Presto + + Opera 8.0 + + Win 95+ / OSX.2+ + + - + + A +
    + Presto + + Opera 8.5 + + Win 95+ / OSX.2+ + + - + + A +
    + Presto + + Opera 9.0 + + Win 95+ / OSX.3+ + + - + + A +
    + Presto + + Opera 9.2 + + Win 88+ / OSX.3+ + + - + + A +
    + Presto + + Opera 9.5 + + Win 88+ / OSX.3+ + + - + + A +
    + Presto + + Opera for Wii + + Wii + + - + + A +
    + Presto + + Nokia N800 + + N800 + + - + + A +
    + Presto + + Nintendo DS browser + + Nintendo DS + + 8.5 + + C/A + + 1 + +
    + KHTML + + Konqureror 3.1 + + KDE 3.1 + + 3.1 + + C +
    + KHTML + + Konqureror 3.3 + + KDE 3.3 + + 3.3 + + A +
    + KHTML + + Konqureror 3.5 + + KDE 3.5 + + 3.5 + + A +
    + Tasman + + Internet Explorer 4.5 + + Mac OS 8-9 + + - + + X +
    + Tasman + + Internet Explorer 5.1 + + Mac OS 7.6-9 + + 1 + + C +
    + Tasman + + Internet Explorer 5.2 + + Mac OS 8-X + + 1 + + C +
    + Misc + + NetFront 3.1 + + Embedded devices + + - + + C +
    + Misc + + NetFront 3.4 + + Embedded devices + + - + + A +
    + Misc + + Dillo 0.8 + + Embedded devices + + - + + X +
    + Misc + + Links + + Text only + + - + + X +
    + Misc + + Lynx + + Text only + + - + + X +
    + Misc + + IE Mobile + + Windows Mobile 6 + + - + + C +
    + Misc + + PSP browser + + PSP + + - + + C +
    + Other browsers + + All others + + - + + - + + U +
    + Rendering engine + + Browser + + Platform(s) + + Engine version + + CSS grade +
    +
    + +
    + +
    +
    +

    DataTable with default features

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Rendering engine + + Browser + + Platform(s) + + Engine version + + CSS grade +
    + Trident + + Internet + Explorer 4.0 + + Win 95+ + + 4 + + X +
    + Trident + + Internet + Explorer 5.0 + + Win 95+ + + 5 + + C +
    + Trident + + Internet + Explorer 5.5 + + Win 95+ + + 5.5 + + A +
    + Trident + + Internet + Explorer 6 + + Win 98+ + + 6 + + A +
    + Trident + + Internet Explorer 7 + + Win XP SP2+ + + 7 + + A +
    + Trident + + AOL browser (AOL desktop) + + Win XP + + 6 + + A +
    + Gecko + + Firefox 1.0 + + Win 98+ / OSX.2+ + + 1.7 + + A +
    + Gecko + + Firefox 1.5 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Firefox 2.0 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Firefox 3.0 + + Win 2k+ / OSX.3+ + + 1.9 + + A +
    + Gecko + + Camino 1.0 + + OSX.2+ + + 1.8 + + A +
    + Gecko + + Camino 1.5 + + OSX.3+ + + 1.8 + + A +
    + Gecko + + Netscape 7.2 + + Win 95+ / Mac OS 8.6-9.2 + + 1.7 + + A +
    + Gecko + + Netscape Browser 8 + + Win 98SE+ + + 1.7 + + A +
    + Gecko + + Netscape Navigator 9 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Mozilla 1.0 + + Win 95+ / OSX.1+ + + 1 + + A +
    + Gecko + + Mozilla 1.1 + + Win 95+ / OSX.1+ + + 1.1 + + A +
    + Gecko + + Mozilla 1.2 + + Win 95+ / OSX.1+ + + 1.2 + + A +
    + Gecko + + Mozilla 1.3 + + Win 95+ / OSX.1+ + + 1.3 + + A +
    + Gecko + + Mozilla 1.4 + + Win 95+ / OSX.1+ + + 1.4 + + A +
    + Gecko + + Mozilla 1.5 + + Win 95+ / OSX.1+ + + 1.5 + + A +
    + Gecko + + Mozilla 1.6 + + Win 95+ / OSX.1+ + + 1.6 + + A +
    + Gecko + + Mozilla 1.7 + + Win 98+ / OSX.1+ + + 1.7 + + A +
    + Gecko + + Mozilla 1.8 + + Win 98+ / OSX.1+ + + 1.8 + + A +
    + Gecko + + Seamonkey 1.1 + + Win 98+ / OSX.2+ + + 1.8 + + A +
    + Gecko + + Epiphany 2.20 + + Gnome + + 1.8 + + A +
    + Webkit + + Safari 1.2 + + OSX.3 + + 125.5 + + A +
    + Webkit + + Safari 1.3 + + OSX.3 + + 312.8 + + A +
    + Webkit + + Safari 2.0 + + OSX.4+ + + 419.3 + + A +
    + Webkit + + Safari 3.0 + + OSX.4+ + + 522.1 + + A +
    + Webkit + + OmniWeb 5.5 + + OSX.4+ + + 420 + + A +
    + Webkit + + iPod Touch / iPhone + + iPod + + 420.1 + + A +
    + Webkit + + S60 + + S60 + + 413 + + A +
    + Presto + + Opera 7.0 + + Win 95+ / OSX.1+ + + - + + A +
    + Presto + + Opera 7.5 + + Win 95+ / OSX.2+ + + - + + A +
    + Presto + + Opera 8.0 + + Win 95+ / OSX.2+ + + - + + A +
    + Presto + + Opera 8.5 + + Win 95+ / OSX.2+ + + - + + A +
    + Presto + + Opera 9.0 + + Win 95+ / OSX.3+ + + - + + A +
    + Presto + + Opera 9.2 + + Win 88+ / OSX.3+ + + - + + A +
    + Presto + + Opera 9.5 + + Win 88+ / OSX.3+ + + - + + A +
    + Presto + + Opera for Wii + + Wii + + - + + A +
    + Presto + + Nokia N800 + + N800 + + - + + A +
    + Presto + + Nintendo DS browser + + Nintendo DS + + 8.5 + + C/A + + 1 + +
    + KHTML + + Konqureror 3.1 + + KDE 3.1 + + 3.1 + + C +
    + KHTML + + Konqureror 3.3 + + KDE 3.3 + + 3.3 + + A +
    + KHTML + + Konqureror 3.5 + + KDE 3.5 + + 3.5 + + A +
    + Tasman + + Internet Explorer 4.5 + + Mac OS 8-9 + + - + + X +
    + Tasman + + Internet Explorer 5.1 + + Mac OS 7.6-9 + + 1 + + C +
    + Tasman + + Internet Explorer 5.2 + + Mac OS 8-X + + 1 + + C +
    + Misc + + NetFront 3.1 + + Embedded devices + + - + + C +
    + Misc + + NetFront 3.4 + + Embedded devices + + - + + A +
    + Misc + + Dillo 0.8 + + Embedded devices + + - + + X +
    + Misc + + Links + + Text only + + - + + X +
    + Misc + + Lynx + + Text only + + - + + X +
    + Misc + + IE Mobile + + Windows Mobile 6 + + - + + C +
    + Misc + + PSP browser + + PSP + + - + + C +
    + Other browsers + + All others + + - + + - + + U +
    + Rendering engine + + Browser + + Platform(s) + + Engine version + + CSS grade +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/tables-jsgrid.html b/tests/jinja_adminlte/tables-jsgrid.html new file mode 100644 index 0000000..b4721e2 --- /dev/null +++ b/tests/jinja_adminlte/tables-jsgrid.html @@ -0,0 +1,94 @@ +{% extends "layouts/base.html" %} +{% block title %}Tables JSGrid {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    jsGrid

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +

    jsGrid

    +
    + +
    +
    +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/tables-simple.html b/tests/jinja_adminlte/tables-simple.html new file mode 100644 index 0000000..86aa92c --- /dev/null +++ b/tests/jinja_adminlte/tables-simple.html @@ -0,0 +1,1075 @@ +{% extends "layouts/base.html" %} +{% block title %}Tables {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Simple Tables

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    Bordered Table

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #TaskProgressLabel
    1.Update software +
    +
    +
    +
    + 55% +
    2.Clean database +
    +
    +
    +
    + 70% +
    3.Cron job running +
    +
    +
    +
    + 30% +
    4. + Fix and squish bugs + +
    +
    +
    +
    + 90% +
    +
    + + +
    + +
    +
    +

    + Condensed Full Width Table +

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + # + + Task + + Progress + + Label +
    + 1. + + Update software + +
    +
    +
    +
    + + 55% + +
    + 2. + + Clean database + +
    +
    +
    +
    + + 70% + +
    + 3. + + Cron job running + +
    +
    +
    +
    + + 30% + +
    + 4. + + Fix and squish bugs + +
    +
    +
    +
    + + 90% + +
    +
    + +
    + +
    + +
    +
    +
    +

    + Simple Full Width Table +

    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + # + + Task + + Progress + + Label +
    + 1. + + Update software + +
    +
    +
    +
    + + 55% + +
    + 2. + + Clean database + +
    +
    +
    +
    + + 70% + +
    + 3. + + Cron job running + +
    +
    +
    +
    + + 30% + +
    + 4. + + Fix and squish bugs + +
    +
    +
    +
    + + 90% + +
    +
    + +
    + +
    +
    +

    + Striped Full Width Table +

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + # + + Task + + Progress + + Label +
    + 1. + + Update software + +
    +
    +
    +
    + + 55% + +
    + 2. + + Clean database + +
    +
    +
    +
    + + 70% + +
    + 3. + + Cron job running + +
    +
    +
    +
    + + 30% + +
    + 4. + + Fix and squish bugs + +
    +
    +
    +
    + + 90% + +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + Responsive Hover Table +

    +
    +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ID + + User + + Date + + Status + + Reason +
    + 183 + + John Doe + + 11-7-2014 + + + Approved + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 219 + + Alexander Pierce + + 11-7-2014 + + + Pending + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 657 + + Bob Doe + + 11-7-2014 + + + Approved + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 175 + + Mike Doe + + 11-7-2014 + + + Denied + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +

    + Fixed Header Table +

    +
    +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ID + + User + + Date + + Status + + Reason +
    + 183 + + John Doe + + 11-7-2014 + + + Approved + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 219 + + Alexander Pierce + + 11-7-2014 + + + Pending + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 657 + + Bob Doe + + 11-7-2014 + + + Approved + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 175 + + Mike Doe + + 11-7-2014 + + + Denied + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 134 + + Jim Doe + + 11-7-2014 + + + Approved + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 494 + + Victoria Doe + + 11-7-2014 + + + Pending + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 832 + + Michael Doe + + 11-7-2014 + + + Approved + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    + 982 + + Rocky Doe + + 11-7-2014 + + + Denied + + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +

    + Expandable Table +

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + # + + User + + Date + + Status + + Reason +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    + 219 + + Alexander Pierce + + 11-7-2014 + + Pending + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    + 657 + + Alexander Pierce + + 11-7-2014 + + Approved + + Bacon ipsum dolor sit amet salami venison chicken flank fatback doner. +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    +

    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. +

    +
    +
    + +
    + +
    +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-buttons.html b/tests/jinja_adminlte/ui-buttons.html new file mode 100644 index 0000000..25a4846 --- /dev/null +++ b/tests/jinja_adminlte/ui-buttons.html @@ -0,0 +1,2256 @@ +{% extends "layouts/base.html" %} +{% block title %}Ui Buttons {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Buttons

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    + + Buttons +

    +
    +
    +

    + Various types of buttons. Using the base class + + .btn + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Normal + Large + + .btn-lg + + + Small + + .btn-sm + + + Extra Small + + .btn-xs + + + Flat + + .btn-flat + + + Disabled + + .disabled + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +

    + + Outline Buttons +

    +
    +
    +

    + Various types of buttons. Using the base class + + .btn + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Normal + Large + + .btn-lg + + + Small + + .btn-sm + + + Extra Small + + .btn-xs + + + Flat + + .btn-flat + + + Disabled + + .disabled + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +

    + + Gradient Buttons (bg-gradient-*) +

    +
    +
    +

    + Various types of buttons. Using the base class + + .btn + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Normal + Large + + .btn-lg + + + Small + + .btn-sm + + + Extra Small + + .btn-xs + + + Flat + + .btn-flat + + + Disabled + + .disabled + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    + + + + + + + + + + + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +
    +

    Block Buttons

    +
    +
    + + + +
    +
    + + +
    +
    +

    Horizontal Button Group

    +
    +
    +

    + Horizontal button groups are easy to create with bootstrap. Just add your buttons + inside + + <div class="btn-group"></div> + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ButtonIconsFlatDropdown
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    +
    + +
    +
    +

    + Appended Buttons +

    +
    +
    + With dropdown + + + Normal +
    +
    + +
    + + +
    + + + Flat + +
    + + + + +
    + +
    + +
    + + +
    +
    +

    + Split buttons +

    +
    +
    + +

    + Normal split buttons: +

    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + +

    + Flat split buttons: +

    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + +

    + Hoverable split buttons: +

    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    + +
    + +
    + +
    + +
    +
    +

    + Application Buttons +

    +
    + + +
    + + +
    +
    +

    + Vertical Button Group +

    +
    +
    +

    + Vertical button groups are easy to create with bootstrap. Just add your buttons + inside + + <div class="btn-group-vertical"></div> + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Button + + Icons + + Flat + + Dropdown +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + +
    + + +
    +
    +

    + Radio Button Group +

    +
    +
    +

    + Radio Button Group with + + .btn-secondary + +

    +
    + + + +
    +

    + Radio Button Group with + + .bg-olive + +

    +
    + + + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-general.html b/tests/jinja_adminlte/ui-general.html new file mode 100644 index 0000000..f1476eb --- /dev/null +++ b/tests/jinja_adminlte/ui-general.html @@ -0,0 +1,1562 @@ +{% extends "layouts/base.html" %} +{% block title %}UI General {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Inline Charts

    +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    +

    + + Color Palette +

    +
    +
    +
    +
    Theme Colors
    +
    + +
    +
    +

    Primary

    +
    +
    + #007bff +
    +
    + Disabled +
    +
    +
    + +
    +

    Secondary

    +
    +
    + #6c757d +
    +
    + Disabled +
    +
    +
    + +
    +

    Info

    +
    +
    + #17a2b8 +
    +
    + Disabled +
    +
    +
    + +
    +

    Success

    +
    +
    + #28a745 +
    +
    + Disabled +
    +
    +
    + +
    +

    Warning

    +
    +
    + + #ffc107 + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    Danger

    +
    +
    + + #dc3545 + +
    +
    + + Disabled + +
    +
    +
    + +
    + +
    +
    Black/White Nuances
    +
    + +
    +
    +

    Black

    +
    +
    + + #000000 + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    Gray Dark

    +
    +
    + + #343a40 + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Gray +

    +
    +
    + + #adb5bd + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Light +

    +
    +
    + + #1f2d3d + +
    +
    + + Disabled + +
    +
    +
    + +
    + +
    +
    + Colors +
    +
    + +
    +
    +

    + Indigo +

    +
    +
    + + #6610f2 + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Lightblue +

    +
    +
    + + #3c8dbc + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Navy +

    +
    +
    + + #001f3f + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Purple +

    +
    +
    + + #605ca8 + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Fuchsia +

    +
    +
    + + #f012be + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Pink +

    +
    +
    + + #e83e8c + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Maroon +

    +
    +
    + + #d81b60 + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Orange +

    +
    +
    + + #ff851b + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Lime +

    +
    +
    + + #01ff70 + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Teal +

    +
    +
    + + #39cccc + +
    +
    + + Disabled + +
    +
    +
    + +
    +

    + Olive +

    +
    +
    + + #3d9970 + +
    +
    + + Disabled + +
    +
    +
    + +
    + +
    + +
    + + +
    + Alerts and Callouts +
    +
    +
    +
    +
    +

    + + Alerts +

    +
    + +
    +
    + +
    + + Alert! +
    + Danger alert preview. This alert is dismissable. A wonderful serenity has taken possession of my + entire + soul, like these sweet mornings of spring which I enjoy with my whole heart. +
    +
    + +
    + + Alert! +
    + Info alert preview. This alert is dismissable. +
    +
    + +
    + + Alert! +
    + Warning alert preview. This alert is dismissable. +
    +
    + +
    + + Alert! +
    + Success alert preview. This alert is dismissable. +
    +
    + +
    + +
    + +
    +
    +
    +

    + + Callouts +

    +
    + +
    +
    +
    + I am a danger callout! +
    +

    + There is a problem that we need to fix. A wonderful serenity has taken possession of my entire + soul, + like these sweet mornings of spring which I enjoy with my whole heart. +

    +
    +
    +
    + I am an info callout! +
    +

    + Follow the steps to continue to payment. +

    +
    +
    +
    + I am a warning callout! +
    +

    + This is a yellow callout. +

    +
    +
    +
    + I am a success callout! +
    +

    + This is a green callout. +

    +
    +
    + +
    + +
    + +
    + + +
    + Tabs in Cards +
    +
    +
    + +
    + + +
    +
    +
    + A wonderful serenity has taken possession of my entire soul, + like these sweet mornings of spring which I enjoy with my whole heart. + I am alone, and feel the charm of existence in this spot, + which was created for the bliss of souls like mine. I am so happy, + my dear friend, so absorbed in the exquisite sense of mere tranquil existence, + that I neglect my talents. I should be incapable of drawing a single stroke + at the present moment; and yet I feel that I never was a greater artist than now. +
    + +
    + The European languages are members of the same family. Their separate existence is a myth. + For science, music, sport, etc, Europe uses the same vocabulary. The languages only differ + in their grammar, their pronunciation and their most common words. Everyone realizes why a + new common language would be desirable: one could refuse to pay expensive translators. To + achieve this, it would be necessary to have uniform grammar, pronunciation and more common + words. If several languages coalesce, the grammar of the resulting language is more simple + and regular than that of the individual languages. +
    + +
    + Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, + when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived not only five centuries, but also the leap into electronic typesetting, + remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset + sheets containing Lorem Ipsum passages, and more recently with desktop publishing software + like Aldus PageMaker including versions of Lorem Ipsum. +
    + +
    + +
    + +
    + +
    + +
    + + + +
    + Progress Bars +
    +
    +
    +
    +
    +

    + Progress Bars Different Sizes +

    +
    + +
    +

    + + .progress + +

    +
    +
    + + 40% Complete (success) + +
    +
    +

    + + .progress-sm + +

    +
    +
    + + 20% Complete + +
    +
    +

    + + .progress-xs + +

    +
    +
    + + 60% Complete (warning) + +
    +
    +

    + + .progress-xxs + +

    +
    +
    + + 60% Complete (warning) + +
    +
    +
    + +
    + +
    + +
    +
    +
    +

    + Progress bars +

    +
    + +
    +
    +
    + + 40% Complete (success) + +
    +
    +
    +
    + + 20% Complete + +
    +
    +
    +
    + + 60% Complete (warning) + +
    +
    +
    +
    + + 80% Complete + +
    +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + Vertical Progress Bars Different Sizes +

    +
    + +
    +

    + By adding the class + + .vertical + + and + + .progress-sm + + , + + .progress-xs + + or + + .progress-xxs + + we achieve: +

    +
    +
    + + 40% + +
    +
    +
    +
    + + 100% + +
    +
    +
    +
    + + 60% + +
    +
    +
    +
    + + 60% + +
    +
    +
    + +
    + +
    + +
    +
    +
    +

    + Vertical Progress bars +

    +
    + +
    +

    + By adding the class + + .vertical + + we achieve: +

    +
    +
    + + 40% + +
    +
    +
    +
    + + 20% + +
    +
    +
    +
    + + 60% + +
    +
    +
    +
    + + 80% + +
    +
    +
    + +
    + +
    + +
    + + + +
    + Bootstrap Accordion & Carousel +
    +
    +
    +
    +
    +

    + Collapsible Accordion +

    +
    + +
    + +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. + 3 + wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt + laborum + eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee + nulla + assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft + beer + farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus + labore sustainable VHS. +
    +
    +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. + 3 + wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt + laborum + eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee + nulla + assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft + beer + farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus + labore sustainable VHS. +
    +
    +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. + 3 + wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt + laborum + eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee + nulla + assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft + beer + farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus + labore sustainable VHS. +
    +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    +

    + Carousel +

    +
    + +
    + +
    + +
    + +
    + +
    + + + +
    + Typography +
    +
    +
    +
    +
    +

    + + Headlines +

    +
    + +
    +

    + h1. Bootstrap heading +

    +

    + h2. Bootstrap heading +

    +

    + h3. Bootstrap heading +

    +

    + h4. Bootstrap heading +

    +
    + h5. Bootstrap heading +
    +
    + h6. Bootstrap heading +
    +
    + +
    + +
    + +
    +
    +
    +

    + + Text Emphasis +

    +
    + +
    +

    + Lead to emphasize importance +

    +

    + Text green to emphasize success +

    +

    + Text aqua to emphasize info +

    +

    + Text light blue to emphasize info (2) +

    +

    + Text red to emphasize danger +

    +

    + Text yellow to emphasize warning +

    +

    + Text muted to emphasize general +

    +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + + Primary Block Quotes +

    +
    + +
    +
    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. +

    + + Someone famous in + + Source Title + + +
    +
    + +
    + +
    + +
    +
    +
    +

    + + Secondary Block Quotes +

    +
    + +
    +
    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. +

    + + Someone famous in + + Source Title + + +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + + Unordered List +

    +
    + +
    +
      +
    • + Lorem ipsum dolor sit amet +
    • +
    • + Consectetur adipiscing elit +
    • +
    • + Integer molestie lorem at massa +
    • +
    • + Facilisis in pretium nisl aliquet +
    • +
    • + Nulla volutpat aliquam velit +
        +
      • + Phasellus iaculis neque +
      • +
      • + Purus sodales ultricies +
      • +
      • + Vestibulum laoreet porttitor sem +
      • +
      • + Ac tristique libero volutpat at +
      • +
      +
    • +
    • + Faucibus porta lacus fringilla vel +
    • +
    • + Aenean sit amet erat nunc +
    • +
    • + Eget porttitor lorem +
    • +
    +
    + +
    + +
    + +
    +
    +
    +

    + + Ordered Lists +

    +
    + +
    +
      +
    1. + Lorem ipsum dolor sit amet +
    2. +
    3. + Consectetur adipiscing elit +
    4. +
    5. + Integer molestie lorem at massa +
    6. +
    7. + Facilisis in pretium nisl aliquet +
    8. +
    9. + Nulla volutpat aliquam velit +
        +
      1. + Phasellus iaculis neque +
      2. +
      3. + Purus sodales ultricies +
      4. +
      5. + Vestibulum laoreet porttitor sem +
      6. +
      7. + Ac tristique libero volutpat at +
      8. +
      +
    10. +
    11. + Faucibus porta lacus fringilla vel +
    12. +
    13. + Aenean sit amet erat nunc +
    14. +
    15. + Eget porttitor lorem +
    16. +
    +
    + +
    + +
    + +
    +
    +
    +

    + + Unstyled List +

    +
    + +
    +
      +
    • + Lorem ipsum dolor sit amet +
    • +
    • + Consectetur adipiscing elit +
    • +
    • + Integer molestie lorem at massa +
    • +
    • + Facilisis in pretium nisl aliquet +
    • +
    • + Nulla volutpat aliquam velit +
        +
      • + Phasellus iaculis neque +
      • +
      • + Purus sodales ultricies +
      • +
      • + Vestibulum laoreet porttitor sem +
      • +
      • + Ac tristique libero volutpat at +
      • +
      +
    • +
    • + Faucibus porta lacus fringilla vel +
    • +
    • + Aenean sit amet erat nunc +
    • +
    • + Eget porttitor lorem +
    • +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + + Description +

    +
    + +
    +
    +
    + Description lists +
    +
    + A description list is perfect for defining terms. +
    +
    + Euismod +
    +
    + Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit. +
    +
    + Donec id elit non mi porta gravida at eget metus. +
    +
    + Malesuada porta +
    +
    + Etiam porta sem malesuada magna mollis euismod. +
    +
    +
    + +
    + +
    + +
    +
    +
    +

    + + Description Horizontal +

    +
    + +
    +
    +
    + Description lists +
    +
    + A description list is perfect for defining terms. +
    +
    + Euismod +
    +
    + Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit. +
    +
    + Donec id elit non mi porta gravida at eget metus. +
    +
    + Malesuada porta +
    +
    + Etiam porta sem malesuada magna mollis euismod. +
    +
    + Felis euismod semper eget lacinia +
    +
    + Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo + sit amet risus. +
    +
    +
    + +
    + +
    + +
    + + +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-icons.html b/tests/jinja_adminlte/ui-icons.html new file mode 100644 index 0000000..f342f8d --- /dev/null +++ b/tests/jinja_adminlte/ui-icons.html @@ -0,0 +1,83 @@ +{% extends "layouts/base.html" %} +{% block title %}UI Icons {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Icons

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +

    Icons

    +
    + +
    +

    + You can use any font library you like with AdminLTE 3. +

    + Recommendations + +
    + +
    +
    + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-modals.html b/tests/jinja_adminlte/ui-modals.html new file mode 100644 index 0000000..9849b16 --- /dev/null +++ b/tests/jinja_adminlte/ui-modals.html @@ -0,0 +1,774 @@ +{% extends "layouts/base.html" %} +{% block title %}UI Modals {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    + Modals & Alerts + + new + +

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    + + Modal Examples +

    +
    +
    + + + + + + + +
    +
    + + + +
    +
    + +
    + Instructions for how to use modals are available on the + + Bootstrap documentation + +
    +
    + +
    +
    +
    +

    + + Toasts Examples + + built in AdminLTE + +

    +
    +
    + + + + + +
    +
    + + + +
    +
    + + + + + +
    +
    +
    +
    +
    +

    + + SweetAlert2 Examples +

    +
    +
    + + + + + +
    + For more examples look at + + https://sweetalert2.github.io/ + +
    +
    + +
    +
    +
    +

    + + Toastr Examples +

    +
    +
    + + + + +
    + For more examples look at + + https://codeseven.github.io/toastr/ + +
    +
    + +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-navbar.html b/tests/jinja_adminlte/ui-navbar.html new file mode 100644 index 0000000..aa6408f --- /dev/null +++ b/tests/jinja_adminlte/ui-navbar.html @@ -0,0 +1,1116 @@ +{% extends "layouts/base.html" %} +{% block title %}UI Navbar {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    + Navbar & Tabs + + new + +

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    + + Navbar Examples +

    +
    +
    +
    +
    +

    + Default Navbar + + (navbar-light) + +

    + +
    +
    +

    + Default Navbar + + (navbar-white navbar-light) + +

    + +
    +
    +
    +
    +

    + Primary Navbar + + + recommended + + (navbar-primary navbar-dark) + +

    + +
    +
    +

    + Primary Navbar + + (navbar-primary navbar-light) + +

    + +
    +
    +
    +
    +

    + Orange Navbar + + + recommended + + (navbar-orange navbar-light) + +

    + +
    +
    +

    + Orange Navbar + + (navbar-orange navbar-dark) + +

    + +
    +
    +
    + +
    +
    + +
    + +
    +
    +

    + Nav Tabs inside Card Header + + card-tabs / card-outline-tabs + +

    +
    +
    + +
    +
    +
    + +
    +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    + +
    +
    +
    +
    +
    +

    Nav Tabs Overlay for loading

    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    + Loading... +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    +
    +
    +
    + +
    + Loading... +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    +
    + +
    +
    +
    + +
    +
    +

    + + Vertical Tabs Examples +

    +
    +
    +

    Left Sided

    +
    + +
    +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    +
    +

    + Right Sided + + (nav-tabs-right) + +

    +
    +
    +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    + +
    +
    + +
    + +
    +
    +

    + + Tabs Custom Content Examples +

    +
    +
    +

    Custom Content Below

    + +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    +

    + Custom Content goes here +

    +
    +

    + Custom Content Above +

    + +
    +

    + Custom Content goes here +

    +
    +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada lacus ullamcorper dui molestie, sit amet congue quam finibus. Etiam ultricies nunc non magna feugiat commodo. Etiam odio magna, mollis auctor felis vitae, ullamcorper ornare ligula. Proin pellentesque tincidunt nisi, vitae ullamcorper felis aliquam id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin id orci eu lectus blandit suscipit. Phasellus porta, ante et varius ornare, sem enim sollicitudin eros, at commodo leo est vitae lacus. Etiam ut porta sem. Proin porttitor porta nisl, id tempor risus rhoncus quis. In in quam a nibh cursus pulvinar non consequat neque. Mauris lacus elit, condimentum ac condimentum at, semper vitae lectus. Cras lacinia erat eget sapien porta consectetur. +
    +
    + Mauris tincidunt mi at erat gravida, eget tristique urna bibendum. Mauris pharetra purus ut ligula tempor, et vulputate metus facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas sollicitudin, nisi a luctus interdum, nisl ligula placerat mi, quis posuere purus ligula eu lectus. Donec nunc tellus, elementum sit amet ultricies at, posuere nec nunc. Nunc euismod pellentesque diam. +
    +
    + Morbi turpis dolor, vulputate vitae felis non, tincidunt congue mauris. Phasellus volutpat augue id mi placerat mollis. Vivamus faucibus eu massa eget condimentum. Fusce nec hendrerit sem, ac tristique nulla. Integer vestibulum orci odio. Cras nec augue ipsum. Suspendisse ut velit condimentum, mattis urna a, malesuada nunc. Curabitur eleifend facilisis velit finibus tristique. Nam vulputate, eros non luctus efficitur, ipsum odio volutpat massa, sit amet sollicitudin est libero sed ipsum. Nulla lacinia, ex vitae gravida fermentum, lectus ipsum gravida arcu, id fermentum metus arcu vel metus. Curabitur eget sem eu risus tincidunt eleifend ac ornare magna. +
    +
    + Pellentesque vestibulum commodo nibh nec blandit. Maecenas neque magna, iaculis tempus turpis ac, ornare sodales tellus. Mauris eget blandit dolor. Quisque tincidunt venenatis vulputate. Morbi euismod molestie tristique. Vestibulum consectetur dolor a vestibulum pharetra. Donec interdum placerat urna nec pharetra. Etiam eget dapibus orci, eget aliquet urna. Nunc at consequat diam. Nunc et felis ut nisl commodo dignissim. In hac habitasse platea dictumst. Praesent imperdiet accumsan ex sit amet facilisis. +
    +
    +
    + +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-ribbons.html b/tests/jinja_adminlte/ui-ribbons.html new file mode 100644 index 0000000..c2ecca8 --- /dev/null +++ b/tests/jinja_adminlte/ui-ribbons.html @@ -0,0 +1,277 @@ +{% extends "layouts/base.html" %} +{% block title %}UI Ribbons {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Ribbons

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    Ribbons

    +
    + +
    +
    +
    +
    +
    +
    + Ribbon +
    +
    + Ribbon Default +
    + + .ribbon-wrapper.ribbon-lg .ribbon + +
    +
    +
    +
    +
    +
    + Ribbon Large +
    +
    + Ribbon Large +
    + + .ribbon-wrapper.ribbon-lg .ribbon + +
    +
    +
    +
    +
    +
    + Ribbon Extra Large +
    +
    + Ribbon Extra Large +
    + + .ribbon-wrapper.ribbon-xl .ribbon + +
    +
    +
    +
    +
    +
    +
    +
    + Ribbon +
    +
    + Ribbon Large +
    + with Large Text +
    + + .ribbon-wrapper.ribbon-lg .ribbon.text-lg + +
    +
    +
    +
    +
    +
    + Ribbon +
    +
    + Ribbon Extra Large +
    + with Large Text +
    + + .ribbon-wrapper.ribbon-xl .ribbon.text-lg + +
    +
    +
    +
    +
    +
    + Ribbon +
    +
    + Ribbon Extra Large +
    + with Extra Large Text +
    + + .ribbon-wrapper.ribbon-xl .ribbon.text-xl + +
    +
    +
    +
    +
    +
    + Photo 1 +
    +
    + Ribbon +
    +
    +
    +
    +
    +
    + Photo 2 +
    +
    + Ribbon +
    +
    +
    +
    +
    +
    + Photo 3 +
    +
    + Ribbon +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-sliders.html b/tests/jinja_adminlte/ui-sliders.html new file mode 100644 index 0000000..1897d16 --- /dev/null +++ b/tests/jinja_adminlte/ui-sliders.html @@ -0,0 +1,363 @@ +{% extends "layouts/base.html" %} +{% block title %}UI Sliders {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Sliders

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    Ion Slider

    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    Bootstrap Slider

    +
    + +
    +
    +
    +
    + +
    +

    + .slider-red input.slider +

    +
    + +
    +

    + .slider-blue input.slider +

    +
    + +
    +

    + .slider-green input.slider +

    +
    + +
    +

    + .slider-yellow input.slider +

    +
    + +
    +

    + .slider-teal input.slider +

    +
    + +
    +

    + .slider-purple input.slider +

    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/ui-timeline.html b/tests/jinja_adminlte/ui-timeline.html new file mode 100644 index 0000000..afafa18 --- /dev/null +++ b/tests/jinja_adminlte/ui-timeline.html @@ -0,0 +1,194 @@ +{% extends "layouts/base.html" %} +{% block title %}UI Timeline {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Timeline

    +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    + 10 Feb. 2014 +
    + + +
    + +
    + + + 12:05 + +

    + Support Team + sent you an email +

    +
    + Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles, + weebly ning heekya handango imeem plugg dopplr jibjab, movity + jajah plickers sifteo edmodo ifttt zimbra. Babblely odeo kaboodle + quora plaxo ideeli hulu weebly balihoo... +
    + +
    +
    + + +
    + +
    + + + 5 mins ago + +

    + Sarah Young + accepted your friend request +

    +
    +
    + + +
    + +
    + + + 27 mins ago + +

    + Jay White + commented on your post +

    +
    + Take me to your leader! + Switzerland is small and neutral! + We are more like Germany, ambitious and misunderstood! +
    + +
    +
    + + +
    + 3 Jan. 2014 +
    + + +
    + +
    + + + 2 days ago + +

    + Mina Lee + uploaded new photos +

    +
    + ... + ... + ... + ... + ... +
    +
    +
    + + +
    + +
    + + + 5 days ago + +

    + + Mr. Doe + + shared a video +

    +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/jinja_adminlte/widgets.html b/tests/jinja_adminlte/widgets.html new file mode 100644 index 0000000..8b94fc1 --- /dev/null +++ b/tests/jinja_adminlte/widgets.html @@ -0,0 +1,2913 @@ +{% extends "layouts/base.html" %} +{% block title %}Widgets {% endblock %} + +{% block body_class %}{% endblock body_class %} + + {% block stylesheets %} + + + + + + + + + {% endblock stylesheets %} + {% block content %} + +
    + +
    +
    +
    +
    +

    Widgets

    +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    Info Box
    +
    +
    +
    + + + +
    + Messages + 1,410 +
    + +
    + +
    + +
    +
    + + + +
    + Bookmarks + 410 +
    + +
    + +
    + +
    +
    + + + +
    + Uploads + 13,648 +
    + +
    + +
    + +
    +
    + + + +
    + Likes + 93,139 +
    + +
    + +
    + +
    + + +
    + Info Box With Custom Shadows + + + Using Bootstrap's Shadow Utility + + +
    +
    +
    +
    + + + +
    + + Custom Shadows - None + + +
    + +
    + +
    + +
    +
    + + + +
    + + Custom Shadows - Small + + +
    + +
    + +
    + +
    +
    + + + +
    + + Custom Shadows - Regular + + +
    + +
    + +
    + +
    +
    + + + +
    + + Custom Shadows - Large + + +
    + +
    + +
    + +
    + + +
    + Info Box With + + bg-* + +
    +
    +
    +
    + + + +
    + + Bookmarks + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    +
    + + + +
    + + Likes + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    +
    + + + +
    + + Events + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    +
    + + + +
    + + Comments + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    + + +
    + Info Box With + + bg-gradient-* + +
    +
    +
    +
    + + + +
    + + Bookmarks + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    +
    + + + +
    + + Likes + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    +
    + + + +
    + + Events + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    +
    + + + +
    + + Comments + + + 41,410 + +
    +
    +
    + + 70% Increase in 30 Days + +
    + +
    + +
    + +
    + + + +
    + Small Box +
    +
    +
    + +
    +
    +

    150

    +

    + New Orders +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + +
    +
    +

    + 53 + + % + +

    +

    + Bounce Rate +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + +
    +
    +

    44

    +

    + User Registrations +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + +
    +
    +

    65

    +

    + Unique Visitors +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + + +
    +
    + +
    + +
    + +
    + +
    +

    150

    +

    + New Orders +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + +
    + +
    + +
    + +
    +

    + 53 + + % + +

    +

    + Bounce Rate +

    +
    +
    + +
    + + More info + + +
    +
    + +
    + + +

    + Cards +

    +
    + Abilities +
    +
    +
    +
    +
    +

    + Expandable +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Collapsable +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Removable +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Maximizable +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + Card Refresh +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + The body of the card after card refresh +
    +
    + +
    +
    +
    +

    + All together +

    +
    + + + + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Loading state +

    +
    +
    + The body of the card +
    + + +
    + +
    + +
    + +
    + +
    +
    +
    +

    + Loading state (dark) +

    +
    +
    + The body of the card +
    + + +
    + +
    + +
    + +
    + +
    + + +
    + Custom Shadows Variations + + + Using Bootstrap's Shadow Utility + + +
    +
    +
    +
    +
    +

    + Shadow - None +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Shadow - Small +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Shadow - Regular +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Shadow - Large +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    + + +
    + Colors Variations +
    +
    +
    +
    +
    +

    + Primary +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Success +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Warning +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Danger +

    +
    +
    + The body of the card +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + Primary Outline +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Success Outline +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Warning Outline +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Danger Outline +

    +
    +
    + The body of the card +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + Primary +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Success +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Warning +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Danger +

    +
    +
    + The body of the card +
    + +
    + +
    + +
    + +
    +
    +
    +
    +

    + Primary Gradient +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Success Gradient +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Warning Gradient +

    +
    + +
    + +
    + +
    + The body of the card +
    + +
    + +
    + +
    +
    +
    +

    + Danger Gradient +

    +
    +
    + The body of the card +
    + +
    + +
    + +
    + + + +

    + Direct Chat +

    +
    +
    + +
    +
    +

    + Direct Chat +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +
    +
    +

    + Direct Chat +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +
    +
    +

    + Direct Chat +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +
    +
    +

    + Direct Chat +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + + +
    + Custom Shadows Variations + + + Using Bootstrap's Shadow Utility + + +
    +
    +
    + +
    +
    +

    + Shadow - None +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +
    +
    +

    + Shadow - Small +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +
    +
    +

    + Shadow - Regular +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +
    +
    +

    + Shadow - Large +

    +
    + + 3 + + + + +
    +
    + +
    + +
    + +
    +
    + + Alexander Pierce + + + 23 Jan 2:00 pm + +
    + + Message User Image + +
    + Is this template really for free? That's unbelievable! +
    + +
    + + +
    +
    + + Sarah Bullock + + + 23 Jan 2:05 pm + +
    + + Message User Image + +
    + You better believe it! +
    + +
    + +
    + + + + +
    + + + +
    + +
    + +
    + +

    + Social Widgets +

    +
    +
    + +
    + +
    +
    + User Avatar +
    + +

    + Nadia Carmichael +

    +
    + Lead Developer +
    +
    + +
    + +
    + +
    + +
    + +
    +

    + Alexander Pierce +

    +
    + Founder & CEO +
    +
    +
    + User Avatar +
    + +
    + +
    + +
    + +
    + +
    +

    + Elizabeth Pierce +

    +
    + Web Designer +
    +
    +
    + User Avatar +
    + +
    + +
    + +
    + +
    +
    + +
    +
    +
    + User Image + + + Jonathan Burke Jr. + + + + Shared publicly - 7:30 PM Today + +
    + +
    + + + +
    + +
    + +
    + Photo +

    + I took this photo this morning. What do you guys think? +

    + + + + 127 likes - 3 comments + +
    + + + + + +
    + +
    + +
    + +
    +
    +
    + User Image + + + Jonathan Burke Jr. + + + + Shared publicly - 7:30 PM Today + +
    + +
    + + + +
    + +
    + +
    + +

    + Far far away, behind the word mountains, far from the + countries Vokalia and Consonantia, there live the blind + texts. Separated they live in Bookmarksgrove right at +

    +

    + the coast of the Semantics, a large language ocean. + A small river named Duden flows by their place and supplies + it with the necessary regelialia. It is a paradisematic + country, in which roasted parts of sentences fly into + your mouth. +

    + +
    + Attachment Image +
    +

    + + Lorem ipsum text generator + +

    +
    + Description about the attachment can be placed here. + Lorem Ipsum is simply dummy text of the printing and typesetting industry... + + more + +
    + +
    + +
    + + + + + + 45 likes - 2 comments + +
    + + + + + +
    + +
    + +
    + + +
    + Custom Shadows Variations + + + Using Bootstrap's Shadow Utility + + +
    +
    +
    + +
    + +
    +
    + User Avatar +
    + +

    + Nadia Carmichael +

    +
    + Lead Developer +
    +
    + +
    + +
    + +
    + +
    + +
    +

    + Alexander Pierce +

    +
    + Founder & CEO +
    +
    +
    + User Avatar +
    + +
    + +
    + +
    + +
    + +
    +

    + Elizabeth Pierce +

    +
    + Web Designer +
    +
    +
    + User Avatar +
    + +
    + +
    + +
    + +
    + +
    + + + + +
    + + {% endblock content %} + + {% block javascripts %} + + + + + + + + + {% endblock javascripts %} diff --git a/tests/test_djlint.py b/tests/test_djlint.py index 80ece90..9be44a4 100644 --- a/tests/test_djlint.py +++ b/tests/test_djlint.py @@ -198,3 +198,29 @@ def test_W017(runner, tmp_file): result = runner.invoke(djlint, [tmp_file.name]) assert result.exit_code == 0 assert "W017 1:" in result.output + + +def test_check(runner, tmp_file): + write_to_file(tmp_file.name, b"
    ") + result = runner.invoke(djlint, [tmp_file.name], "--check") + assert result.exit_code == 0 + assert "Linting 1 file!" in result.output + assert "Linted 1 file, found 0 errors" in result.output + + +def test_check_non_existing_file(runner, tmp_file): + result = runner.invoke(djlint, "tests/nothing.html", "--check") + assert result.exit_code == 2 + + +def test_check_non_existing_folder(runner, tmp_file): + result = runner.invoke(djlint, "tests/nothing", "--check") + assert result.exit_code == 2 + + +def test_check_django_ledger(runner, tmp_file): + # source from https://github.com/arrobalytics/django-ledger + result = runner.invoke(djlint, "tests/django_ledger", "--check") + assert result.exit_code == 0 + # assert "Linting 120 files!" in result.output + # assert "0 files were updated." in result.output diff --git a/tox.ini b/tox.ini index 21f956f..e9246e9 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ envlist = skip_missing_interpreters = True isolated_build = True + [testenv:isort] deps = isort commands = isort src/djlint @@ -40,11 +41,13 @@ deps = pylint mypy types-PyYAML + check-manifest commands = flake8 src/djlint black --fast --check src/djlint pylint src/djlint mypy src/djlint + ; check-manifest -v skip_install: true @@ -60,6 +63,7 @@ commands = depends = test: clean cov: test +skip_install: true [testenv:cov] skip_install: true