diff --git a/app/eve_api/templates/eve_api/add.html b/app/eve_api/templates/eve_api/add.html
index b40c693..6fe300e 100644
--- a/app/eve_api/templates/eve_api/add.html
+++ b/app/eve_api/templates/eve_api/add.html
@@ -1,24 +1,25 @@
{% extends "base.html" %}
-{% load gargoyle_tags %}
-
{% block title %}Add EVE API Key{% endblock %}
{% block content %}
+
-{% ifswitch eve-cak %}
Please fill in your API key details and a optional description. You can create a API key on the API support site
-{% else %}
-Please fill in your API key as provided on the EVE Online API page and a optional description.
-{% endifswitch %}
{% endblock %}
diff --git a/app/eve_api/templates/eve_api/alliance.html b/app/eve_api/templates/eve_api/alliance.html
index bff0fcf..319ad1c 100644
--- a/app/eve_api/templates/eve_api/alliance.html
+++ b/app/eve_api/templates/eve_api/alliance.html
@@ -4,30 +4,36 @@
{% load naturaltimediff %}
{% block content %}
-
-
{{ alliance.name }}
-
-
- - Member Count: {{ alliance.member_count }}
- - Executor Corporation: {{ alliance.executor }}
- - Alliance Leader: {{ executor }}
-
-
-
Corporations
-
-
-
-
-
-
-
- {% for corp in corporations %}
- | {{ corp }} | {{ corp.member_count }} | {{ corp.average_sp|intcomma }} | {{ corp.api_key_coverage|floatformat:2 }}% | {{ corp.director_api_keys.count }} |
- {% endfor %}
-
+
+
+
+
+ - Member Count: {{ alliance.member_count }}
+ - Executor Corporation: {{ alliance.executor }}
+ - Alliance Leader: {{ executor }}
+
+
+
+
Corporations
+
+
+
+
+
+
+ {% for corp in corporations %}
+ | {{ corp }} | {{ corp.member_count }} | {{ corp.average_sp|intcomma }} | {{ corp.api_key_coverage|floatformat:2 }}% | {{ corp.director_api_keys.count }} |
+ {% endfor %}
+
+
+
+
+
+
+
+
{% endblock %}
diff --git a/app/eve_api/templates/eve_api/character.html b/app/eve_api/templates/eve_api/character.html
index c66dc21..2a07bf5 100644
--- a/app/eve_api/templates/eve_api/character.html
+++ b/app/eve_api/templates/eve_api/character.html
@@ -9,64 +9,57 @@
-
-
Attributes
+
+
Attributes
-
- - Race: {{ character.get_race_display }}
- {% if character.gender %}- Gender: {{ character.get_gender_display }}
{% endif %}
- - Corporation: {{ character.corporation.name }}
- {% if character.corporation.alliance %}- Alliance: {{ character.corporation.alliance.name }}
{% endif %}
- - Joined Corporation: {{ character.corporation_date|date:"Y/m/d H:i:s" }}
- - Security Status: {{ character.security_status|floatformat:2 }}
- - Director: {{ character.director }}
- {% if character.current_training %}
- - Training: {{ character.current_training.skill.name}} to Level
- {% endif %}
-
+
+ - Race: {{ character.get_race_display }}
+ {% if character.gender %}- Gender: {{ character.get_gender_display }}
{% endif %}
+ - Corporation: {{ character.corporation.name }}
+ {% if character.corporation.alliance %}- Alliance: {{ character.corporation.alliance.name }}
{% endif %}
+ - Joined Corporation: {{ character.corporation_date|date:"Y/m/d H:i:s" }}
+ - Security Status: {{ character.security_status|floatformat:2 }}
+ - Director: {{ character.director }} {% if character.director %}(Create a corporation API key){% endif %}
+ {% if character.current_training %}
+ - Training: {{ character.current_training.skill.name}} to Level
+ {% endif %}
+
+ {% if character.attrib_intelligence %}
+
Stats
+
+
+ | Intelligence | {{ character.attrib_intelligence }} |
+ | Memory | {{ character.attrib_memory }} |
+ | Charisma | {{ character.attrib_charisma }} |
+ | Perception | {{ character.attrib_perception }} |
+ | Willpower | {{ character.attrib_willpower }} |
+
+
+ {% endif %}
+
- {% if character.attrib_intelligence %}
-
Stats
-
-
-
- | Stat | Value |
-
-
- | Intelligence | {{ character.attrib_intelligence }} |
- | Memory | {{ character.attrib_memory }} |
- | Charisma | {{ character.attrib_charisma }} |
- | Perception | {{ character.attrib_perception }} |
- | Willpower | {{ character.attrib_willpower }} |
-
-
+
+
+

+
+
+
+ {% if character.corporation.alliance %}
+

{% endif %}
-
-
-
-
-
-

-
-
-
- {% if character.corporation.alliance %}
-

- {% endif %}
-

-
-
+

