comparison MoinMoin/themes/__init__.py @ 2482:f50f7d1cbf14

Fixes non-display of delete, destroy, other item actions, variable value was being overwritten
author sharky93 <rishabhr123@gmail.com>
date Sat, 14 Sep 2013 18:15:37 +0530
parents a17476268e7a
children d29bfd06cd8c
comparison
equal deleted inserted replaced
2481:76098dbcb43c 2482:f50f7d1cbf14
167 for sub_item_name in app.cfg.supplementation_item_names: 167 for sub_item_name in app.cfg.supplementation_item_names:
168 current_sub = item_name.rsplit('/', 1)[-1] 168 current_sub = item_name.rsplit('/', 1)[-1]
169 if current_sub not in app.cfg.supplementation_item_names: 169 if current_sub not in app.cfg.supplementation_item_names:
170 supp_name = '%s/%s' % (item_name, sub_item_name) 170 supp_name = '%s/%s' % (item_name, sub_item_name)
171 if flaskg.storage.has_item(supp_name) or flaskg.user.may.write(supp_name): 171 if flaskg.storage.has_item(supp_name) or flaskg.user.may.write(supp_name):
172 exists = self.storage.has_item(supp_name) 172 subitem_exists = self.storage.has_item(supp_name)
173 href = url_for('frontend.show_item', item_name=supp_name) 173 href = url_for('frontend.show_item', item_name=supp_name)
174 label = _(sub_item_name) 174 label = _(sub_item_name)
175 title = None 175 title = None
176 176
177 item_navigation.append((endpoint, href, iconcls, label, title, exists)) 177 item_navigation.append((endpoint, href, iconcls, label, title, subitem_exists))
178 else: 178 else:
179 href = url_for(endpoint, item_name=item_name) 179 href = url_for(endpoint, item_name=item_name)
180 item_navigation.append((endpoint, href, iconcls, label, title, True)) 180 item_navigation.append((endpoint, href, iconcls, label, title, True))
181 181
182 return user_actions, item_navigation, item_actions 182 return user_actions, item_navigation, item_actions