mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Add organization landing page #141
This commit is contained in:
parent
070d7bf5e6
commit
d9c399f308
@ -163,6 +163,7 @@ from project.views import (
|
||||
oauth,
|
||||
oauth2_client,
|
||||
oauth2_token,
|
||||
organization,
|
||||
organizer,
|
||||
planing,
|
||||
reference,
|
||||
|
||||
3
project/static/organization-landing-page.js
Normal file
3
project/static/organization-landing-page.js
Normal file
File diff suppressed because one or more lines are too long
@ -1,76 +1,77 @@
|
||||
|
||||
h1 {
|
||||
font-size: 1.6rem;
|
||||
margin: 1rem 0 2rem;
|
||||
font-size: 1.6rem;
|
||||
margin: 1rem 0 2rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2rem;
|
||||
margin: 2rem 0 1rem;
|
||||
font-size: 1.2rem;
|
||||
margin: 2rem 0 1rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1rem;
|
||||
margin: 2rem 0 1rem;
|
||||
font-size: 1.1rem;
|
||||
margin: 2rem 0 1rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
tr.collapse.in {
|
||||
display:table-row;
|
||||
display: table-row;
|
||||
}
|
||||
|
||||
tr.table-borderless td {
|
||||
border:0;
|
||||
padding:0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
tr.table-line-through td {
|
||||
text-decoration: line-through;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.text-toogle[aria-expanded=false] .text-expanded {
|
||||
display: none;
|
||||
.text-toogle[aria-expanded="false"] .text-expanded {
|
||||
display: none;
|
||||
}
|
||||
.text-toogle[aria-expanded=true] .text-collapsed {
|
||||
display: none;
|
||||
.text-toogle[aria-expanded="true"] .text-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table td.fit,
|
||||
.table th.fit {
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.ui-autocomplete, .ui-datepicker {
|
||||
z-index: 1051 !important;
|
||||
.ui-autocomplete,
|
||||
.ui-datepicker {
|
||||
z-index: 1051 !important;
|
||||
}
|
||||
|
||||
.btn-google {
|
||||
color: white;
|
||||
background-color: #ea4335;
|
||||
color: white;
|
||||
background-color: #ea4335;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
align-items: start;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
@media (max-width: 320px) {
|
||||
td, th {
|
||||
word-break: break-all;
|
||||
}
|
||||
td,
|
||||
th {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
.text-highlight {
|
||||
color: #dc3545!important;
|
||||
color: #dc3545 !important;
|
||||
}
|
||||
|
||||
.w-normal {
|
||||
max-width: 1024px;
|
||||
}
|
||||
max-width: 1024px;
|
||||
}
|
||||
|
||||
@ -610,7 +610,7 @@
|
||||
<div class="mr-4 float-sm-left">{{ render_logo(event.admin_unit.logo) }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="font-weight-bold">{{ event.admin_unit.name }}</div>
|
||||
<div class="font-weight-bold"><a href="{{ url_for('organization', id=event.admin_unit.id) }}">{{ event.admin_unit.name }}</a></div>
|
||||
|
||||
{{ render_link_prop(event.admin_unit.url) }}
|
||||
{{ render_email_prop(event.admin_unit.email) }}
|
||||
|
||||
13
project/templates/organization/read.html
Normal file
13
project/templates/organization/read.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block title %}
|
||||
{{ organization.name }}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link href="https://unpkg.com/@angular/material@2.0.0-beta.8/prebuilt-themes/indigo-pink.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<organization-landing-page organizationId="{{ organization.id }}"></organization-landing-page>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='organization-landing-page.js')}}"></script>
|
||||
|
||||
{% endblock %}
|
||||
11
project/views/organization.py
Normal file
11
project/views/organization.py
Normal file
@ -0,0 +1,11 @@
|
||||
from flask import render_template
|
||||
|
||||
from project import app
|
||||
from project.models import AdminUnit
|
||||
|
||||
|
||||
@app.route("/organization/<int:id>")
|
||||
def organization(id):
|
||||
organization = AdminUnit.query.get_or_404(id)
|
||||
|
||||
return render_template("organization/read.html", organization=organization)
|
||||
6
tests/views/test_organization.py
Normal file
6
tests/views/test_organization.py
Normal file
@ -0,0 +1,6 @@
|
||||
def test_read(client, seeder, utils):
|
||||
user_id, admin_unit_id = seeder.setup_base()
|
||||
seeder.create_event(admin_unit_id)
|
||||
|
||||
url = utils.get_url("organization", id=1)
|
||||
utils.get_ok(url)
|
||||
Loading…
x
Reference in New Issue
Block a user