Mercurial > kallithea
comparison rhodecode/controllers/admin/settings.py @ 3904:fe053a42c4ce beta
added dashboard items config in visual settings
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 28 May 2013 16:57:24 +0200 |
parents | 1e5bb8ed77d6 |
children | 36f7562a5919 |
comparison
equal
deleted
inserted
replaced
3903:ddd05df2aced | 3904:fe053a42c4ce |
---|---|
181 prefix_error=False, | 181 prefix_error=False, |
182 encoding="UTF-8" | 182 encoding="UTF-8" |
183 ) | 183 ) |
184 | 184 |
185 try: | 185 try: |
186 #TODO: rewrite this to something less ugly | |
186 sett1 = RhodeCodeSetting.get_by_name_or_create('show_public_icon') | 187 sett1 = RhodeCodeSetting.get_by_name_or_create('show_public_icon') |
187 sett1.app_settings_value = \ | 188 sett1.app_settings_value = \ |
188 form_result['rhodecode_show_public_icon'] | 189 form_result['rhodecode_show_public_icon'] |
189 Session().add(sett1) | 190 Session().add(sett1) |
190 | 191 |
200 | 201 |
201 sett4 = RhodeCodeSetting.get_by_name_or_create('repository_fields') | 202 sett4 = RhodeCodeSetting.get_by_name_or_create('repository_fields') |
202 sett4.app_settings_value = \ | 203 sett4.app_settings_value = \ |
203 form_result['rhodecode_repository_fields'] | 204 form_result['rhodecode_repository_fields'] |
204 Session().add(sett4) | 205 Session().add(sett4) |
206 | |
207 sett5 = RhodeCodeSetting.get_by_name_or_create('dashboard_items') | |
208 sett5.app_settings_value = \ | |
209 form_result['rhodecode_dashboard_items'] | |
210 Session().add(sett5) | |
205 | 211 |
206 Session().commit() | 212 Session().commit() |
207 set_rhodecode_config(config) | 213 set_rhodecode_config(config) |
208 h.flash(_('Updated visualisation settings'), | 214 h.flash(_('Updated visualisation settings'), |
209 category='success') | 215 category='success') |