Commit Graph

207 Commits

Author SHA1 Message Date
Darks c6ef83d32c
post: add move to another thread operation (#79)
Currently only support forum
2021-07-14 19:55:16 +02:00
Darks fbc500e833 Merge pull request 'Switch to LessCSS' (#102) from lesscss into dev
Reviewed-on: https://gitea.planet-casio.com/devs/PCv5/pulls/102
2021-07-14 16:42:06 +02:00
Darks 87d795959f
less (#97): first shot to Less
Quick switch, still may need some refacto and delete unused code
2021-07-14 16:30:45 +02:00
Lephe 3551103c88
forum: allow users to move topics to wherever they can write 2021-07-12 21:33:03 +02:00
Lephe 9f0cbc810b
forum: enable topic modification
This works only after a top comment has been selected (but topics
without top comments are an anomaly of databases initialized before it
was added, so we don't care).
2021-07-12 19:08:31 +02:00
Lephe b8ed0bba99 forum: enable topic deletion
Topic modification does not work in this snapshot, this is normal.
2021-07-12 18:37:06 +02:00
Lephe 9727c2a986 forum: add an action to change the top comment of a topic
This also prepares the thread_leader macro for top comments of
topics, programs, etc. which have extra stuff to render and more
specific actions.
2021-07-12 18:37:06 +02:00
Lephe 7423e522c3 forum: minor improvements to thread display 2021-07-12 18:37:06 +02:00
Lephe b533f8a161 forum: replace comment action links with contextual menu
The menu works with HTML/CSS only, and JS support will also allow
closing it by clicking outside of it (instead of closing allow when
clicking on the menu icon again).
2021-07-12 18:37:06 +02:00
Lephe 7fc4424812
forum: use a more readable date format 2021-07-10 17:54:07 +02:00
Lephe 1837f8f9a6
forum: anti-bot fields for guest topics and comments (#51) 2021-07-10 12:30:12 +02:00
Lephe 6532dc8940
admin: remove empty group table in attachment manager 2021-07-08 17:55:32 +02:00
Darks f848615ff1 Petite amélioration sur la page de modération des images 2021-07-08 17:00:19 +02:00
Lephe 05f56a1cf4
forum: improve attachment inputs and allow edition (#49) 2021-07-08 16:50:28 +02:00
Lephe c8c030081b
forum: preview formatting when editing messages (#49) 2021-07-08 16:50:28 +02:00
Lephe 2aa2fd539f
clean up account forms (factor + syntax) (#70)
* Factor the update account forms (user and admin)
* Slightly cleaner syntax (I hope), also a bit shorter
2021-07-08 15:12:37 +02:00
Lephe b3d99b93f8
account: add a theme setting (#14) 2021-07-08 11:43:09 +02:00
Lephe cc5f4e481b
account: member deletion, with post anonymization (#57) 2021-07-08 10:39:22 +02:00
Lephe f75f1618bc
add a developer warning for slow requests (#63) 2021-07-07 18:42:17 +02:00
Lephe c59e844852
forum: count comments for all presented topics in a single request (#63)
It appears as though performing a lot of requests is the most costly
aspect of listing comment counts per topic; this change aims to address
that by reading all the counts in a single request.

On my computer, this changes loading times from an absolute 100-200 ms to
50-100 ms most of the time. The request impact is not easy to measure as a
couple ms is small enough to fall in the range of disk access and other
semi-random events.
2021-07-07 17:26:22 +02:00
Eragon 6cbf5a51f9
Implémentation du "skip to content" #94 2021-04-28 19:30:41 +02:00
Darks 55beccf7f4
widgets: humanize sizes of attachements 2021-04-27 19:35:37 +02:00
Darks d7d8244da9
polls: small fix on template 2021-03-16 18:51:11 +01:00
Darks 8bdf3909ea
login_as: fixed some issues
See https://gitea.planet-casio.com/devs/PCv5/issues/90#issuecomment-1131
2021-03-06 11:36:35 +01:00
Darks 87ef91b9e3
login_as: add function to login as arbitrary account 2021-03-05 23:56:03 +01:00
Lephe 284e8986fa
forum: random improvements to overflows on the forum
* Wrap long usernames
* Prevent images from overflowing to the right
2021-03-05 13:52:55 +01:00
Lephe 07a91c4663
admin: show group CSS on user editor 2021-02-27 11:50:40 +01:00
Lephe 1d63d05c1e
admin: show trophy icons on user editor 2021-02-27 11:42:29 +01:00
Lephe 6f98cba65e
review of privileges and forum permissions
* Sorted privileges into categories, similar to the v4.3 style

Added privilege check utilities:
* Forum: is_news(), is_default_accessible() and is_default_postable()
* Member: can_access_forum(), can_post_in_forum(), can_edit_post(),
  and can_delete_post()

Unfortunately current_user is not a Guest when logged out, so one
cannot usually write current_user.can_*() without checking for
authentication first, so the checks are still somewhat verbose.

Reviewed forum permissions; the following permission issues have been
fixed (I have tested most but not all of them prior to fixing):

* app/routes/forum/index.py: Users that were not meant to access a
  forum could still obtain a listing of the topics
* app/routes/forum/topic.py: Users that were not meant to see topics
  could still read them by browsing the URL
* app/routes/forum/topic.py: Authenticated users could post in any
  topic, including ones that they should not have access to
* app/routes/posts/edit.py: Users with edit.posts (eg. mods) could edit
  and delete messages in forums they can't access (eg. creativecalc)

* app/templates/account/user.html: Users with admin panel access would
  see account editing links they can't use (affects developers)
* app/templates/base/navbar/forum.html: The "Forum" tab would list all
  forums including ones the user doesn't have access to
* app/templates/forum/index.html: Users would see every single forum,
  including ones they can't access
* app/template/widgets/thread.html: Anyone would see Edit/Delete links
  on every message, even though most were unusable

Miscellaneous changes:
* app/routes/forum/topic.py: Ordered comments by date as intended,
  which I assume worked by chance until now
* Removed the old assets/privs.txt files which is now superseded by the
  list implemented in app/data/groups.yaml

This commit changes group and forum information, run master.py with:
@> forums update
@> groups update
2021-02-26 18:32:45 +01:00
Lephe d50b58cd24
(random improvements on texts) 2021-02-26 18:31:10 +01:00
Eldeberen 7e7e865430
Merge branch 'dev' of gitea.planet-casio.com:devs/PCv5 into dev 2021-02-22 23:54:51 +01:00
Eldeberen fecbdffee8
polls: add link in admin panel 2021-02-22 23:54:47 +01:00
Eldeberen 938516cb3f
polls: added admin panel and deletion form 2021-02-22 23:50:19 +01:00
Eldeberen d6512bb197
polls: added multi-choices polls 2021-02-22 22:49:11 +01:00
Eldeberen b23fc15b6e
polls: changes in template, display results when user has voted 2021-02-21 21:15:54 +01:00
Eldeberen 5958605d2b
forum: fix message for necropost warning 2021-02-21 20:29:55 +01:00
Eldeberen f10d5404c2
forum: fix #84 2021-02-21 20:17:48 +01:00
Eragon f3bb8858f0
Vérification de l'existence d'une signature pour l'afficher 2021-02-21 12:17:55 +01:00
Eldeberen d0714d87b0
poll: phoque it. XML is much more restrictive than html 2021-02-20 18:43:37 +01:00
Eldeberen e2c84df6e3
poll: fixed a ***** bug 2021-02-20 18:31:40 +01:00
Eldeberen 9d08f81342
poll,md: adds pclink for polls 2021-02-20 17:17:33 +01:00
Eldeberen cd8efcced8
Merge branch 'dev' of gitea.planet-casio.com:devs/PCv5 into polls 2021-02-20 01:36:04 +01:00
Eldeberen fabad32955
polls: add a panel to manage own polls 2021-02-20 01:28:08 +01:00
Eldeberen 473448ab5b
poll: add ability to vote
Fixed some bugs too
2021-02-20 00:33:34 +01:00
Eldeberen ec3f33ead0
polls: updated templates 2021-02-19 23:26:10 +01:00
Eldeberen 3b1aa2fc1d
admin-panel: fix users registration date 2021-02-19 22:23:26 +01:00
Eldeberen d2c5ddd874
polls: added models 2021-02-19 22:07:31 +01:00
Eragon 4ddf60353c
#84 Passage du dernier post en cas de nécropost 2021-01-12 17:30:54 +01:00
Eragon c0ae3cc8ab
#84 Confirmation anti-nécropost 2021-01-12 16:40:52 +01:00
Lephe 1d38f906ee
admin/members: add a dynamic regex/logic filter for the member list
This commit introduces a client-side table filter that supports regexes
and propositional logic to filter table rows.

A table can be filtered if it has the [filter-target] class and its
first row has <th> tags with a [data-filter] attribute specifying column
names.

The filter itself is a div with the [form] and [filter] classes, and a
[data-target] attribute pointing to the table to filter. The filter
contains a text <input> which is passed to filter_update() when the
filter expression is validated.

The client-side filter code runs the expression through a basic lexer
and parser, then matches the result for every row in the target table.
The [textContent] of each cell is used for string and regex matching.
2020-11-02 14:38:28 +01:00