Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show subjects of archived mails before deletion’s confirmation #1025

Conversation

ldidry
Copy link
Contributor

@ldidry ldidry commented Oct 26, 2020

I think it would be good to have a reminder of which archived mails are about to be deleted (just like the reminder of the subscribers who are about to be unsubscribed), so here it is.

Copy link
Member

@ikedas ikedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                <input type="checkbox" name="msgid" value="$MSGID$_SYMPA_$SUBJECTNA$" />

This will make HTML archives not backward-compatible. (And, this is a matter of personal taste, but separator _SYMPA_ looks a bit inelegant for me).

Instead of doing as above, for example, we may use jQuery to enable/disable msg_subject, doing such as:

                ($tag$% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%$tag$)
                <input type="checkbox" name="msgid" value="$MSGID$"
                 id="msgid($tag$% msgidx %$tag$)" />
                <input type="hidden" name="msg_subject" value="$SUBJECTNA$"
                 class="disableUnlessChecked"
                 data-selector="#msgid($tag$% msgidx %$tag$)" />

About disableUnlessChecked class see www/js/sympa.js.

@ldidry
Copy link
Contributor Author

ldidry commented Oct 27, 2020

I thought about using javascript but I wanted to have a solution for those who don’t use JS.
But if we already have a thing for this kind of case, I can use it.

Indeed, it’s not backward compatible but we can have a message in the CHANGELOG saying that admins can rebuild archives… or not, since it doesn’t break anything for old archives, it just have the old behavior 🙂

I’ll recode it to use JS

@ldidry ldidry force-pushed the show-mail-subject-when-deleting-from-archive branch from 005f8d0 to beb4b34 Compare October 27, 2020 08:36
@ldidry
Copy link
Contributor Author

ldidry commented Oct 27, 2020

Here we go: new method, with JS.

Copy link
Member

@ikedas ikedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found no problem. Thanks for improvement!

@ikedas
Copy link
Member

ikedas commented Oct 27, 2020

🍻

@ikedas ikedas added this to the 6.2.60 milestone Oct 30, 2020
@ldidry
Copy link
Contributor Author

ldidry commented Nov 16, 2020

Since 6.2.58 has been released, shouldn’t it be merged?

@ikedas ikedas merged commit 20d39dc into sympa-community:sympa-6.2 Nov 18, 2020
ikedas added a commit to ikedas/sympa that referenced this pull request Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants