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
Add workspace root content type #3749
Conversation
e319405
to
5913bf3
Compare
d5fbff2
to
d5aa211
Compare
<!-- enabled behaviors --> | ||
<property name="behaviors"> | ||
<element value="opengever.tabbedview.interfaces.ITabbedViewEnabled" /> | ||
<element value="opengever.sharing.behaviors.IDossier" /> |
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.
Is that really necessary, as soon as I know the workspace part should habe their own roles and permissions.
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.
I used the xml of opengever.repository.repositoryroot
as a base for this. I removed the behaviour now.
<alias from="view" to="@@view" /> | ||
|
||
<!-- Actions --> | ||
|
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.
✂️
|
||
def __call__(self): | ||
self.install_upgrade_profile() | ||
self.update_workflow_security( |
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.
what ??? 😞
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.
Clicked the button in lawgiver, I thought this would be necessary since I added a new permission. Seems like it is actually not needed, I removed the workflow update completely.
@@ -0,0 +1,716 @@ | |||
<?xml version='1.0' encoding='UTF-8'?> |
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.
??? 😞
--> 🗑
@@ -0,0 +1,401 @@ | |||
<?xml version='1.0' encoding='UTF-8'?> |
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.
--> 🗑
"_path": "teamraeume", | ||
"_type": "opengever.workspace.root", | ||
"title_de": "Teamräume", | ||
"title_fr": "Teamräume", |
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.
ask niklaus for a meaningful translation.
"_type": "opengever.workspace.root", | ||
"title_de": "Teamräume", | ||
"title_fr": "Teamräume", | ||
"_transitions": "publish" |
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.
is there a publish transition ...
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.
Yes, there is. Have a look at the item above.
It works, just tested it. The item is published after its creation.
opengever/testing/fixtures.py
Outdated
def create_workspaces(self): | ||
self.workspace_root = self.register('workspace_root', create( | ||
Builder('workspace_root').having(title_de=u'Teamr\xe4ume', | ||
title_fr=u'Teamr\xe4ume'))) |
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.
same here
@@ -0,0 +1,6 @@ | |||
<configure |
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.
We do not have a content
subdirectory in GEVER, i would move all that to opengever/workspace
<property name="description" i18n:translate="" /> | ||
<property name="icon_expr" /> | ||
<property name="allow_discussion">False</property> | ||
<property name="global_allow">True</property> |
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.
-> False
: you've already added it to the allowed-types on Plone Site
.
<property name="default_view">tabbed_view</property> | ||
<property name="default_view_fallback">False</property> | ||
<property name="view_methods"> | ||
<element value="view" /> |
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.
✂️ I think we only want a tabbedview here.
Having two values here probably lets the layout-menu pop up; we don't want that in GEVER.
opengever/testing/fixtures.py
Outdated
@@ -805,6 +806,11 @@ def create_committee(self, title, repository_folder, group_id, | |||
group_id=group_id)) | |||
return committee | |||
|
|||
def create_workspaces(self): |
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.
Please rename this to create_workspace_root
.
Creating the workspaces should be separated and executed by another user in another freezed hour.
|
||
|
||
@adapter(IFolderish, IDefaultBrowserLayer, IDexterityFTI) | ||
class AddView(DefaultAddView): |
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 view is not registered.
How do we test that?
need any specific schema fields """ | ||
|
||
|
||
alsoProvides(IWorkspaceRootSchema, IFormFieldProvider) |
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.
In GEVER we prefer to use the decorator style.
So please use
@provider(IFormFieldProvider)
class IWorkspaceRootSchema(model.Schema):
…
See https://github.com/4teamwork/opengever.core/blob/master/opengever/meeting/proposaltemplate.py#L14
I'm aware that there are places where this is not yet converted.
b499001
to
99c4e91
Compare
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.
Bitte noch Übersetzungen den Titel des FTI auf Deutsch übersetzen.
Ansonsten siehts gut aus 👍
need any specific schema fields """ | ||
|
||
|
||
class WorkspaceRoot(Item): |
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.
Funktioniert die TranslatedTitle Funktionalität wirklich wie gewünscht? Aus meiner Sicht müsste hier das TranslatedTitleMixin
verwendet werden. 🤔
ddc5cdb
to
e84fcec
Compare
e84fcec
to
2990f0c
Compare
@@ -231,6 +231,10 @@ msgstr "Amtswechsler umschalten" | |||
msgid "Unlock unused repository prefixes." | |||
msgstr "Freigabe von ungebrauchten Aktenzeichen Prefixen." | |||
|
|||
#: ./opengever/core/profiles/default/types/opengever.workspace.root.xml | |||
msgid "WorkspaceRoot" | |||
msgstr "Teamruäume" |
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.
typo
@@ -24,5 +24,12 @@ | |||
"title_de": "Kontakte", | |||
"title_fr": "Contacts", | |||
"_transitions": "publish" | |||
}, | |||
{ | |||
"_path": "teamraeume", |
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.
Ich finde die ID nicht schön. Wie wärs mit workspaces
?
opengever/testing/fixtures.py
Outdated
def create_workspace_root(self): | ||
self.workspace_root = self.register('workspace_root', create( | ||
Builder('workspace_root').having(title_de=u'Teamr\xe4ume', | ||
title_fr=u'Espace partag\xe9'))) |
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.
Kann man hier die ID setzen? Wäre cool wenn wir die gleiche ID hätten wie im Example Content.
5797000
to
c4fd8c9
Compare
@jone Done 👍 |
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.
@raphael-s noch ein kleines Detail, ansonsten finde ichs gut.
class WorkspaceRoot(Item, TranslatedTitleMixin): | ||
implements(IWorkspaceRoot) | ||
|
||
Title = TranslatedTitleMixin.Title |
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.
@raphael-s mich hat schon vorher irritiert wie die Reihenfolge der vererbten Klasse ist; diese Zeile erklärts nun 😉
Ich schlage vor, dass du diese Zeile entfernst und dafür die Reihenfolge der Vererbten Superklassen umkehrst:
-class WorkspaceRoot(Item, TranslatedTitleMixin):
+class WorkspaceRoot(TranslatedTitleMixin, Item):
Die MRO funktioniert so, dass die Klassen links die Klassen rechts überschreiben.
Ich würde dies machen auch wenn die anderen Orte im GEVER nicht so sind. Weil das Umkehren der MRO ist eigentlich korrekt und es hat keine Seiteneffekte.
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.
I changed the order as you requested, now the tests fail. Also the title is no longer translated. Are you sure that the override order is left to right?
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.
Okay, I think I got it now 😄
But the tests are still failing... what am I doing wrong?
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.
6c5543d
to
e357fc7
Compare
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.
Ok then; please rebase 😉
e357fc7
to
f1be433
Compare
Implements a new content type "WorkspaceRoot" which is the folderish parent for workspaces. (Workspace content type will be added later)
closes #3675