This repository has been archived by the owner on Apr 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
[wip] Search all documents #658
Open
janno42
wants to merge
4
commits into
fsr-de:master
Choose a base branch
from
julkw:search_all_documents
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
.../information_pages/migrations/0004_auto_20180813_2050_squashed_0005_auto_20180813_2102.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.15 on 2018-08-13 19:06 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
replaces = [('information_pages', '0004_auto_20180813_2050'), ('information_pages', '0005_auto_20180813_2102')] | ||
|
||
dependencies = [ | ||
('information_pages', '0003_auto_20180201_2301'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='informationdocument', | ||
options={'base_manager_name': 'objects', 'permissions': (('view_informationdocument', 'User/Group is allowed to view that document'),), 'verbose_name': 'Information document', 'verbose_name_plural': 'Information documents'}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{% extends 'base_with_sidebar.html' %} | ||
{% load i18n %} | ||
|
||
{% block title %} | ||
{% blocktrans count counter=2 %}Documents{% plural %}Documents{% endblocktrans %} | ||
{% endblock %} | ||
|
||
{% block sidebar %} | ||
<div class="toc hidden-print"> | ||
<ul> | ||
{% for type, documents in searched_documents %} | ||
<li><a href="#type{{ type }}">{{ type }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% for type, documents in searched_documents %} | ||
<h3 name="type{{ type }}">{{ type }}</h3> | ||
<table class="table table-striped"> | ||
{% for document, lines in documents %} | ||
<tr> | ||
<td class="width: 95%;"> | ||
<a href="{{ document.get_view_url }}">{{ document.title}} {% if document.date %}({{ document.date| date:"d.m.Y" }}){% endif %}</a> | ||
<ul class="minutes-lines"> | ||
{% for line in lines %} | ||
<li>{{ line }}</li> | ||
{% endfor %} | ||
</ul> | ||
</td> | ||
<td style="width: 5%; text-align: center;"> | ||
{% if document.attachments.count > 0 %} | ||
<span class="text-gray" data-toggle="tooltip" data-placement="left" data-container="body" title="{{ document.attachments.all|join:', ' }}"> | ||
<span class="glyphicon glyphicon-file" aria-hidden="true"></span> | ||
</span> | ||
{% endif %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% empty %} | ||
{% block searched_documentsempty %} | ||
<em> | ||
{% blocktrans %}No documents containing "{{ phrase }}" found.{% endblocktrans %} | ||
</em> | ||
{% url "login" as anchor_url %} | ||
{% if not user.is_authenticated %} | ||
<em> | ||
{% blocktrans with anchor='<a href="'|add:anchor_url|add:'">'|safe anchor_end='</a>'|safe %}You might have to {{ anchor }} login {{ anchor_end }} first.{% endblocktrans %} | ||
</em> | ||
{% endif %} | ||
{% endblock %} | ||
{% endfor %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a squashed migration although that's not necessary because both 0004 and 0005 didn't exist before. please create a plain new migration instead.