+
+
-
{% if skillTree %}
Skills
- Open All
- Collapse All
+ Open All
+ Collapse All
@@ -88,38 +81,34 @@
{% if employmenthistory.count %}
Employment History
-
-
- | Corporation | Join Date | Leave Date |
-
-
- {% for hist in employmenthistory %}
- | {{ hist.corporation.name }} | {{ hist.start_date }} | {% if hist.end_date %}{{ hist.end_date }}{% endif %} |
- {% endfor %}
-
+
+
+ | Corporation | Join Date | Leave Date |
+
+
+ {% for hist in employmenthistory %}
+ | {{ hist.corporation.name }} | {{ hist.start_date }} | {% if hist.end_date %}{{ hist.end_date }}{% endif %} |
+ {% endfor %}
+
{% endif %}
-
-
{% endblock %}
diff --git a/app/eve_api/templates/eve_api/character_list.html b/app/eve_api/templates/eve_api/character_list.html
index 87936b4..d4e6e3d 100644
--- a/app/eve_api/templates/eve_api/character_list.html
+++ b/app/eve_api/templates/eve_api/character_list.html
@@ -2,13 +2,6 @@
{% load humanize %}
{% block content %}
-
-
-
@@ -41,6 +34,11 @@
You have no API keys linked to your auth account.
{% endif %}
-
+
+
{% endblock %}
diff --git a/app/eve_api/templates/eve_api/corporation.html b/app/eve_api/templates/eve_api/corporation.html
index 7366995..1fed768 100644
--- a/app/eve_api/templates/eve_api/corporation.html
+++ b/app/eve_api/templates/eve_api/corporation.html
@@ -6,32 +6,40 @@
{% block content %}
-
-
{{ corporation.name }}
+
-
- - Member Count: {{ corporation.member_count }}
- - Known Members: {{ corporation.eveplayercharacter_set.count }}
- {% if view_members %}
- - Full Director API Available: {% if corporation.director_api_keys %}Yes{% else %}No{% endif %}
- - Members with API Keys: {{ corporation.api_keys }}
- - Members with Active API Keys: {{ corporation.active_api_keys }}
- - API Coverage: {{ corporation.api_key_coverage|floatformat:2 }}%
- {% endif %}
-
+
+
+ - Member Count: {{ corporation.member_count }}
+ - Known Members: {{ corporation.eveplayercharacter_set.count }}
+ {% if view_members %}
+ - Full Director API Available: {% if corporation.director_api_keys %}Yes{% else %}No{% endif %}
+ - Members with API Keys: {{ corporation.api_keys }}
+ - Members with Active API Keys: {{ corporation.active_api_keys }}
+ - API Coverage: {{ corporation.api_key_coverage|floatformat:2 }}%
+ {% endif %}
+
+
- {% if view_members %}
-
- | Name | Skillpoints | Join Date | Director? | Roles? | API Key? | Key Active? |
- {% autopaginate members 20 %}
- {% for char in members %}
- | {{ char.name }} | {% if char.total_sp %}{{ char.total_sp|intcomma }} SP{% endif %} | {{ char.corporation_date }} | {% if char.director %}Yes{% endif %} | {% if char.eveaccount_set.count %}{% if char.roles.count %}Yes{% else %}No{% endif %}{% endif %} | {% if char.eveaccount_set.count %}Yes{% else %}No{% endif %} | {% if char.active_key %}Yes{% else %}No{% endif %} |
- {% endfor %}
-
- {% paginate %}
+{% if view_members %}
+{% autopaginate members 25 %}
+
+
+ | Name | Skillpoints | Join Date | Director? | Roles? | API Key? | Key Active? |
+
+
+ {% for char in members %}
+ | {{ char.name }} | {% if char.total_sp %}{{ char.total_sp|intcomma }} SP{% endif %} | {{ char.corporation_date }} | {% if char.director %}Yes{% endif %} | {% if char.eveaccount_set.count %}{% if char.roles.count %}Yes{% else %}No{% endif %}{% endif %} | {% if char.eveaccount_set.count %}Yes{% else %}No{% endif %} | {% if char.active_key %}Yes{% else %}No{% endif %} |
+ {% endfor %}
+
+
-
Export as CSV
- {% endif %}
+
{% paginate %}
+
+
Export as CSV
+{% endif %}
diff --git a/app/eve_api/templates/eve_api/formfield.html b/app/eve_api/templates/eve_api/formfield.html
new file mode 100644
index 0000000..1f664a9
--- /dev/null
+++ b/app/eve_api/templates/eve_api/formfield.html
@@ -0,0 +1,12 @@
+{% load add_class %}
+
+
+ {{ field.label_tag }}
+
+ {% if class %}{{ field|add_class:class }}{% else %}{{ field }}{% endif %}
+ {% if field.help_text %}
+ {{ field.help_text }}
+ {% endif %}
+
+
+
diff --git a/app/eve_api/templates/eve_api/update.html b/app/eve_api/templates/eve_api/update.html
index 5622e9b..f2c8801 100644
--- a/app/eve_api/templates/eve_api/update.html
+++ b/app/eve_api/templates/eve_api/update.html
@@ -3,17 +3,22 @@
{% block title %}Update EVE API Key{% endblock %}
{% block content %}
-Please update your API key as provided on the EVE Online API
-page and a optional description.
+
+
+Please update your API key as provided on the EVE Online API page and a optional description.
{% endblock %}
diff --git a/app/eve_api/templatetags/add_class.py b/app/eve_api/templatetags/add_class.py
new file mode 100644
index 0000000..dae3d13
--- /dev/null
+++ b/app/eve_api/templatetags/add_class.py
@@ -0,0 +1,21 @@
+import re
+from django.utils.safestring import mark_safe
+from django import template
+register = template.Library()
+
+class_re = re.compile(r'(?<=class=["\'])(.*)(?=["\'])')
+@register.filter
+def add_class(value, css_class):
+ string = unicode(value)
+ match = class_re.search(string)
+ if match:
+ m = re.search(r'^%s$|^%s\s|\s%s\s|\s%s$' % (css_class, css_class,
+ css_class, css_class),
+ match.group(1))
+ print match.group(1)
+ if not m:
+ return mark_safe(class_re.sub(match.group(1) + " " + css_class,
+ string))
+ else:
+ return mark_safe(string.replace('>', ' class="%s">' % css_class))
+ return value