translate / pootle

Online translation tool
http://pootle.translatehouse.org
GNU General Public License v3.0
1.49k stars 288 forks source link

Allow to edit announcements if user has administrate permission #3984

Open unho opened 9 years ago

unho commented 9 years ago

Right now the announcements can only be edited if the user is a superuser, but given that announcements are more likely to be edited for people managing a specific project, TP or language, those users should also be enabled to edit their corresponding announcements.

See https://github.com/translate/pootle/pull/3968#issuecomment-131724944 for more relevant data.

iafan commented 9 years ago

From IRC chat:

@unho: @iafan, I discussed with @julen whether it was preferable to allow language (or project or TP) managers to enter the admin panel to edit their announcements

Or if it is better to allow to edit specific announcements using a separate page that can be accessed using the actions dropdown, like the one recently added for edit a language special characters (see https://github.com/translate/pootle/issues/3908).

Julen preferred it to be done using the dropdown rather than allowing non-superusers to access the admin panel. Which are your thoughts re this?

I think it rather makes sense to be able to add/edit announcements right in the context of a specific language/project/translation project. So if you have enough permissions, you should be able to see and expand the sidebar, and in that sidebar, provide the code for your announcements page, preview and save it.

unho commented 9 years ago

I think it rather makes sense to be able to add/edit announcements right in the context of a specific language/project/translation project. So if you have enough permissions, you should be able to see and expand the sidebar, and in that sidebar, provide the code for your announcements page, preview and save it.

@iafan, I don't think it is possible to display the edit form within the sidebar unless the sidebar expands to fit all the visible space, at least for screens like mine. Is this what you are suggesting.

unho commented 9 years ago

I think it rather makes sense to be able to add/edit announcements right in the context of a specific language/project/translation project. So if you have enough permissions, you should be able to see and expand the sidebar, and in that sidebar, provide the code for your announcements page, preview and save it.

Does this mean that users would be able to create new announcements that they would have enough rights to edit if they had existed?

dwaynebailey commented 9 years ago

@unho I think @iafan comment "...able to add/edit announcements right in the context..." pretty much answers your question. Implement parts in stages if you have to.

iafan commented 9 years ago

I don't think it is possible to display the edit form within the sidebar unless the sidebar expands to fit all the visible space, at least for screens like mine. Is this what you are suggesting.

I'll provide a mockup to illustrate the approach.

iafan commented 9 years ago

Here's the mockup: sidebar_edit_mode.pdf

unho commented 9 years ago

@iafan Thanks for the mockup. Just some concerns:

iafan commented 9 years ago

What are "3 announcements"? I don't remember us planning for such a behavior.

unho commented 9 years ago

@iafan We currently support displaying at the same time 3 different announcements: Project, Language and TP. Have in mind that we use announcements to provide specific guidelines about translation.

iafan commented 9 years ago

I wasn't aware of that. Is that feature in master yet? Do you have an example?

Anyway, I'd suppose that one should be able to only edit one announcement associated with the current context (Project, Language, or TP).

(probably it's better to move to IRC for discussion)

unho commented 8 years ago

This is becoming important again.