Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flyers
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chris
flyers
Commits
d7827927
Commit
d7827927
authored
Jul 20, 2014
by
chris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable translations
parent
38385596
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
22 deletions
+24
-22
flyers/content/templates/base.html
flyers/content/templates/base.html
+12
-15
flyers/content/templates/content/page_detail.html
flyers/content/templates/content/page_detail.html
+3
-1
flyers/general/context_processors.py
flyers/general/context_processors.py
+6
-4
flyers/settings.py
flyers/settings.py
+2
-2
flyers/urls.py
flyers/urls.py
+1
-0
No files found.
flyers/content/templates/base.html
View file @
d7827927
...
...
@@ -38,7 +38,7 @@
{% if object.title != 'Welcome' %}
<div
id=
"footer"
>
<div
class=
"pagewrap"
style=
"padding: 10px; text-align: center;"
><a
href=
"{{ settings.site_address }}"
>
{{ settings.site_name }}
</a>
website uses
<a
href=
"http://www.tobald.eu.org/projects/flyers/"
>
Flyers
</a></div></div>
<div
class=
"pagewrap"
style=
"padding: 10px; text-align: center;"
><a
href=
"{{ settings.site_address }}"
>
{{ settings.site_name }}
</a>
website uses
<a
href=
"http://www.tobald.eu.org/projects/flyers/"
>
Flyers
</a>
.
</div></div>
</div>
{% endif %}
</div>
...
...
@@ -54,22 +54,19 @@
</div>
</div>
{% if
SITE_MULTILINGUAL
%}
{% if
site_multilingual
%}
<div
id=
"languageselect"
>
<form
action=
"/i18n/setlang/"
method=
"post"
name=
"langForm"
class=
"langForm"
>
<form
action=
"{% url 'set_language' %}"
method=
"post"
name=
"langForm"
class=
"langForm"
>
{% csrf_token %}
<input
name=
"next"
type=
"hidden"
value=
"/{{ page.slug }}/"
/>
<select
name=
"language"
onChange=
"langForm.submit();"
>
{% for lang in LANGUAGES %}
{% ifequal lang.0 LANGUAGE_CODE %}
<option
value=
"#"
/>
{{ lang.1 }}
</option>
{% endifequal %}
{% endfor %}
{% for lang in LANGUAGES %}
{% ifnotequal lang.0 LANGUAGE_CODE %}
<option
value=
"{{ lang.0 }}"
/>
{{ lang.1 }}
</option>
{% endifnotequal %}
{% endfor %}
<input
name=
"next"
type=
"hidden"
value=
"{{ redirect_to }}"
/>
<select
name=
"language"
onChange=
"langForm.submit();"
>
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option
value=
"{{ language.code }}"
{%
if
language.code =
=
LANGUAGE_CODE
%}
selected=
"selected"
{%
endif
%}
>
{{ language.name_local }}
</option>
{% endfor %}
</select>
</form>
</div>
...
...
flyers/content/templates/content/page_detail.html
View file @
d7827927
...
...
@@ -4,7 +4,7 @@
{% block title %} - {{ object.title }}{% endblock %}
{% block content %}
{% if object.t
ext or object.page_set.all|length > 0
%}
{% if object.t
itle != 'Welcome'
%}
<div
class=
"pagewrap"
>
<div
class=
"page"
>
<div
class=
"pagelinks"
>
...
...
@@ -16,7 +16,9 @@
{% if object.file_set.all %}
<a
href=
"#file"
>
Files
</a>
{% endif %}
</div>
<div
class=
"pagetitle"
>
{{ object.title }}
</div>
{% if object.text %}
<div
class=
"pagetext"
>
{{ object.text|safe|urlize|linebreaks }}
</div>
{% endif %}
</div>
...
...
flyers/general/context_processors.py
View file @
d7827927
from
django.conf
import
settings
from
.models
import
Settings
def
settings
(
request
):
def
general
(
request
):
try
:
s
ettings
=
Settings
.
objects
.
get
(
pk
=
1
)
s
=
Settings
.
objects
.
get
(
pk
=
1
)
except
:
settings
=
None
return
{
'settings'
:
settings
}
s
=
None
return
{
'settings'
:
s
,
'site_multilingual'
:
settings
.
SITE_MULTILINGUAL
}
flyers/settings.py
View file @
d7827927
...
...
@@ -48,6 +48,7 @@ MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.middleware.locale.LocaleMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
'django.middleware.clickjacking.XFrameOptionsMiddleware'
,
)
...
...
@@ -93,7 +94,7 @@ CKEDITOR_UPLOAD_PATH = os.path.join(BASE_DIR, 'media', 'uploads')
from
django.conf
import
global_settings
TEMPLATE_CONTEXT_PROCESSORS
=
global_settings
.
TEMPLATE_CONTEXT_PROCESSORS
+
(
'flyers.content.context_processors.menu'
,
'flyers.general.context_processors.
settings
'
,
'flyers.general.context_processors.
general
'
,
)
...
...
@@ -114,4 +115,3 @@ try:
from
local_settings
import
*
except
ImportError
,
e
:
pass
flyers/urls.py
View file @
d7827927
...
...
@@ -23,6 +23,7 @@ urlpatterns = patterns('',
#url(r'^ckeditor/', include('ckeditor.urls')),
url
(
r'^ckeditor/'
,
include
(
'flyers.urls_ckeditor'
)),
#url(r'^$', TemplateView.as_view(template_name='homepage.html')),
(
r'^i18n/'
,
include
(
'django.conf.urls.i18n'
)),
url
(
r'^$'
,
HomepageDetail
.
as_view
()),
url
(
r'^(?P<slug>.+)/$'
,
DetailView
.
as_view
(
model
=
Page
)),
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment