Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Rewrite and expand the contribution related pages

Roland Geider4bd11a4f85c4
diff --git a/wger/manager/static/css/bootstrap-custom.css b/wger/manager/static/css/bootstrap-custom.css
index 9e4c380e2..44462ce4d 100644
--- a/wger/manager/static/css/bootstrap-custom.css
+++ b/wger/manager/static/css/bootstrap-custom.css
@@ -25,3 +25,10 @@
font-weight: bold;
}
+/*
+ * Links within boostrap's alert boxes are rendered in black
+ */
+.alert a{
+ color: black;
+ text-decoration: underline;
+}
diff --git a/wger/manager/templates/misc/contact.html b/wger/manager/templates/misc/contact.html
new file mode 100644
index 000000000..4aba3317c
--- /dev/null
+++ b/wger/manager/templates/misc/contact.html
@@ -0,0 +1,61 @@
+{% extends "base_wide.html" %}
+{% load i18n %}
+{% load manager_extras %}
+
+{% block title%}{% trans "Get in touch" %}{% endblock %}
+
+
+{% block content %}
+<div class="ym-grid linearize-level-1">
+ <div class="ym-g66 ym-gl">
+ <div class="ym-gbox-left">
+
+<p>{% blocktrans %}Thank you for your interest. Feel free to use any of the
+ways below to send feedback you have about any aspect of the site. For
+support, it's better to use the mailing list
+(<a href="mailto:[email protected]">[email protected]</a>), to report
+a bug, consider doing it through the <a href="{{issues}}">issue tracker</a>
+.{% endblocktrans %}</p>
+
+ </div>
+ </div>
+ <div class="ym-g33 ym-gl">
+ <div class="ym-gbox-left alert alert-block alert-info">
+ {% blocktrans %}If you want to further help and improve this project,
+you might also be interested <a href="{{contribute}}">in contributing</a>.{% endblocktrans %}
+ </div>
+ </div>
+</div>
+
+<div class="ym-grid linearize-level-1">
+ <div class="ym-g33 ym-gl">
+ <div class="ym-gbox-left">
+
+ <h3>{% trans "Feedback form" %}</h3>
+ <p>{% blocktrans %}A simple contact form. Remember that
+if you want an answer, you need to include some way to contact you.{% endblocktrans %}</p>
+ <p><a class="modal-dialog btn" href="{{feedback}}">{% trans "Open feedback form" %}</a></p>
+ </div>
+ </div>
+ <div class="ym-g33 ym-gl">
+ <div class="ym-gbox-left">
+
+ <h3>{% trans "Twitter" %}</h3>
+ <p>{% blocktrans %}We are also on twitter. Write us and tell us what
+you think! Except patches, don't send patches via twitter.{% endblocktrans %}</p>
+ <p><a href="https://twitter.com/intent/tweet?screen_name=wger_de"
+ class="btn twitter-mention-button">{% trans "tweet to @wger_de" %}</a></p>
+ </div>
+ </div>
+ <div class="ym-g33 ym-gl">
+ <div class="ym-gbox-left">
+ <h3>{% trans "Forum / Mailing list" %}</h3>
+ <p>{% blocktrans %}Use the public group to get support for your
+local wger installation, discuss issues or your new idea, etc. {% endblocktrans %}</p>
+ <p><a href="https://groups.google.com/group/wger" class="btn">{% trans "Go to mailing list" %}</a></p>
+ </div>
+ </div>
+</div>
+
+{% endblock %}
+
diff --git a/wger/manager/templates/template.html b/wger/manager/templates/template.html
index 0321d337a..5f0a90c1a 100644
--- a/wger/manager/templates/template.html
+++ b/wger/manager/templates/template.html
@@ -154,9 +154,10 @@
<ul class="dropdown-menu">
<li><a href="{% url 'software:features' %}">{% trans "Features" %}</a></li>
<li><a href="{% url 'software:contribute' %}">{% trans "Contribute!" %} </a></li>
+ <li><a href="{% url 'contact' %}">{% trans "Get in touch" %}</a></li>
<li class="divider"></li>
<li class="nav-header">{% trans "Developers" %}</li>
- <li><a href="{% url 'software:issues' %}">{% trans "Report problem" %} </a></li>
+ <li><a href="{% url 'software:issues' %}">{% trans "Problems and wishes" %} </a></li>
<li><a href="{% url 'software:code' %}">{% trans "Get the code" %} </a></li>
<li><a href="{% url 'software:license' %}">{% trans "License" %} </a></li>
<li><a href="{% url 'software:changelog' %}">{% trans "Changelog" %} </a></li>
@@ -268,10 +269,9 @@
<!--
– {% trans "Layout based on <a href='http://www.yaml.de'>YAML</a>" %}
-->
- | <a href="{% url 'software:contribute' %}">{% trans "Contribute!" %}</a>
| <a href="{% url 'about' %}">{% trans "About" %}</a>
- | <a href="{% url 'feedback' %}">{% trans "Feedback" %}</a>
-
+ | <a href="{% url 'software:contribute' %}">{% trans "Contribute!" %}</a>
+ | <a href="{% url 'contact' %}">{% trans "Get in touch" %}</a>
</div>
</div>
<div class="ym-g10 ym-gr align-right">
diff --git a/wger/manager/urls.py b/wger/manager/urls.py
index f12c6dd2b..be1190808 100644
--- a/wger/manager/urls.py
+++ b/wger/manager/urls.py
@@ -98,6 +98,9 @@ urlpatterns = patterns('wger.manager.views',
url(r'^about$',
TemplateView.as_view(template_name="misc/about.html"),
name='about'),
+ url(r'^contact$',
+ misc.ContactClassView.as_view(template_name="misc/contact.html"),
+ name='contact'),
url(r'^feedback$',
misc.FeedbackClass.as_view(),
name='feedback'),
diff --git a/wger/manager/views/misc.py b/wger/manager/views/misc.py
index fd45ea16c..d615df713 100644
--- a/wger/manager/views/misc.py
+++ b/wger/manager/views/misc.py
@@ -26,6 +26,7 @@ from django.core.urlresolvers import reverse_lazy
from django.core import mail
from django.utils.translation import ugettext as _
from django.views.generic.edit import FormView
+from django.views.generic import TemplateView
from django.contrib import messages
from django.contrib.auth.decorators import login_required
@@ -112,6 +113,15 @@ def dashboard(request):
context_instance=RequestContext(request))
+class ContactClassView(TemplateView):
+ def get_context_data(self, **kwargs):
+ context = super(ContactClassView, self).get_context_data(**kwargs)
+ context.update({'contribute': reverse('software:contribute'),
+ 'issues': reverse('software:issues'),
+ 'feedback': reverse('feedback')})
+ return context
+
+
class FeedbackClass(FormView):
template_name = 'form.html'
success_url = reverse_lazy('feedback')
diff --git a/wger/software/templates/code.html b/wger/software/templates/code.html
index 9e91ab7f3..aca6f132a 100644
--- a/wger/software/templates/code.html
+++ b/wger/software/templates/code.html
@@ -7,48 +7,27 @@
{% block title %}{% trans "Get the code" %}{% endblock %}
{% block content %}
-<h3>{% trans "Stable version" %}</h3>
+
+<h3>{% trans "Installing the stable version" %}</h3>
+
<p>{% blocktrans %}Click here to download the last stable version. For
installation instructions see below.{% endblocktrans %}</p>
+<p>
+<a class="btn btn-primary"
+ href="https://pypi.python.org/packages/source/w/wger/wger-1.1.1.tar.gz">
+ {% trans "download stable version:" %} 1.1.1</a>
+</p>
+
+<!--
<div class="box success" style="text-align: center;">
-<p><strong><a href="https://bitbucket.org/rolandgeider/workout_manager/get/1.1.1.zip">1.1.1</a></strong></p>
+<p><strong><a href="https://pypi.python.org/packages/source/w/wger/wger-1.1.1.tar.gz">1.1.1</a></strong></p>
</div>
-
-<h3>{% trans "Development version" %}</h3>
-
-<p>{% blocktrans %}Get the development version if you want to contribute to the project,
-or simply want the latest of the latest. I probably don't need to tell you that this
-version will have more bugs and should not be used to keep important data,
-right?.{% endblocktrans %}</p>
-
-<p>{% blocktrans %}There are two repositories you can clone:{% endblocktrans %}</p>
-<ul>
- <li>
- <strong><a href="https://bitbucket.org/rolandgeider/workout_manager">bitbucker (HG)</a></strong>,
- {% trans "the main repository. All work happens here." %}<br>
- <code>hg clone https://bitbucket.org/rolandgeider/workout_manager</code>
- </li>
- <li style="padding-top: 1em;">
- <strong><a href="https://github.com/rolandgeider/workout_manager">github (GIT)</a></strong>,
- {% trans "a mirror of the main repo." %}<br>
- <code>git clone https://github.com/rolandgeider/workout_manager.git</code>
- </li>
-</ul>
-
-<p>{% trans "Pull requests are welcome :)" %}</p>
-
-
-<h2>{% trans "Installation" %}</h2>
-
-<p>{% blocktrans %}This is a Django application, so refer for details to its
-<a href="https://docs.djangoproject.com/en/1.4/intro/install/">documentation page</a>
-if things don't go as expected.</p>{% endblocktrans %}
-
-<p>{% blocktrans %}In short, these are the steps to perform for an installation
-on a linux or OS X machine, with python already installed. If you are using e.g.
-Windows, take a look at the link above.{% endblocktrans %}</p>
+-->
+<p>{% blocktrans %}In short, these are the steps needed for an installation
+on a linux or OS X machine, with python already installed. If you want to develop,
+see the sections below.{% endblocktrans %}</p>
<p>{% blocktrans %}I personally like installing my development
files on a virtualenv, it helps keep the system more or less clean and are very
@@ -63,71 +42,164 @@ $ virtualenv python-django
$ source python-django/bin/activate
</code>
-<p>{% blocktrans %}Get the application from PyPI.{% endblocktrans %}</p>
+<p>{% blocktrans %}Get the application from PyPI, initialise and start it.{% endblocktrans %}</p>
<code>
$ pip install wger
-</code>
-
-
-<p>{% trans "Initialise and start the application." %}</p>
-
-<code>
$ wger
</code>
<p>{% blocktrans %}The script will, on first run, create a configuration
-file. For this it will ask you for your <a href="https://www.google.com/recaptcha">reCaptcha
-keys</a>. You can leave this blank or enter bogus data, but you won't be able
-to register new users or use the demo account. For the sitemap.xml file to be
-correctly generated, you need to set a correct domain name in the sites app. This
-is done via django's admin interface. A sqlite database will also be created
-with a standard superuser:{% endblocktrans %}</p>
+file and a SQLite database with a standard superuser:{% endblocktrans %}</p>
<ul>
<li><strong>{% trans "username:" %} admin</strong></li>
<li><strong>{% trans "password:" %} admin</strong></li>
</ul>
-<p>{% blocktrans %}You can later call wger again to simply start the application.{% endblocktrans %}</p>
+<p>{% blocktrans %}You can later simply call <code>wger</code> again to start
+the application.{% endblocktrans %}</p>
+
+<h4>{% trans "Notes" %}</h4>
+
+<ul>
+ <li>{% blocktrans %}Use <code>wger --help</code> to see available options{% endblocktrans %}</li>
+ <li>{% blocktrans %}You should edit the settings.py and enter your
+<a href="https://www.google.com/recaptcha">reCaptcha keys</a>. You can leave
+this blank or enter bogus data, but you won't be able e.g. to register new users
+or use the demo account.{% endblocktrans %}</li>
+ <li>{% blocktrans %}For the sitemap.xml file to be correctly generated,
+you need to set a correct domain name in the sites app (only needed for search
+engines). This is done via django's admin interface (/admin/){% endblocktrans %}</li>
+ <li>{% blocktrans %}This is a Django application, so refer for details to its
+<a href="https://docs.djangoproject.com/en/1.4/intro/install/">documentation page</a>
+if things don't go as expected.{% endblocktrans %}</li>
+
+</ul>
+
-<h3>{% trans "Manual installation" %}</h3>
-<p>{% blocktrans %}If you don't want to use the sqlite database that main.py creates
-or if you want to run this under another setup (e.g. under apache), you can
-install the individual component individually.{% endblocktrans %}</p>
-<p>{% blocktrans %}First, install all packages:{% endblocktrans %}</p>
+<h2>{% trans "Developer guide" %}</h2>
+
+
+<h3>{% trans "How to get the code" %}</h3>
+<p>{% blocktrans %}The code is hosted both on bitbucket and on github. If
+you are unfamiliar with mercurial or git, take a look at <a href="http://hginit.com/">HG
+init</a> or <a href="http://git-scm.com/book">Pro Git</a>. While I personally
+prefer hg over git, many other people don't. Both repositories are mantained
+in sync, so you should be able to work on either one.{% endblocktrans %}</p>
+
+<p>
+<a class="btn btn-primary" href="https://bitbucket.org/rolandgeider/workout_manager">bitbucket (HG) »</a>
+ {% trans "the main repository. All work happens here." %}<br>
+ <code>hg clone https://bitbucket.org/rolandgeider/workout_manager</code>
+</p>
+
+<p>
+<a class="btn btn-primary" href="https://github.com/rolandgeider/workout_manager">github (GIT) »</a>
+ {% trans "a mirror of the main repo." %}<br>
+ <code>git clone https://github.com/rolandgeider/workout_manager.git</code>
+</p>
+
+
+<p>{% blocktrans %}The file structure you get once you clone the repo should
+be self explaining:{% endblocktrans %}</p>
+
+<ul>
+ <li>{% blocktrans %}<strong>wger:</strong> the django project and its applications{% endblocktrans %}</li>
+ <li>{% blocktrans %}<strong>tests:</strong> the tests folder. This actually only
+imports the individial tests from each application and makes it easier to test
+all of them.{% endblocktrans %}</li>
+ <li>{% blocktrans %}<strong>extras:</strong> additional scrips, a benchmarking
+script with funkload and a simple tool to create a local settings.py
+file.{% endblocktrans %}</li>
+</ul>
+
+
+
+
+<h3>{% trans "How to get started" %}</h3>
+<p>{% blocktrans %}The installation procedure is very similar to the one
+described above. The notes and infos there also apply, so read that section
+too. First, install all packages:{% endblocktrans %}</p>
<code>
+$ sudo apt-get install python-virtualenv
+$ sudo apt-get install python-dev
+$ virtualenv python-django
+$ source python-django/bin/activate
$ pip install -r requirements.txt
</code>
-<p>{% blocktrans %}Copy the sample configuration file and change the settings there as appropriate.
-There is another configuration file, settings_global.py that contains other global
-settings. Setup any database <a href="https://docs.djangoproject.com/en/1.4/ref/databases/">that Django supports</a>,
-initialise the tables and create a super user.{% endblocktrans %}</p>
+<p>{% blocktrans %}Get the code and create a superuser:{% endblocktrans %}</p>
<code>
$ hg clone https://bitbucket.org/rolandgeider/workout_manager
$ cd workout_manager
-$ python extras/scripts/create_local_settings.py
-$ python manage.py syncdb
+$ python start.py
</code>
+<p>{% blocktrans %}That's it. You can either start the server again with
+<code>start.py</code> or do it the django way with
+<code>python manage.py runserver</code>.{% endblocktrans %}</p>
+
+
+<p>{% blocktrans %}If you pull updates and there were database changes, you
+can apply them with a simple <code>python manage.py migrate --all</code>.{% endblocktrans %}</p>
-<p>{% blocktrans %}Now you are ready to go, the application is installed and
-can be used. However, an application like this without data is not interesting,
-so you should load some initial data to populate the categories,
-etc.{% endblocktrans %}</p>
-<p>{% blocktrans %}For this, load these fixtures, <em>in this order</em>,
-as some dependend on each other (specially the languages). The ingrediens fixture
-can take some time to process, it contains more than 8000 entries.{% endblocktrans %}</p>
+
+<h3>{% trans "How to contribute code" %}</h3>
+<p>{% blocktrans %}For other ways of contributing besides code, you might
+want to take a look at <a href="{{contribute}}">the contribute page</a>{% endblocktrans %}</p>
+
+<ul>
+ <li>{% blocktrans %}<strong>Send pull requests:</strong> for new code
+you want to share, please send pull requests (either in bitbucket or in
+github). Sending patches by email or attaching them to an issue means a lot
+more of work.{% endblocktrans %}</li>
+
+ <li>{% blocktrans %}<strong>Run the tests:</strong> wger is proud to
+have a test coverage of over 90%. When you implement something new, don't forget
+to run the testsuite and write approriate tests for the new code. If you use
+github, configure the awesome <a href="http://travis-ci.org/">Travis CI</a>,
+there is already a .travis file in the sources.{% endblocktrans %}</li>
+
+ <li>{% blocktrans %}<strong>Code according to PEP8:</strong> check that
+the code is structured as per pep8 but with a maximum line lenght of 100.
+This can be checked automatically with the pep8 tool (pip install pep8) from
+the command line:
+<code>pep8 --max-line-length=100--exclude="urls.py,*migrations*" wger</code>
+{% endblocktrans %}</li>
+</ul>
+
+
+
+<h3>{% trans "Custom hosting" %}</h3>
+<p>{% blocktrans %}If you want to host this with some other evironment (apache,
+postgreSQL, etc.), you need to perform some steps manually. First, install
+the necessary packages and dependencies as described before.{% endblocktrans %}</p>
+
+<p>{% blocktrans %}Setup any database
+<a href="https://docs.djangoproject.com/en/1.4/ref/databases/">that Django
+supports</a>. Then create a settings file and edit it as needed. There is
+another configuration file, settings_global.py that contains other global
+settings.{% endblocktrans %}</p>
+
+<code>
+$ python extras/scripts/create_local_settings.py
+</code>
+
+<p>{% blocktrans %}Initialise the database, create a super user and load these
+fixtures:{% endblocktrans %}</p>
+
<code>
+$ python manage.py syncdb
+$ python manage.py migrate --all
$ python manage.py loaddata languages
$ python manage.py loaddata days_of_week
$ python manage.py loaddata muscles
@@ -136,20 +208,12 @@ $ python manage.py loaddata exercises
$ python manage.py loaddata ingredients
</code>
-<p>{% blocktrans %}Now, run the server:{% endblocktrans %}</p>
-
-<code>
-$ python manage.py runserver
-</code>
-
-<p>{% blocktrans %}You can now access the site with your browser:{% endblocktrans %}
-<code>http://localhost:8000/</code></p>
+<p>{% blocktrans %}What you do next depends on the server you use and how you
+want to serve the application (mod_wsgi, fastCGI). There is a sample <code>wsgi.py</code>
+file in the wger folder, edit it and adapt it to your needs and make the server
+serve it, e.g. per mod_wsgi. Consult in any case the
+<a href="https://docs.djangoproject.com/en/1.4/howto/deployment/">django
+documentation</a> on the topic.{% endblocktrans %}</p>
-<p>{% blocktrans %}If you want to run this in production, don't use django's builtin
-server, use apache, gunicorn or some other <em>real server</em>. Refer to
-<a href="https://docs.djangoproject.com/en/1.4/howto/deployment/">the deployment section</a>
-on django's documentation for details here. You will also have to take special
-care of the static files.{% endblocktrans %}</p>
{% endblock %}
-
diff --git a/wger/software/templates/contribute.html b/wger/software/templates/contribute.html
index 8355369ed..13d1cfffe 100644
--- a/wger/software/templates/contribute.html
+++ b/wger/software/templates/contribute.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "base_wide.html" %}
{% load staticfiles %}
{% load url from future %}
{% load i18n %}
@@ -7,19 +7,37 @@
{% block title %}{% trans "Contribute!" %}{% endblock %}
{% block content %}
-<p>{% blocktrans %}wger Workout Manager is build by volunteers,
+<div class="ym-grid linearize-level-1">
+<div class="ym-g50 ym-gl">
+ <div class="ym-gbox-left">
+ <p>{% blocktrans %}wger Workout Manager is build by volunteers,
the development process is open and freely accessible to anybody interested.
-Any kind of contribution is appreciated and welcome. {% endblocktrans %}</p>
+If you are new to the free software world, we recommend to take a
+look <a href="http://schlitt.info/opensource/blog/0541_10_golden_rules_for_starting_with_open_source.html">this
+article</a> which summarizes they way open source projects work very well. {% endblocktrans %}</p>
+
+
+ <p>{% blocktrans %}Any kind of contribution is appreciated and welcome.
+Use this opportunity and influence the direction of the
+project. {% endblocktrans %}</p>
+
+ </div>
+</div>
+<div class="ym-gl" style="width: 41%;">
+ <div class="ym-gbox-left ym-clearfix">
-<div class="box success">
-<p style="text-align:center;"><strong>{% blocktrans %}The goal is to build an awesome
+
+ <div class="box success">
+ <p style="text-align:center;"><strong>{% blocktrans %}The goal is to build an awesome
and flexible fitness manager, along with a comprehensive and complete list of exercises and
ingredients, all released under a free license.{% endblocktrans %}</strong></p>
+ </div>
+
+ </div>
</div>
+</div>
-<p>{% blocktrans %}Use this opportunity and influence the direction of the
-project. Here are some areas:{% endblocktrans %}</p>
<div class="ym-grid linearize-level-1">
@@ -28,13 +46,13 @@ project. Here are some areas:{% endblocktrans %}</p>
<h3>{% trans "Use the site" %}</h3>
</div>
</div>
- <div class="ym-g75 ym-gl">
+ <div class="ym-g66 ym-gl">
<div class="ym-gbox-left">
- <p>{% blocktrans %}Simply use the site (and tell your friends
- what you think of it). When you find something
- that doesn't work or could need some improvements, tell! This might
- not sound like much, but is incredibly important!{% endblocktrans %}</p>
- <a class="btn " href="{% url 'software:issues' %}">{% trans "Report problem" %} »</a>
+ <p>{% blocktrans %}Simply use the site and tell your friends
+how useful it is! ;) . When you find something that you specially liked,
+could need some improvements or just doesn't work, tell us! This might not sound
+like much, but is incredibly important!{% endblocktrans %}</p>
+<a class="btn " href="{% url 'contact' %}">{% trans "Get in touch" %} »</a>
</div>
@@ -48,13 +66,16 @@ project. Here are some areas:{% endblocktrans %}</p>
<h3>{% trans "Submit exercises" %}</h3>
</div>
</div>
- <div class="ym-g75 ym-gl">
+ <div class="ym-g66 ym-gl">
<div class="ym-gbox-left">
- <p>{% blocktrans %}Submit that exercise you absolutely love but
- is not in the list yet. Correct errors in the ones that are already
- in the list.{% endblocktrans %}</p>
-
- <a class="btn " href="{% url 'exercise-add' %}">{% trans "Add exercise" %} »</a>
+ <p>{% blocktrans %}Submit those cool exercises that you absolutely
+love but are not in the list yet. If you think some description or other detail
+could be improved, tell!{% endblocktrans %}</p>
+ {% if user.is_authenticated and not user.get_profile.is_temporary %}
+ <a class="btn " href="{% url 'exercise-add' %}">{% trans "Add exercise" %} »</a>
+ {% else %}
+ <a class="btn disabled" href="#">{% trans "Only registered users can do this" %} »</a>
+ {% endif %}
</div>
</div>
</div>
@@ -66,13 +87,13 @@ project. Here are some areas:{% endblocktrans %}</p>
<h3>{% trans "Translate" %}</h3>
</div>
</div>
- <div class="ym-g75 ym-gl">
+ <div class="ym-g66 ym-gl">
<div class="ym-gbox-left">
<p>{% blocktrans %}Do you want to use wger in your own language?
- Do you think the current translation could be improved?
- The translations are easily managed and edited online, if you are interested,
- go to the transifex site, request access and we will set everything
- up. {% endblocktrans %}</p>
+Do you think the current translation could be improved?
+The translations are easily managed and edited online, if you are interested,
+go to the transifex site, request access and we will set everything
+up. {% endblocktrans %}</p>
<a class="btn "
href="https://www.transifex.com/projects/p/wger-workout-manager/">{% trans "Translate with Transifex" %} »</a>
@@ -86,11 +107,12 @@ project. Here are some areas:{% endblocktrans %}</p>
<h3>{% trans "Code" %}</h3>
</div>
</div>
- <div class="ym-g75 ym-gl">
+ <div class="ym-g66 ym-gl">
<div class="ym-gbox-left">
<p>{% blocktrans %}Obviously, you are higly encouraged to clone the
- repo and start hacking! Once you are ready, send a pull request
- and we will show the world.{% endblocktrans %}</p>
+repo and start hacking! Once you are ready, send a pull request and we
+will show the world. Take a look at the developer guide for more details
+on this.{% endblocktrans %}</p>
<a class="btn" href="{% url 'software:code' %}">{% trans "Get the code" %} »</a>
</div>
diff --git a/wger/software/templates/issues.html b/wger/software/templates/issues.html
index 0ca66ca2b..f6d7311fa 100644
--- a/wger/software/templates/issues.html
+++ b/wger/software/templates/issues.html
@@ -6,6 +6,7 @@
{% block title %}{% trans "Reporting a problem" %}{% endblock %}
{% block content %}
+
<img src="{% static 'images/icons/bug.svg' %}"
width="48"
height="48"
@@ -18,18 +19,25 @@ Please describe in as much detail as you can what you were doing when the error
happened.
{% endblocktrans %}</p>
-<h3>{% trans "Enhancements" %}</h3>
-<p>{% blocktrans %}
-The issue tracker can also be used to document enhancements to the software, so
-if you have some suggestions, feel free to open a ticket, just set '<em>kind</em>'
-to '<em>enhancement</em>'.
-{% endblocktrans %}</p>
-<div class="box success">{% blocktrans %}If you found a problem or have a suggestion,
-please <a href="https://bitbucket.org/rolandgeider/workout_manager/issues">report it
-to the issue tracker</a> in bitbucket.
-{% endblocktrans %}
-</div>
+<p>
+<a class="btn btn-primary"
+ href="https://bitbucket.org/rolandgeider/workout_manager/issues">{% trans "report problem to the issue tracker" %} »</a>
+</p>
+
+
+<h2>{% trans "Enhancements" %}</h2>
+
+<p>{% blocktrans %}
+The issue tracker can also be used to document enhancements to the software.
+If you have some suggestions or think a feature is missing, feel
+free to open a ticket, just set '<em>kind</em>' to '<em>enhancement</em>'.
+This can be anything from a slight change to a whole new section of the site.
+Please keep in mind that not all wishes can be implemented.{% endblocktrans %}</p>
+<p>
+<a class="btn btn-primary"
+ href="https://bitbucket.org/rolandgeider/workout_manager/issues">{% trans "report wish to the issue tracker" %} »</a>
+</p>
{% endblock %}
diff --git a/wger/software/urls.py b/wger/software/urls.py
index 93efdc76f..4ec1410d2 100644
--- a/wger/software/urls.py
+++ b/wger/software/urls.py
@@ -17,6 +17,7 @@
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
+from wger.software.views import ContextTemplateView
urlpatterns = patterns('',
@@ -37,7 +38,7 @@ urlpatterns = patterns('',
name='license'),
url(r'^code$',
- TemplateView.as_view(template_name="code.html"),
+ ContextTemplateView.as_view(template_name="code.html"),
name='code'),
url(r'^contribute$',
diff --git a/wger/software/views.py b/wger/software/views.py
new file mode 100644
index 000000000..5600d175a
--- /dev/null
+++ b/wger/software/views.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+# This file is part of Workout Manager.
+#
+# Workout Manager is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Workout Manager is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+
+from django.views.generic import TemplateView
+from django.core.urlresolvers import reverse
+
+class ContextTemplateView(TemplateView):
+ '''
+ Overwrite TemplateView so we can use 'contribute' within a
+ blocktrans block.
+ '''
+ def get_context_data(self, **kwargs):
+ context = super(ContextTemplateView, self).get_context_data(**kwargs)
+ context.update({'contribute': reverse('software:contribute')})
+ return context