Merge pull request #142 from DanielGrams/issue/141-org-landing-page

Add organization landing page #141
This commit is contained in:
Daniel Grams 2021-03-14 18:30:21 +01:00 committed by GitHub
commit 798a2dc081
7 changed files with 66 additions and 31 deletions

View File

@ -163,6 +163,7 @@ from project.views import (
oauth,
oauth2_client,
oauth2_token,
organization,
organizer,
planing,
reference,

File diff suppressed because one or more lines are too long

View File

@ -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;
}

View File

@ -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) }}

View 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 %}

View 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)

View 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)