Added more changes

This commit is contained in:
Raynaldo Rivera 2014-10-14 20:57:25 -07:00
parent dbcade4146
commit bae1670c01
7 changed files with 114 additions and 193 deletions

View File

@ -144,12 +144,13 @@ DEFAULT_ALLIANCE_GROUP = 'AllianceMember'
# ALLIANCE INFO # ALLIANCE INFO
ALLIANCE_ID = '0' ALLIANCE_ID = '0'
ALLIANCE_NAME = 'SomeAllianceName' ALLIANCE_NAME = 'Some alliance'
# Jabber Prosody Info # Jabber Prosody Info
JABBER_URL = "@someaddress.com" JABBER_URL = "@someaddress.com"
OPENFIRE_ADDRESS = "http://someaddress.com:9090/" OPENFIRE_ADDRESS = "http://someaddress.com:9090/"
OPENFIRE_SECRET_KEY = "somekey" OPENFIRE_SECRET_KEY = "somesecret"
# Mumble settings # Mumble settings
MUMBLE_SERVER_ID = '1' MUMBLE_SERVER_ID = 1

View File

@ -1,149 +0,0 @@
"""
Django settings for alliance_auth project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '5xvh4e0x&@-$6(kj%4^80pdo1n5v-!mtx(e(1tw@kn-1le*ts@'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django_admin_bootstrapped.bootstrap3',
'django_admin_bootstrapped',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_evolution',
'bootstrapform',
'authentication',
'portal',
'registration',
'services',
'eveonline',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'alliance_auth.urls'
WSGI_APPLICATION = 'alliance_auth.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alliance_auth',
'USER': 'allianceauth',
'PASSWORD': 'allianceauth',
'HOST': '127.0.0.1',
'PORT': '3306',
},
'phpbb3': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alliance_forum',
'USER': 'allianceauth',
'PASSWORD': 'allianceauth',
'HOST': '127.0.0.1',
'PORT': '3306',
},
'mumble': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alliance_mumble',
'USER': 'allianceauth',
'PASSWORD': 'allianceauth',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'util.context_processors.alliance_id',
'util.context_processors.alliance_name',
'util.context_processors.jabber_url'
)
TEMPLATE_DIRS = (
'templates',
)
STATICFILES_DIRS = (
'static',
)
LOGIN_URL = '/login_user/'
# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
# ALLIANCE INFO
ALLIANCE_ID = '99001336'
ALLIANCE_NAME = 'The 99 Percent'
# Jabber Prosody Info
JABBER_URL = "@the99eve.com"
OPENFIRE_ADDRESS = "http://the99eve.com:9090/"
OPENFIRE_SECRET_KEY = "SrJ35I36"
# Mumble settings
MUMBLE_SERVER_ID = 1

View File

@ -4,6 +4,9 @@ from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.contrib.auth.decorators import permission_required from django.contrib.auth.decorators import permission_required
from eveonline.managers import EveManager
from authentication.managers import AuthServicesInfoManager
# Create your views here. # Create your views here.
def index_view(request): def index_view(request):
@ -12,7 +15,9 @@ def index_view(request):
@login_required @login_required
def dashboard_view(request): def dashboard_view(request):
return render_to_response('registered/dashboard.html', None, context_instance=RequestContext(request)) render_items = {'characters': EveManager.get_characters_by_owner_id(request.user.id),
'authinfo': AuthServicesInfoManager.get_auth_service_info(request.user)}
return render_to_response('registered/dashboard.html', render_items, context_instance=RequestContext(request))
@login_required @login_required

View File

@ -19,7 +19,6 @@
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css"> <link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/sb-admin-2.css' %}" rel="stylesheet"> <link href="{% static 'css/sb-admin-2.css' %}" rel="stylesheet">
{% block extra_css %}{% endblock extra_css %} {% block extra_css %}{% endblock extra_css %}
</head> </head>
<body> <body>
@ -27,12 +26,15 @@
<div id="wrapper"> <div id="wrapper">
<!-- Navigation --> <!-- Navigation -->
<nav class="navbar navbar-inverse navbar-static-top" role="navigation" style="margin-bottom: 0"> <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="{% url 'auth_dashboard' %}">{{ ALLIANCE_NAME }}</a>
<div class="navbar-header ">
<a class="navbar-brand ">
<div class="fa fa-cog fa-spin"></div>
{{ ALLIANCE_NAME }}
</a>
</div> </div>
<!-- /.navbar-header --> <!-- /.navbar-header -->
<ul class="nav navbar-top-links navbar-right"> <ul class="nav navbar-top-links navbar-right">

View File

@ -7,42 +7,53 @@
{% block extra_css %}{% endblock extra_css %} {% block extra_css %}{% endblock extra_css %}
{% block content %} {% block content %}
<div class="col-lg-12"> <div class="col-lg-12 container">
<h1 class="page-header text-center">Characters</h1> <h1 class="page-header text-center">Characters</h1>
<div class="container-fluid"> <div class="col-lg-12 container" id="example">
{% if authinfo.main_char_id %} {% if authinfo.main_char_id %}
{% else %} {% else %}
<div class="alert alert-danger" role="alert">No primary character set</div> <div class="alert alert-danger" role="alert">No primary character set</div>
{% endif %} {% endif %}
{% for character in characters %} <div class="row">
<div class="well profile col-md-6 center-block"> {% for character in characters %}
<div class="col-sm-12"> <div class="col-lg-6">
<div class="col-xs-12 col-sm-8">
<h3>{{character.character_name}}</h3>
<p><strong>Alliance: </strong> {{character.alliance_name}} </p>
<p><strong>Corporation: </strong>{{character.corporation_name}}</p>
<p><strong>Corporation Ticker: </strong> {{character.corporation_ticker}} </p>
</div>
<div class="col-xs-8 col-sm-4 text-center">
<figure>
<img src="https://image.eveonline.com/Character/{{character.character_id}}_128.jpg" alt="" class="img-responsive">
<br>
<a href="/main_character_change/{{character.character_id}}">
{% ifequal character.character_id authinfo.main_char_id %}
<button type="button" class="btn btn-disable" disabled>Make Primary</button>
{% else %}
<button type="button" class="btn btn-primary">Make Primary</button>
{% endifequal %}
</a>
</figure>
</div>
</div>
<div class="col-xs-offset-8 col-sm-4 text-center">
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-title">
<div class="row">
<div class="col-md-12">
<div class="text-left col-md-8">
{{character.character_name}}
</div>
<div class="text-right col-md-4">
{% ifequal character.character_id authinfo.main_char_id %}
<button type="button" class="btn btn-default btn-xs" disabled>Make Primary</button>
{% else %}
<button type="button" class="btn btn-primary btn-xs">Make Primary</button>
{% endifequal %}
</div>
</div>
</div>
</div>
</div>
<div class="panel-body">
<div class="col-lg-5 col-sm-2"><img class=
"ra-avatar img-responsive" src=
"https://image.eveonline.com/Character/{{character.character_id}}_128.jpg"></div>
<div class="col-lg-7 col-sm-2">
<p><strong>Alliance: </strong> {{character.alliance_name}} </p>
<p><strong>Corporation: </strong>{{character.corporation_name}}</p>
<p><strong>Corporation Ticker: </strong> {{character.corporation_ticker}} </p>
</div>
</div>
</div>
</div> </div>
</div> {% endfor %}
{% endfor %} </div>
</div> </div>
</div> </div>

View File

@ -1,15 +1,66 @@
{% extends "public/base.html" %} {% extends "public/base.html" %}
{% block title %}Alliance Auth{% endblock%}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}Something something here{% endblock page_title %} {% block page_title %}Something something here{% endblock page_title %}
{% block content %} {% block content %}
<div class="col-lg-12">
<div class="col-lg-12">
<h1 class="page-header text-center">Dashboard</h1> <h1 class="page-header text-center">Dashboard</h1>
<div class="container"> {% if perms.auth.alliance_member %}
<p>WAT</p> <div class="col-lg-12 container" id="example">
<div class="panel panel-default">
<div class="panel-heading">Alliance Announcment:</div>
<div class="panel-body">Something something dark side </div>
</div>
<div class="row">
<div class="col-lg-6">
{% for character in characters %}
{% ifequal character.character_id authinfo.main_char_id %}
<div class="panel panel-default">
<div class="panel-heading">Main character:</div>
<div class="panel-body">
<div class="col-lg-5 col-sm-2"><img class=
"ra-avatar img-responsive" src=
"https://image.eveonline.com/Character/{{character.character_id}}_128.jpg"></div>
<div class="col-lg-7 col-sm-2">
<h4 class="">{{character.character_name}}</h4>
<p>{{character.corporation_name}}</p>
<p>{{character.alliance_name}}</p>
</div>
</div>
</div>
{% endifequal %}
{% endfor %}
</div>
<div class="col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">Groups:</div>
<div class="panel-body">
<div style="height: 128px;overflow:-moz-scrollbars-vertical;overflow-y:auto;">
<table class="table table-striped">
{% for group in user.groups.all %}
<tr>
<td>
<p class="">{{ group.name }}</p>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</div>
</div>
</div> </div>
{% else %}
<p> Not part of the alliance</p>
{% endif %}
</div> </div>
{% endblock content %} {% endblock content %}