rename: Note→Post/Line (dashboard); Recognition→Note (drama); new-post/my-posts to billboard
- dashboard: Note→Post, Item→Line across models, forms, views, API, urls & tests - new-post (9×3) & my-posts (3×3) applets migrate from dashboard→billboard context; billboard view passes form & recent_posts - drama: Recognition→Note, related_name notes; billboard URL /recognition/→/my-notes/, set-palette at /note/<slug>/set-palette - recognition.js→note.js (module Note, data.note key); recognition-page.js→note-page.js; .recog-*→.note-* - _recognition.scss→_note.scss; BillNotes page header; applet slug billboard-recognition→billboard-notes (My Notes) - NoteSpec.js replaces RecognitionSpec.js; test_recognition.py→test_applet_my_notes.py - 4 migrations applied: dashboard 0004, applets 0011+0012, drama 0005; 683 ITs green Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<section
|
||||
id="id_applet_billboard_recognition"
|
||||
id="id_applet_billboard_notes"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
<h2><a href="/billboard/recognition/">Recognition</a></h2>
|
||||
<h2><a href="/billboard/my-notes/">My Notes</a></h2>
|
||||
</section>
|
||||
17
src/templates/apps/billboard/_partials/_applet-my-posts.html
Normal file
17
src/templates/apps/billboard/_partials/_applet-my-posts.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<section
|
||||
id="id_applet_my_posts"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
<h2><a href="{% url 'my_posts' user.id %}" class="my-posts-main">My Posts</a></h2>
|
||||
<div class="my-posts-container">
|
||||
<ul>
|
||||
{% for post in recent_posts %}
|
||||
<li>
|
||||
<a href="{{ post.get_absolute_url }}">{{ post.name }}</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
<li>No posts yet.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,8 +1,8 @@
|
||||
<section
|
||||
id="id_applet_new_note"
|
||||
id="id_applet_new_post"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
<h2>New Note</h2>
|
||||
{% url "new_note" as form_action %}
|
||||
<h2>New Post</h2>
|
||||
{% url "new_post" as form_action %}
|
||||
{% include "apps/dashboard/_partials/_form.html" with form=form form_action=form_action %}
|
||||
</section>
|
||||
49
src/templates/apps/billboard/my_notes.html
Normal file
49
src/templates/apps/billboard/my_notes.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{% extends "core/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title_text %}Billnotes{% endblock title_text %}
|
||||
{% block header_text %}<span>Bill</span>notes{% endblock header_text %}
|
||||
|
||||
{% block content %}
|
||||
<div class="note-page">
|
||||
<h2>My Notes</h2>
|
||||
<ul class="note-list">
|
||||
{% for item in note_items %}
|
||||
<li class="note-item" data-slug="{{ item.obj.slug }}"
|
||||
data-set-palette-url="{% url 'billboard:note_set_palette' item.obj.slug %}">
|
||||
|
||||
{% if item.obj.palette %}
|
||||
<div class="note-item__palette {{ item.obj.palette }}"></div>
|
||||
{% else %}
|
||||
<div class="note-item__image-box">?</div>
|
||||
{% endif %}
|
||||
|
||||
<p class="note-item__title">{{ item.title }}</p>
|
||||
<p class="note-item__description">{{ item.description }}</p>
|
||||
|
||||
{% if not item.obj.palette and item.palette_options %}
|
||||
<template class="note-palette-modal-tpl">
|
||||
<div class="note-palette-modal">
|
||||
{% for palette_name in item.palette_options %}
|
||||
<div class="{{ palette_name }}">
|
||||
<div class="note-swatch-body"></div>
|
||||
<button type="button" class="btn btn-confirm">OK</button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="note-palette-confirm" hidden>
|
||||
<p>Lock in this palette?</p>
|
||||
<button type="button" class="btn btn-confirm">OK</button>
|
||||
<button type="button" class="btn btn-cancel">NVM</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
{% endif %}
|
||||
|
||||
</li>
|
||||
{% empty %}
|
||||
<li class="note-item note-item--empty">No notes yet.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{% static 'apps/billboard/note-page.js' %}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,49 +0,0 @@
|
||||
{% extends "core/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title_text %}Recognition{% endblock title_text %}
|
||||
{% block header_text %}<span>Bill</span>recognition{% endblock header_text %}
|
||||
|
||||
{% block content %}
|
||||
<div class="recognition-page">
|
||||
<h2>Recognition</h2>
|
||||
<ul class="recog-list">
|
||||
{% for item in recognition_items %}
|
||||
<li class="recog-item" data-slug="{{ item.obj.slug }}"
|
||||
data-set-palette-url="{% url 'billboard:recognition_set_palette' item.obj.slug %}">
|
||||
|
||||
{% if item.obj.palette %}
|
||||
<div class="recog-item__palette {{ item.obj.palette }}"></div>
|
||||
{% else %}
|
||||
<div class="recog-item__image-box">?</div>
|
||||
{% endif %}
|
||||
|
||||
<p class="recog-item__title">{{ item.title }}</p>
|
||||
<p class="recog-item__description">{{ item.description }}</p>
|
||||
|
||||
{% if not item.obj.palette and item.palette_options %}
|
||||
<template class="recog-palette-modal-tpl">
|
||||
<div class="recog-palette-modal">
|
||||
{% for palette_name in item.palette_options %}
|
||||
<div class="{{ palette_name }}">
|
||||
<div class="recog-swatch-body"></div>
|
||||
<button type="button" class="btn btn-confirm">OK</button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="recog-palette-confirm" hidden>
|
||||
<p>Lock in this palette?</p>
|
||||
<button type="button" class="btn btn-confirm">OK</button>
|
||||
<button type="button" class="btn btn-cancel">NVM</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
{% endif %}
|
||||
|
||||
</li>
|
||||
{% empty %}
|
||||
<li class="recog-item recog-item--empty">No recognitions yet.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{% static 'apps/billboard/recognition-page.js' %}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,17 +0,0 @@
|
||||
<section
|
||||
id="id_applet_my_notes"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
<h2><a href="{% url 'my_notes' user.id %}" class="my-notes-main">My Notes</a></h2>
|
||||
<div class="my-notes-container">
|
||||
<ul>
|
||||
{% for note in recent_notes %}
|
||||
<li>
|
||||
<a href="{{ note.get_absolute_url }}">{{ note.name }}</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
<li>No notes yet.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
@@ -4,7 +4,7 @@
|
||||
id="id_text"
|
||||
name="text"
|
||||
class="form-control form-control-lg{% if form.errors.text %} is-invalid{% endif %}"
|
||||
placeholder="Enter a note item"
|
||||
placeholder="Enter a post line"
|
||||
value="{{ form.text.value | default:'' }}"
|
||||
aria-describedby="id_text_feedback"
|
||||
required
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{% extends "core/base.html" %}
|
||||
{% load lyric_extras %}
|
||||
|
||||
{% block title_text %}Dashnotes{% endblock title_text %}
|
||||
{% block header_text %}<span>Dash</span>notes{% endblock header_text %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{{ owner|display_name }}'s notes</h3>
|
||||
<ul>
|
||||
{% for note in owner.notes.all %}
|
||||
<li><a href="{{ note.get_absolute_url }}">{{ note.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3>Notes shared with me</h3>
|
||||
<ul>
|
||||
{% for note in owner.shared_notes.all %}
|
||||
<li><a href="{{ note.get_absolute_url }}">{{ note.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
20
src/templates/apps/dashboard/my_posts.html
Normal file
20
src/templates/apps/dashboard/my_posts.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends "core/base.html" %}
|
||||
{% load lyric_extras %}
|
||||
|
||||
{% block title_text %}Dashposts{% endblock title_text %}
|
||||
{% block header_text %}<span>Dash</span>posts{% endblock header_text %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{{ owner|display_name }}'s posts</h3>
|
||||
<ul>
|
||||
{% for post in owner.posts.all %}
|
||||
<li><a href="{{ post.get_absolute_url }}">{{ post.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3>Posts shared with me</h3>
|
||||
<ul>
|
||||
{% for post in owner.shared_posts.all %}
|
||||
<li><a href="{{ post.get_absolute_url }}">{{ post.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
@@ -1,22 +1,22 @@
|
||||
{% extends "core/base.html" %}
|
||||
{% load lyric_extras %}
|
||||
|
||||
{% block title_text %}Dashnote{% endblock title_text %}
|
||||
{% block header_text %}<span>Dash</span>note{% endblock header_text %}
|
||||
{% block title_text %}Dashpost{% endblock title_text %}
|
||||
{% block header_text %}<span>Dash</span>post{% endblock header_text %}
|
||||
|
||||
|
||||
{% block extra_header %}
|
||||
{% url "view_note" note.id as form_action %}
|
||||
{% url "view_post" post.id as form_action %}
|
||||
{% include "apps/dashboard/_partials/_form.html" with form=form form_action=form_action %}
|
||||
{% endblock extra_header %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<small>Note created by: <span id="id_note_owner">{{ note.owner|display_name }}</span></small>
|
||||
<table id="id_note_table" class="table">
|
||||
{% for item in note.item_set.all %}
|
||||
<tr><td>{{ forloop.counter }}. {{ item.text }}</td></tr>
|
||||
<small>Post created by: <span id="id_post_owner">{{ post.owner|display_name }}</span></small>
|
||||
<table id="id_post_table" class="table">
|
||||
{% for line in post.lines.all %}
|
||||
<tr><td>{{ forloop.counter }}. {{ line.text }}</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
|
||||
<form method="POST" action="{% url "share_note" note.id %}">
|
||||
<form method="POST" action="{% url "share_post" post.id %}">
|
||||
{% csrf_token %}
|
||||
<input
|
||||
id="id_recipient"
|
||||
@@ -43,9 +43,9 @@
|
||||
|
||||
<button type="submit" class="btn btn-primary">Share</button>
|
||||
</form>
|
||||
<small>Note shared with:
|
||||
{% for user in note.shared_with.all %}
|
||||
<span class="note-recipient">{{ user|display_name }}</span>
|
||||
<small>Post shared with:
|
||||
{% for user in post.shared_with.all %}
|
||||
<span class="post-recipient">{{ user|display_name }}</span>
|
||||
{% endfor %}
|
||||
</small>
|
||||
</div>
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<script src="{% static 'apps/gameboard/d3.min.js' %}"></script>
|
||||
<script src="{% static 'apps/gameboard/natus-wheel.js' %}"></script>
|
||||
<script src="{% static 'apps/dashboard/recognition.js' %}"></script>
|
||||
<script src="{% static 'apps/dashboard/note.js' %}"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
Reference in New Issue
Block a user