Show
Ignore:
Timestamp:
05/02/08 16:47:16 (23 months ago)
Author:
JensDiemer
Message:

update preferences:

  • move the preferences form from the plugin module into the plugin config modul
  • a plugin must not use try...except to get the preferences
  • update all modules around the plugin install/deinstall etc.
  • detect_page used the system_settings "index_page" value (setup a other default index page works!)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/plugins_internal/preference_editor/preference_editor.py

    r1549 r1551  
    1111    ~~~~~~~~~~~~~~~~~ 
    1212    $LastChangedDate$ 
    13     $Rev$ 
    14     $Author$ 
     13    $Rev:1549 $ 
     14    $Author:JensDiemer $ 
    1515 
    1616    :copyleft: 2008 by the PyLucid team. 
     
    4040        Display the sub menu 
    4141        """ 
    42 #        self.context["PAGE"].title = _("Preferences editor") 
     42        plugins = Plugin.objects.exclude(pref_data_string__isnull=True) 
    4343 
    44         items = [] 
    45         plugins = Plugin.objects.all() 
     44        # Add edit link 
    4645        for plugin in plugins: 
    47             if plugin.pref_data_string == None: 
    48                 continue 
    49  
    5046            edit_link = self.URLs.methodLink("edit", args=plugin.id) 
    51  
    52             items.append({ 
    53                 "plugin_name": unicode(plugin), 
    54                 "plugin_description": plugin.description, 
    55                 "edit_link": edit_link, 
    56             }) 
     47            plugin.edit_link = edit_link 
    5748 
    5849        context = { 
    59             "preferences": items, 
    60             "admin_link": self.URLs.adminLink("PyLucid/preference"), 
     50            "plugins": plugins, 
     51            "admin_link": self.URLs.adminLink("PyLucid/Plugin"), 
    6152        } 
    6253        self._render_template("select", context)#, debug=True)