Univention Bugzilla – Attachment 7435 Details for
Bug 40528
It should be possible to add links and modules as a shallow copy to an overview category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch code cleanup
40528.patch (text/plain), 1.46 KB, created by
Florian Best
on 2016-01-28 15:10:42 CET
(
hide
)
Description:
patch code cleanup
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-01-28 15:10:42 CET
Size:
1.46 KB
patch
obsolete
>diff --git a/management/univention-management-console/src/univention/management/console/module.py b/management/univention-management-console/src/univention/management/console/module.py >index 45b25e6..b7c8353 100644 >--- a/management/univention-management-console/src/univention/management/console/module.py >+++ b/management/univention-management-console/src/univention/management/console/module.py >@@ -252,6 +252,13 @@ def merge(self, other): > self.commands.append(command) > > >+class Link(Module): >+ >+ @property >+ def id(self): >+ return '__link-%s' % super(Link, self).id >+ >+ > class XML_Definition(ET.ElementTree): > > '''container for the interface description of a module''' >@@ -278,10 +285,7 @@ def keywords(self): > > @property > def id(self): >- if self.root.tag == 'link': >- return '__link-%s' % self.root.get('id') >- else: >- return self.root.get('id') >+ return self.root.get('id') > > @property > def priority(self): >@@ -340,7 +344,11 @@ def commands(self): > yield command.get('name') > > def get_module(self): >- return Module(self.id, self.name, self.url, self.description, self.icon, self.categories, self.flavors, priority=self.priority, keywords=self.keywords) >+ cls = { >+ 'module': Module, >+ 'link': Link, >+ }.get(self.root.tag, Module) >+ return cls(self.id, self.name, self.url, self.description, self.icon, self.categories, self.flavors, priority=self.priority, keywords=self.keywords) > > def get_flavor(self, name): > '''Retrieves details of a flavor'''
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 40528
:
7434
| 7435 |
7451
|
7462