diff --git a/services/views.py b/services/views.py index 25dcfa97..5fdd3388 100755 --- a/services/views.py +++ b/services/views.py @@ -419,12 +419,18 @@ def activate_teamspeak3(request): logger.debug("activate_teamspeak3 called by user %s" % request.user) authinfo = AuthServicesInfoManager.get_auth_service_info(request.user) character = EveManager.get_character_by_id(authinfo.main_char_id) + ticker = character.corporation_ticker + if check_if_user_has_permission(request.user, "blue_member"): logger.debug("Adding TS3 user for blue user %s with main character %s" % (request.user, character)) - result = Teamspeak3Manager.add_blue_user(character.character_name, character.corporation_ticker) + # Blue members should have alliance ticker (if in alliance) + if EveAllianceInfo.objects.filter(alliance_id=character.alliance_id).exists(): + alliance = EveAllianceInfo.objects.filter(alliance_id=character.alliance_id)[0] + ticker = alliance.alliance_ticker + result = Teamspeak3Manager.add_blue_user(character.character_name, ticker) else: logger.debug("Adding TS3 user for user %s with main character %s" % (request.user, character)) - result = Teamspeak3Manager.add_user(character.character_name, character.corporation_ticker) + result = Teamspeak3Manager.add_user(character.character_name, ticker) # if its empty we failed if result[0] is not "": diff --git a/stock/templates/registered/timermanagement.html b/stock/templates/registered/timermanagement.html index ad029379..eeddad7c 100755 --- a/stock/templates/registered/timermanagement.html +++ b/stock/templates/registered/timermanagement.html @@ -24,107 +24,6 @@ {% trans "Current Eve Time:" %}
-{% trans "Details" %} | -{% trans "Objective" %} | -{% trans "System" %} | -{% trans "Structure" %} | -{% trans "Eve Time" %} | -{% trans "Local Time" %} | -{% trans "Creator" %} | - {% if perms.auth.timer_management %} -{% trans "Action" %} | - {% endif %} -
---|---|---|---|---|---|---|---|
{{ closest_timer.details }} | -
- {% ifequal closest_timer.objective "Hostile" %}
-
- {% trans "Hostile" %}
-
- {% endifequal %}
- {% ifequal closest_timer.objective "Friendly" %}
-
- {% trans "Friendly" %}
-
- {% endifequal %}
- {% ifequal closest_timer.objective "Neutral" %}
-
- {% trans "Neutral" %}
-
- {% endifequal %}
- |
- {{ closest_timer.system }} {{ closest_timer.planet_moon }} - | -
- {% ifequal closest_timer.structure "I-HUB" %}
-
- I-HUB
-
- {% endifequal %}
- {% ifequal closest_timer.structure "POCO" %}
-
- POCO
-
- {% endifequal %}
- {% ifequal closest_timer.structure "POS[S]" %}
-
- POS [S]
-
- {% endifequal %}
- {% ifequal closest_timer.structure "POS[M]" %}
-
- POS [M]
-
- {% endifequal %}
- {% ifequal closest_timer.structure "POS[L]" %}
-
- POS [L]
-
- {% endifequal %}
- {% ifequal closest_timer.structure "Station" %}
-
- Station
-
- {% endifequal %}
- {% ifequal closest_timer.structure "TCU" %}
-
- TCU
-
- {% endifequal %}
- {% ifequal closest_timer.structure "Other" %}
-
- Other
-
- {% endifequal %}
- |
- {{ closest_timer.eve_time | date:"Y-m-d H:i" }} | -- | {{ closest_timer.eve_character.character_name }} | - {% if perms.auth.timer_management %} -- - - - - - - | - {% endif %} - {% endif %} -
{% trans "Details" %} | @@ -242,75 +141,174 @@{% trans "Action" %} | {% endif %}||||||
---|---|---|---|---|---|---|---|
{{ timer.details }} |
- {% ifequal timer.objective "Hostile" %}
-
- {% trans "Hostile" %}
-
- {% endifequal %}
- {% ifequal timer.objective "Friendly" %}
-
- {% trans "Friendly" %}
-
- {% endifequal %}
- {% ifequal timer.objective "Neutral" %}
-
- {% trans "Neutral" %}
-
- {% endifequal %}
+ {% ifequal timer.objective "Hostile" %}
+
+ {% trans "Hostile" %}
+
+ {% endifequal %}
+ {% ifequal timer.objective "Friendly" %}
+
+ {% trans "Friendly" %}
+
+ {% endifequal %}
+ {% ifequal timer.objective "Neutral" %}
+
+ {% trans "Neutral" %}
+
+ {% endifequal %}
|
{{ timer.system }} {{ timer.planet_moon }} |
- {% ifequal timer.structure "I-HUB" %}
-
- I-HUB
-
- {% endifequal %}
- {% ifequal timer.structure "POCO" %}
-
- POCO
-
- {% endifequal %}
- {% ifequal timer.structure "POS[S]" %}
-
- POS [S]
-
- {% endifequal %}
- {% ifequal timer.structure "POS[M]" %}
-
- POS [M]
-
- {% endifequal %}
- {% ifequal timer.structure "POS[L]" %}
-
- POS [L]
-
- {% endifequal %}
- {% ifequal timer.structure "Station" %}
-
- Station
-
- {% endifequal %}
- {% ifequal timer.structure "TCU" %}
-
- TCU
-
- {% endifequal %}
- {% ifequal timer.structure "Other" %}
-
- Other
-
- {% endifequal %}
+ {% ifequal timer.structure "I-HUB" %}
+
+ I-HUB
+
+ {% endifequal %}
+ {% ifequal timer.structure "POCO" %}
+
+ POCO
+
+ {% endifequal %}
+ {% ifequal timer.structure "POS[S]" %}
+
+ POS [S]
+
+ {% endifequal %}
+ {% ifequal timer.structure "POS[M]" %}
+
+ POS [M]
+
+ {% endifequal %}
+ {% ifequal timer.structure "POS[L]" %}
+
+ POS [L]
+
+ {% endifequal %}
+ {% ifequal timer.structure "Station" %}
+
+ Station
+
+ {% endifequal %}
+ {% ifequal timer.structure "TCU" %}
+
+ TCU
+
+ {% endifequal %}
+ {% ifequal timer.structure "Other" %}
+
+ Other
+
+ {% endifequal %}
+ |
+ {{ timer.eve_time | date:"Y-m-d H:i" }} | ++ | {{ timer.eve_character.character_name }} | + {% if perms.auth.timer_management %} ++ + + + + + | + {% endif %} +
{% trans "Details" %} | +{% trans "Objective" %} | +{% trans "System" %} | +{% trans "Structure" %} | +{% trans "Eve Time" %} | +{% trans "Local Time" %} | +{% trans "Creator" %} | + {% if perms.auth.timer_management %} +{% trans "Action" %} | + {% endif %} +
---|---|---|---|---|---|---|---|
{{ timer.details }} | +
+ {% ifequal timer.objective "Hostile" %}
+
+ {% trans "Hostile" %}
+
+ {% endifequal %}
+ {% ifequal timer.objective "Friendly" %}
+
+ {% trans "Friendly" %}
+
+ {% endifequal %}
+ {% ifequal timer.objective "Neutral" %}
+
+ {% trans "Neutral" %}
+
+ {% endifequal %}
+ |
+ {{ timer.system }} {{ timer.planet_moon }} + | +
+ {% ifequal timer.structure "I-HUB" %}
+
+ I-HUB
+
+ {% endifequal %}
+ {% ifequal timer.structure "POCO" %}
+
+ POCO
+
+ {% endifequal %}
+ {% ifequal timer.structure "POS[S]" %}
+
+ POS [S]
+
+ {% endifequal %}
+ {% ifequal timer.structure "POS[M]" %}
+
+ POS [M]
+
+ {% endifequal %}
+ {% ifequal timer.structure "POS[L]" %}
+
+ POS [L]
+
+ {% endifequal %}
+ {% ifequal timer.structure "Station" %}
+
+ Station
+
+ {% endifequal %}
+ {% ifequal timer.structure "TCU" %}
+
+ TCU
+
+ {% endifequal %}
+ {% ifequal timer.structure "Other" %}
+
+ Other
+
+ {% endifequal %}
|
{{ timer.eve_time | date:"Y-m-d H:i" }} | @@ -327,7 +325,6 @@ {% endif %} |