edit page styles
This commit is contained in:
@@ -13,7 +13,10 @@
|
||||
<div class="article-wrapper">
|
||||
|
||||
<article class="main-article">
|
||||
<h1>{{ article.current_revision.title }}</h1>
|
||||
{% if selected_tab != "edit" %}
|
||||
<h1>{{ article.current_revision.title }}</h1>
|
||||
{% endif %}
|
||||
|
||||
{% block wiki_contents_tab %}
|
||||
{% wiki_render article %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
{% include "course_navigation.html" with active_page_context="wiki" %}
|
||||
{% endif %}
|
||||
|
||||
<section class="container wiki">
|
||||
<section class="container wiki {{ selected_tab }}">
|
||||
|
||||
{% block wiki_body %}
|
||||
|
||||
|
||||
45
lms/templates/wiki/edit.html
Normal file
45
lms/templates/wiki/edit.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends "wiki/article.html" %}
|
||||
{% load wiki_tags i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block pagetitle %}{% trans "Edit" %}: {{ article.current_revision.title }}{% endblock %}
|
||||
|
||||
{% block wiki_contents_tab %}
|
||||
|
||||
<form method="POST" class="form-horizontal" id="article_edit_form" enctype="multipart/form-data">
|
||||
{% include "wiki/includes/editor.html" %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" name="preview" value="1" class="btn btn-large" onclick="$('#previewModal').modal('show'); this.form.target = 'previewWindow'; this.form.action = '{% url 'wiki:preview' path=urlpath.path article_id=article.id %}';">
|
||||
<span class="icon-eye-open"></span>
|
||||
{% trans "Preview" %}
|
||||
</button>
|
||||
<button type="submit" name="save" value="1" class="btn btn-large btn-primary" onclick="this.form.target=''; this.form.action='{% url 'wiki:edit' path=urlpath.path article_id=article.id %}'">
|
||||
<span class="icon-ok"></span>
|
||||
{% trans "Save changes" %}
|
||||
</button>
|
||||
|
||||
<a href="{% url 'wiki:delete' path=urlpath.path article_id=article.id %}" class="pull-right btn btn-danger">
|
||||
<span class="icon-trash"></span>
|
||||
{% trans "Delete article" %}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="modal hide fade" id="previewModal">
|
||||
<div class="modal-body">
|
||||
<iframe name="previewWindow" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn btn-large" data-dismiss="modal">
|
||||
<span class="icon-circle-arrow-left"></span>
|
||||
{% trans "Back to editor" %}
|
||||
</a>
|
||||
<button type="submit" name="save" value="1" class="btn btn-large btn-primary" onclick="this.form.target=''; this.form.action='{% url 'wiki:edit' path=urlpath.path article_id=article.id %}'">
|
||||
<span class="icon-ok"></span>
|
||||
{% trans "Save changes" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
42
lms/templates/wiki/includes/editor.html
Normal file
42
lms/templates/wiki/includes/editor.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% load wiki_tags i18n %}
|
||||
{% include "wiki/includes/editormedia.html" %}
|
||||
|
||||
<div>
|
||||
{% wiki_form edit_form %}
|
||||
<script language="javascript">
|
||||
$(document).ready(function() {
|
||||
$("#id_revision").val('{{ article.current_revision.id }}');
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div >
|
||||
{% for plugin in sidebar %}
|
||||
|
||||
<div class="accordion" id="accordion_{{ plugin.slug }}">
|
||||
|
||||
<div class="accordion-group">
|
||||
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" href="#collapse_{{ plugin.slug }}" data-toggle="collapse">
|
||||
<h2>{{ plugin.sidebar.headline }} <span class="{{ plugin.sidebar.icon_class }}"></span></h2>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="collapse_{{ plugin.slug }}" class="accordion-body collapse{% if form_images.errors %} in{% endif %}">
|
||||
<div class="accordion-inner form-vertical">
|
||||
{% if plugin.sidebar.template %}
|
||||
{% with form_images as form and plugin as plugin %}
|
||||
{% include plugin.sidebar.template %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,26 +4,28 @@
|
||||
<head>
|
||||
{% compressed_css 'course' %}
|
||||
</head>
|
||||
<body>
|
||||
<section class="content-wrapper">
|
||||
{% if revision %}
|
||||
<div class="alert alert-info">
|
||||
<strong>{% trans "Previewing revision" %}:</strong> {{ revision.created }} (#{{ revision.revision_number }}) by {% if revision.user %}{{ revision.user }}{% else %}{% if user|is_moderator %}{{ revision.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<body class="modal-preview">
|
||||
<section class="container wiki view">
|
||||
<div class="main-article">
|
||||
{% if revision %}
|
||||
<div class="alert alert-info">
|
||||
<strong>{% trans "Previewing revision" %}:</strong> {{ revision.created }} (#{{ revision.revision_number }}) by {% if revision.user %}{{ revision.user }}{% else %}{% if user|is_moderator %}{{ revision.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if merge %}
|
||||
<div class="alert alert-info">
|
||||
<strong>{% trans "Previewing merge between" %}:</strong>
|
||||
{{ merge1.created }} (#{{ merge1.revision_number }}) by {% if merge1.user %}{{ merge1.user }}{% else %}{% if user|is_moderator %}{{ merge1.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %}
|
||||
<strong>{% trans "and" %}</strong>
|
||||
{{ merge1.created }} (#{{ merge1.revision_number }}) by {% if merge1.user %}{{ merge1.user }}{% else %}{% if user|is_moderator %}{{ merge1.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if merge %}
|
||||
<div class="alert alert-info">
|
||||
<strong>{% trans "Previewing merge between" %}:</strong>
|
||||
{{ merge1.created }} (#{{ merge1.revision_number }}) by {% if merge1.user %}{{ merge1.user }}{% else %}{% if user|is_moderator %}{{ merge1.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %}
|
||||
<strong>{% trans "and" %}</strong>
|
||||
{{ merge1.created }} (#{{ merge1.revision_number }}) by {% if merge1.user %}{{ merge1.user }}{% else %}{% if user|is_moderator %}{{ merge1.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h1 class="page-header">{{ title }}</h1>
|
||||
<h1 class="page-header">{{ title }}</h1>
|
||||
|
||||
{% wiki_render article content %}
|
||||
{% wiki_render article content %}
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user