Issue #106 open
Guillaume Englert
created an issue

Successor of the blocks system:

  • simpler templates and more powerful templatetags.
  • smarter reloading system (factorised URL, dependencies on client-side...).
  • new look 'n feel.

Comments (89)

  1. Guillaume Englert reporter

    refs #106 New bricks system (successors of creme-blocks) introduced.

    Based of a prototype from @Rémy Rakic & @Florian Fabre .

    On the user side: - the global look & feel has been reworked. The new HTML is much better/clean, and a new CSS style has been written. - the title bar is now a brick/block. It can be reloaded if some changes happen, & alternative bricks can be proposed ('card' style). - the smarter reloading system avoids some old strange (but generally not noticed) beahviours ; and it avoids to reload the whole page even more often.

    On developper side: - the reloading URL is now stored once in the page (by the view), and bricks do not have to set their own URL (which was stupid because all blocks on a page should use the same URL). - you register brick classes, instead of blocks instances. So the registry can bring fresh instances of bricks ; this is used by the new reloading system which allows to send additional data (by bricks) during a reloading. - the new action system (in JavaScript) provides a powerful way to write code for 'buttons' (in bricks, but not only). - the new templates files are simpler (less copy-pasted HTML) ; they use better the {% block %} feature of django templates (so they are more factorised/factorisable).

    API breaking: - models.block.BlockDetailviewLocation.create_4_model_block() is deprecated ; use create_4_model_brick() instead. - models.block.BlockMypageLocation.block_verbose_name is deprecated ; use brick_verbose_name instead. - models.block.InstanceBlockConfigItem.block is deprecated ; use "brick" instead. - models.block.CustomBlockConfigItem.id_from_block_id() is deprecated ; use id_from_brick_id() instead. - models.block.BlockState: - The property 'classes' is deprecated ; use the templatetag creme_bricks.brick_state_classes instead. - The method get_for_block_id() is deprecated ; use get_for_brick_id() instead. - The method get_for_block_ids() is deprecated ; use get_for_brick_ids() instead. - The context processor "creme.creme_core.context_processor.get_blocks_manager" is deprecated ; use "creme.creme_core.context_processor.get_bricks_manager" in your settings instead. - The method apps.CremeCoreConfig.register_blocks() has been renamed register_bricks(). - The method apps.CremeAppConfig.register_blocks() has been renamed register_bricks() ; but if you inherit this class, your old method "register_blocks()" will still be automatically called at started (but it is deprecated, & you should rename it). - The constructor (init) of Brick (aliased to Block for compatibility) should be called of you set one to your Brick class. - These modules are deprecated: - creme_core.blocks (use creme_core.bricks instead). - creme_core.gui.block (use creme_core.gui.bricks instead). - creme_core.models.block (use creme_core.models.bricks instead). - creme_core.views.blocks (use creme_core.views.bricks instead). - creme_core.gui.icon_registry (use creme_core.gui.icons instead). - The module creme_core.tests.gui.test_block has been renamed 'test_bricks'. - In Brick/PaginatedBrick/QuerysetBrick: get_block_template_context() is deprecated ; use get_template_context() instead. - creme_core.gui.bricks.BricksManager - block_is_registered() is deprecated ; use brick_is_registered() instead. - get_state(): the argument 'block_id' has been renamed brick_id. - (internal) The attributes 'blocks' & '_blocks_groups' have been renamed '_bricks' & '_bricks_groups'. - creme_core.gui.bricks._BrickRegistry (aliased to creme_core.gui.block._BlockRegistry): - get_blocks() is deprecated ; use get_bricks() instead. - get_block_4_instance() is deprecated ; use get_brick_4_instance() instead. - get_block_4_object() is deprecated ; use get_brick_4_object() instead. - get_compatible_blocks() is deprecated ; use get_compatible_bricks() instead. - register() & register_4_model(): registering brick instances is deprecated ; register brick classes instead. - register_4_model() the argument 'block' has been renamed 'brick_class'. An registered bricks should have an id == None. - get_compatible_blocks() is deprecated ; use get_compatible_bricks() instead (beware: it returns object-block too). - (internal) generate_modelblock_id() has been renamed _generate_modelblock_id(). - The blocks of creme_core use now templates files in 'creme_core/bricks/'. - The view /creme_core/search/reload_block/{{block_id}}/{{search}} is now deprecated. Use /creme_core/search/reload_brick/ view instead. - The view /creme_core/property/type/{{pt_id}}/reload_block/{{block_id}} is now deprecated. Use /creme_core/property/type/{{pt_id}}/reload_bricks/ view instead [ie: reverse('creme_core__reload_ptype_bricks', args=(ptype.id,)) ]. - The templatetags library "creme_block" is deprecated ; you should use the tags of "creme_bricks" instead. - The method creme_core.gui.icons.IconRegistry.get() is deprecated ; use IconRegistry.get_4_model() instead. - creme_core.constants.ICON_SIZE_MAP is deprecated. - The button creme_core.buttons.MergeEntitiesButton is deprecated (& the related template too). - The templatetag library 'creme_block' is deprecated : use 'creme_bricks' instead. - In templatetag library 'creme_widgets': - {% get_image_for_ctype ... %} & {% get_image_path_for_ctype ... %} are deprecated ; use {% widget_icon_for_ctype ... %} instead. - {% get_image_for_object ... %} is deprecated ; use {% widget_icon_for_object ... %} instead. - _get_image_path_for_model() & _get_image_for_model() are deprecated. - {% get_add_button %} is deprecated. - {% get_edit_button %} is deprecated (& its template too). - {% get_delete_button %} is deprecated (& its template too). - {% get_restore_button %} is deprecated (& its template too). - {% get_clone_button %} is deprecated (& its template too). - The templatetag library 'creme_queryset' is deprecated ; so its filter only 'order_by' is deprecated. - The templatetag{% get_listview_cell %} (from lib creme_listview) is deprecated ; use {% render_cell %} (from lib creme_cells) instead. - The <body> of the pages should now have an attribute 'data-bricks-reload-url' which contains the URL for relaoding the blocks/bricks. - Template files creme_core/templatetags/block.html are now deprecated. - base.html: {% block bodyclass %} has been removed ; use {% block body_classes %} instead (beware, you have to remove 'class="'). - detailview.html: - The <div> for buttons have changed theur CSS class: 'model_buttons' became 'global-buttons', 'file_buttons' became 'instance-buttons'. - The class 'zone_spacer_5px' is not used anymore; related <div> have been removed. - Several template {% blocks %} have been removed: - 'add_new_button' (use 'global_buttons' + {{block.super}} instead). - 'entity_buttons' (use 'title_buttons' instead). - 'end_button_tab'. - 'creme_blocks_import'. - 'detail_view_{top|left|right|bottom}{1|2}' (replaced by 'detail_view{top|left|right|bottom}'). - view_entity.html: In you override some block ('title', 'logo', 'entity_buttons'), you have to use the header brick feature instead (by creating your own or override an existing one). - JS: - creme.utils -> these functions are deprecated: - toggleCheckallState() - autoCheckallState() - decorateSearchResult() - creme.blocks: this lib is globally deprecated (bindEvents() is not yet deprecated because it is still used for compatibility purpose). - creme.relations.addRelationTo(): the option "blockReloadUrl" is deprecated ; remove it, so the Bricks will be automatically to reloaded. - creme.lv_widget.selectOtherEntityNRedirect() is deprecated (update: messages for undefined URLs have been removed). - (internal) These attributes of creme_core.gui.bricks._BrickRegistry (aliased to creme_core.gui.block._BlockRegistry) have been renamed: - _blocks became _brick_classes. - _object_blocks became _object_bricks. - _instance_block_classes became _instance_brick_classes. - (internal) The internal class in views.creme_property have been renamed from Block into *Brick. - (internal) The internal class views.search.FoundEntitiesBlock has been renamed FoundEntitiesBrick. - (internal) views.creme_property.TaggedEntitiesBrick: 'short_title' & 'title' variables are not injected in the context anymore. - (internal) views.search.FoundEntitiesBrick: 'short_title' & 'title' variables are not injected in the context anymore.

    → <<cset de9608300742>>

  2. Guillaume Englert reporter

    refs #106 #46 Bricks system for 'creme_config'.

    API breaking: - The method apps.CremeConfigConfig.register_blocks() has been renamed register_bricks(). - The view creme_config.views.setting.reload_block() is deprecated ; use creme_config.views.generic_views.reload_app_bricks() instead. - The view creme_config.views.custom_fields.view() has been removed. - The view creme_config.views.generic_views.portal_app(): the context variable 'app_config_blocks' has been renamed 'app_config_bricks'. - generics_views: - The view portal_model() does not inject the variable 'model_name' in the template context anymore. - The view swap_order() is deprecated ; use reorder() instead. - The view reload_block() is deprecated ; use reload_brick() instead. - These modules are deprecated: - creme_config.blocks (use creme_config.bricks instead). - creme_config.views.blocks (use creme_config.views.bricks instead). - creme_config.forms.blocks (use creme_config.forms.bricks instead). - These views of 'bricks' (available via deprecated 'blocks' name too) are deprecated: - add_relation_block() (use create_rtype_brick() instead). - edit_ctype_of_relation_block() (use edit_cells_of_rtype_brick() instead). - edit_custom_block() (use edit_custom_brick() instead). - delete_ctype_of_relation_block() (use delete_cells_of_rtype_brick() instead). - delete_relation_block() (use delete_rtype_brick() instead). - delete_instance_block() (use delete_instance_brick() instead). - delete_custom_block() (use delete_custom_brick() instead). - The module tests/test_blocks.py has been renamed test_bricks.py - The block CustomFieldsPortalBlock is deprecated. - The block CustomFieldsBlock & its instance custom_fields_block have been removed. - In the block GenericModelsBlock, these injected context variable are deprecated: fields, many_to_many, colspan. - The template files templatetags/block_ & custom_fields/ are deprecated. The template file "creme/creme_config/templates/creme_config/blocks_portal.html" is deprecated ; use bricks_portal.html instead. - The templatetags {% import_usersettings_blocks %} & {% do_usersettings_blocks_displayer %} are deprecated. - The variable urls.blocks_patterns is deprecated ; use urls.bricks_patterns instead. - registry.AppConfigRegistry: - register_block() is deprecated ; use register_brick() instead. - The property 'blocks' is deprecated ; use 'bricks' instead (beware it returns an iterator). - (internal) _blocks is renamed _bricks_classes. - registry._ConfigRegistry: - register_blocks() is deprecated ; use register_bricks() instead. - register_userblocks() is deprecated ; use register_user_bricks() instead. - register_bricks() & register_user_bricks(): registering brick instances is deprecated ; register brick classes instead. It means that in your creme_config_register.py, 'userblocks_to_register' should now contain classes (& not instances anymore). - The property 'userblocks' is deprecated ; use 'user_bricks' instead. - (internal) _block_registry is renamed _brick_registry. - (internal) _userblocks is renamed _user_brick_classes. - (internal) tests.test_bricks: some internal method renamed. - (internal) forms.bricks._BrickLocationsForm._save_locations(): argument 'blocks_partitions' is renamed 'bricks_partitions'.

    → <<cset a5ad7b5f181c>>

  3. Guillaume Englert reporter

    refs #106 #37 Bricks system for 'documents'.

    API breaking: - The method apps.DocumentsConfig.register_blocks() has been renamed register_bricks(). - The module documents.blocks is deprecated ; use documents.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 627eee690650>>

  4. Guillaume Englert reporter

    refs #106 Bricks system for 'assistants'.

    API breaking: - The method apps.AssistantsConfig.register_blocks() has been renamed register_bricks(). - The blocks use now template files which are in 'assistants/bricks/'. - The templates files 'assistants/block_*.html' are deprecated. - The module assistants.blocks is deprecated ; use assistants.bricks instead. - JavaScript: creme.assistants.validateEntity() is deprecated ; use the new brick action system instead.

    → <<cset b417c2dba6e4>>

  5. Guillaume Englert reporter

    refs #106 #23 Bricks system for 'persons'.

    API breaking: - The method apps.PersonsConfig.register_blocks() has been renamed register_bricks(). - The module persons.blocks is deprecated ; use persons.bricks instead. - The module persons.tests.test_blocks has been renamed test_bricks. - The templates files templatetags/blocks_* are deprecated. - (internal) The function persons.tests.test_bricks.find_node_by_attr() has been removed.

    → <<cset 6ece1e923762>>

  6. Guillaume Englert reporter

    refs #106 #18 Bricks system for 'activities'.

    API breaking: - The method AbstractActivity.count_lines_display_block() is deprecated. - The method apps.ActivitiesConfig.register_blocks() has been renamed register_bricks(). - The templatetag library "activities_tag" is deprecated. - The templates files creme/activities/templates/activities/templatetags/block_*.html are deprecated. - These modules are deprecated: - activities.blocks (use activities.bricks instead). - activities.views.blocks (use activities.views.bricks instead). - activities.forms.blocks (use activities.forms.bricks instead).

    → <<cset a0965e3efb3c>>

  7. Guillaume Englert reporter

    refs #106 #22 Bricks system for 'graphs'.

    API breaking: - The method apps.GraphsConfig.register_blocks() has been renamed register_bricks(). - The module graphs.blocks is deprecated ; use graphs.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 43307032c5b5>>

  8. Guillaume Englert reporter

    refs #106 #13 Bricks system for 'reports'.

    API breaking: - The method apps.ReportsConfig.register_blocks() has been renamed register_bricks(). - The view function reports.views.report.change_field_order() is deprecated ; use reorder_field() instead. - The module reports.blocks is deprecated ; use reports.bricks instead. - Templates files templatetags/blocks_* are deprecated. - JS: - creme.reports.changeOrder() is deprecated ; use the new bricks ordering system instead. - creme.reports.unlink_report() is deprecated ; use the new bricks action system instead. - creme.reports.setSelected() is deprecated. - creme.reports.doAjaxAction() is deprecated ; use bricks & actions instead. - creme.reports.openGraphEdition() is deprecated ; use bricks & actions instead.

    → <<cset 29e8899805ee>>

  9. Guillaume Englert reporter

    refs #106 #52 Bricks system for 'products'.

    API breaking: - The method apps.ProductsConfig.register_blocks() has been renamed register_bricks(). - The module products.blocks is deprecated ; use products.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset e13410faafa9>>

  10. Guillaume Englert reporter

    refs #106 #19 Bricks system for 'billing'.

    API breaking: - The method apps.BillingConfig.register_blocks() has been renamed register_bricks(). - The templates files templatetags/blocks_* are deprecated ; frags/generic_billing_line_frag.html too. - The detailed views do not inject a variable 'can_download' in the context any more. - In blocks: - they use now templates files in 'billing/bricks/' etc... - _ReceivedBillingDocumentsBlock & its child classes: _title & _title_plural use now a format with brackets (ie: %s => {count}). - The module billing.blocks is deprecated ; use billing.bricks instead. - JavaScript: - creme.billing.initBlockLines() has been renamed creme.billing.initLineBrick(). - creme.billing.multiSaveLines() is deprecated ; use the new brick action "billing-line-saveall" instead.

    → <<cset b6745b77007d>>

  11. Guillaume Englert reporter

    refs #106 #25 Bricks system for 'opportunities'.

    API breaking: - The method apps.OpportunitiesConfig.register_blocks() has been renamed register_bricks(). - The module opportunities.blocks is deprecated ; use opportunities.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 0deff77e5bc0>>

  12. Guillaume Englert reporter

    refs #106 #35 Bricks system for 'commercial'.

    API breaking: - The method apps.CommercialConfig.register_blocks() has been renamed register_bricks(). - The reloading views for blocks in views/strategy are deprecated: - reload_assets_matrix(). - reload_charms_matrix(). - reload_assets_charms_matrix(). - The module commercial.blocks is deprecated ; use commercial.bricks instead. - These templatetags are deprecated: - {% get_segments_for_category %}: use {% commercial_segments_for_category %} instead. - {% widget_segment_category %} (& its related template 'widget_category.html' too). - {% widget_asset_score %}: use {% commercial_widget_asset_score %} instead. - {% widget_charm_score %}: use {% commercial_widget_charm_score %} instead. - These templates files are deprecated: - templatetags/blocks_* - creme/commercial/templates/commercial/templatetags/widget_score.html - JavaScript: - creme.commercial.postCategory() is deprecated (use bricks actions instead). - creme.commercial.increaseObjectiveCounter() is deprecated (idem). - creme.commercial.postScore() is deprecated (use setScore() & bricks actions instead).

    → <<cset e266e0e06b1e>>

  13. Guillaume Englert reporter

    refs #106 #32 Bricks system for 'events'.

    API breaking: - The method apps.EventsConfig.register_blocks() has been renamed register_bricks(). - The module events.blocks is deprecated ; use events.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 110496581dd8>>

  14. Guillaume Englert reporter

    refs #106 #26 Bricks system for 'crudity'.

    API breaking: - The module crudity.blocks is deprecated ; use crudity.bricks instead. - The method CrudityInput.handle() returns a backend instance or None (instead of a boolean). So the handling methods (create() etc...) of child classes must return a backend/None. - These functions of crudity.views.actions are deprecated: - fetch(). - fetch(): use crudity_registry.fetch() instead. - reload_block(): use crudity.views.actions.reload_bricks() instead. - crudity.views.history.reload() is deprecated ; use crudity.views.history.reload_bricks() instead. - These templates files are deprecated: - creme/crudity/templates/templatetags/blocks* - creme/crudity/templates/crudity/frags/ajax/waiting_actions.html - creme/crudity/templates/crudity/waiting_actions.html

    → <<cset d2418cfe8ecf>>

  15. Guillaume Englert reporter

    refs #106 #6 Bricks system for 'emails'.

    API breaking: - The method apps.Emails.register_blocks() has been renamed register_bricks(). - The module emails.blocks is deprecated ; use emails.bricks instead. - These views are deprecated. - emails.views.crudity.reload_sync_blocks(): use reload_bricks() instead. - emails.views.sending.reload_block_mails(): use reload_mails_brick() instead. - These templates files are deprecated: - templatetags/blocks_* - creme/emails/templates/emails/frags/ajax/synchronize.html - MailsHistoryBrick: the context variable "rtypes" is deprecated ; use "rtype_ids" instead. - JavaScript: - creme.emails.allowExternalImages() is deprecated ; use the action "email-toggle-images" instead. - creme.emails.confirmResend() & creme.emails.resend() are deprecated ; use an action with the url "emails__resend_emails" instead.

    → <<cset 9a4ee1922e10>>

  16. Guillaume Englert reporter

    refs #106 #100 Bricks system for 'sms'.

    API breaking: - The method apps.SMSConfig.register_blocks() has been renamed register_bricks(). - The module sms.blocks is deprecated ; use sms.bricks instead. - The function sms.views.sending.reload_block_messages() is deprecated ; use reload_messages_brick() instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 0391d18be206>>

  17. Guillaume Englert reporter

    refs #106 #51 Bricks system for 'projects'.

    API breaking: - The method apps.ProductsConfig.register_blocks() has been renamed register_bricks(). - The module projects.blocks is deprecated ; use projects.bricks instead. - The template file frag_task_delay_td.html is deprecated. - Templates files templatetags/blocks_* are deprecated.

    → <<cset 14c0087b8e86>>

  18. Guillaume Englert reporter

    refs #106 #41 Bricks system for 'tickets'.

    API breaking: - The method apps.TicketsConfig.register_blocks() has been renamed register_bricks(). - The module tickets.blocks is deprecated ; use tickets.bricks instead. - The template file templatetags/blocks_ticket.html is deprecated.

    → <<cset 2ea213190864>>

  19. Guillaume Englert reporter

    refs #106 #28 Bricks system for 'activesync'.

    API breaking: - The module activesync.blocks is deprecated ; use activesync.bricks instead. - The method apps.ActivesyncConfig.register_blocks() has been renamed register_bricks(). - The view activesync.views.sync.main_sync() is deprecated ; use sync_portal() instead. - These templates files are deprecated: - creme/activesync/templates/activesync/main_sync.html - creme/activesync/templates/activesync/frags/ajax/main_sync.html

    → <<cset a102e978ef82>>

  20. Guillaume Englert reporter

    refs #106 New bricks system (successors of creme-blocks) introduced.

    Based of a prototype from @Rémy Rakic & @Florian Fabre .

    On the user side: - the global look & feel has been reworked. The new HTML is much better/clean, and a new CSS style has been written. - the title bar is now a brick/block. It can be reloaded if some changes happen, & alternative bricks can be proposed ('card' style). - the smarter reloading system avoids some old strange (but generally not noticed) beahviours ; and it avoids to reload the whole page even more often.

    On developper side: - the reloading URL is now stored once in the page (by the view), and bricks do not have to set their own URL (which was stupid because all blocks on a page should use the same URL). - you register brick classes, instead of blocks instances. So the registry can bring fresh instances of bricks ; this is used by the new reloading system which allows to send additional data (by bricks) during a reloading. - the new action system (in JavaScript) provides a powerful way to write code for 'buttons' (in bricks, but not only). - the new templates files are simpler (less copy-pasted HTML) ; they use better the {% block %} feature of django templates (so they are more factorised/factorisable).

    API breaking: - models.block.BlockDetailviewLocation.create_4_model_block() is deprecated ; use create_4_model_brick() instead. - models.block.BlockMypageLocation.block_verbose_name is deprecated ; use brick_verbose_name instead. - models.block.InstanceBlockConfigItem.block is deprecated ; use "brick" instead. - models.block.CustomBlockConfigItem.id_from_block_id() is deprecated ; use id_from_brick_id() instead. - models.block.BlockState: - The property 'classes' is deprecated ; use the templatetag creme_bricks.brick_state_classes instead. - The method get_for_block_id() is deprecated ; use get_for_brick_id() instead. - The method get_for_block_ids() is deprecated ; use get_for_brick_ids() instead. - The context processor "creme.creme_core.context_processor.get_blocks_manager" is deprecated ; use "creme.creme_core.context_processor.get_bricks_manager" in your settings instead. - The method apps.CremeCoreConfig.register_blocks() has been renamed register_bricks(). - The method apps.CremeAppConfig.register_blocks() has been renamed register_bricks() ; but if you inherit this class, your old method "register_blocks()" will still be automatically called at started (but it is deprecated, & you should rename it). - The constructor (init) of Brick (aliased to Block for compatibility) should be called of you set one to your Brick class. - These modules are deprecated: - creme_core.blocks (use creme_core.bricks instead). - creme_core.gui.block (use creme_core.gui.bricks instead). - creme_core.models.block (use creme_core.models.bricks instead). - creme_core.views.blocks (use creme_core.views.bricks instead). - creme_core.gui.icon_registry (use creme_core.gui.icons instead). - The module creme_core.tests.gui.test_block has been renamed 'test_bricks'. - In Brick/PaginatedBrick/QuerysetBrick: get_block_template_context() is deprecated ; use get_template_context() instead. - creme_core.gui.bricks.BricksManager - block_is_registered() is deprecated ; use brick_is_registered() instead. - get_state(): the argument 'block_id' has been renamed brick_id. - (internal) The attributes 'blocks' & '_blocks_groups' have been renamed '_bricks' & '_bricks_groups'. - creme_core.gui.bricks._BrickRegistry (aliased to creme_core.gui.block._BlockRegistry): - get_blocks() is deprecated ; use get_bricks() instead. - get_block_4_instance() is deprecated ; use get_brick_4_instance() instead. - get_block_4_object() is deprecated ; use get_brick_4_object() instead. - get_compatible_blocks() is deprecated ; use get_compatible_bricks() instead. - register() & register_4_model(): registering brick instances is deprecated ; register brick classes instead. - register_4_model() the argument 'block' has been renamed 'brick_class'. An registered bricks should have an id == None. - get_compatible_blocks() is deprecated ; use get_compatible_bricks() instead (beware: it returns object-block too). - (internal) generate_modelblock_id() has been renamed _generate_modelblock_id(). - The blocks of creme_core use now templates files in 'creme_core/bricks/'. - The view /creme_core/search/reload_block/{{block_id}}/{{search}} is now deprecated. Use /creme_core/search/reload_brick/ view instead. - The view /creme_core/property/type/{{pt_id}}/reload_block/{{block_id}} is now deprecated. Use /creme_core/property/type/{{pt_id}}/reload_bricks/ view instead [ie: reverse('creme_core__reload_ptype_bricks', args=(ptype.id,)) ]. - The templatetags library "creme_block" is deprecated ; you should use the tags of "creme_bricks" instead. - The method creme_core.gui.icons.IconRegistry.get() is deprecated ; use IconRegistry.get_4_model() instead. - creme_core.constants.ICON_SIZE_MAP is deprecated. - The button creme_core.buttons.MergeEntitiesButton is deprecated (& the related template too). - The templatetag library 'creme_block' is deprecated : use 'creme_bricks' instead. - In templatetag library 'creme_widgets': - {% get_image_for_ctype ... %} & {% get_image_path_for_ctype ... %} are deprecated ; use {% widget_icon_for_ctype ... %} instead. - {% get_image_for_object ... %} is deprecated ; use {% widget_icon_for_object ... %} instead. - _get_image_path_for_model() & _get_image_for_model() are deprecated. - {% get_add_button %} is deprecated. - {% get_edit_button %} is deprecated (& its template too). - {% get_delete_button %} is deprecated (& its template too). - {% get_restore_button %} is deprecated (& its template too). - {% get_clone_button %} is deprecated (& its template too). - The templatetag library 'creme_queryset' is deprecated ; so its filter only 'order_by' is deprecated. - The templatetag{% get_listview_cell %} (from lib creme_listview) is deprecated ; use {% render_cell %} (from lib creme_cells) instead. - The <body> of the pages should now have an attribute 'data-bricks-reload-url' which contains the URL for relaoding the blocks/bricks. - Template files creme_core/templatetags/block.html are now deprecated. - base.html: {% block bodyclass %} has been removed ; use {% block body_classes %} instead (beware, you have to remove 'class="'). - detailview.html: - The <div> for buttons have changed theur CSS class: 'model_buttons' became 'global-buttons', 'file_buttons' became 'instance-buttons'. - The class 'zone_spacer_5px' is not used anymore; related <div> have been removed. - Several template {% blocks %} have been removed: - 'add_new_button' (use 'global_buttons' + {{block.super}} instead). - 'entity_buttons' (use 'title_buttons' instead). - 'end_button_tab'. - 'creme_blocks_import'. - 'detail_view_{top|left|right|bottom}{1|2}' (replaced by 'detail_view{top|left|right|bottom}'). - view_entity.html: In you override some block ('title', 'logo', 'entity_buttons'), you have to use the header brick feature instead (by creating your own or override an existing one). - JS: - creme.utils -> these functions are deprecated: - toggleCheckallState() - autoCheckallState() - decorateSearchResult() - creme.blocks: this lib is globally deprecated (bindEvents() is not yet deprecated because it is still used for compatibility purpose). - creme.relations.addRelationTo(): the option "blockReloadUrl" is deprecated ; remove it, so the Bricks will be automatically to reloaded. - creme.lv_widget.selectOtherEntityNRedirect() is deprecated (update: messages for undefined URLs have been removed). - (internal) These attributes of creme_core.gui.bricks._BrickRegistry (aliased to creme_core.gui.block._BlockRegistry) have been renamed: - _blocks became _brick_classes. - _object_blocks became _object_bricks. - _instance_block_classes became _instance_brick_classes. - (internal) The internal class in views.creme_property have been renamed from Block into *Brick. - (internal) The internal class views.search.FoundEntitiesBlock has been renamed FoundEntitiesBrick. - (internal) views.creme_property.TaggedEntitiesBrick: 'short_title' & 'title' variables are not injected in the context anymore. - (internal) views.search.FoundEntitiesBrick: 'short_title' & 'title' variables are not injected in the context anymore.

    → <<cset de9608300742>>

  21. Guillaume Englert reporter

    refs #106 #46 Bricks system for 'creme_config'.

    API breaking: - The method apps.CremeConfigConfig.register_blocks() has been renamed register_bricks(). - The view creme_config.views.setting.reload_block() is deprecated ; use creme_config.views.generic_views.reload_app_bricks() instead. - The view creme_config.views.custom_fields.view() has been removed. - The view creme_config.views.generic_views.portal_app(): the context variable 'app_config_blocks' has been renamed 'app_config_bricks'. - generics_views: - The view portal_model() does not inject the variable 'model_name' in the template context anymore. - The view swap_order() is deprecated ; use reorder() instead. - The view reload_block() is deprecated ; use reload_brick() instead. - These modules are deprecated: - creme_config.blocks (use creme_config.bricks instead). - creme_config.views.blocks (use creme_config.views.bricks instead). - creme_config.forms.blocks (use creme_config.forms.bricks instead). - These views of 'bricks' (available via deprecated 'blocks' name too) are deprecated: - add_relation_block() (use create_rtype_brick() instead). - edit_ctype_of_relation_block() (use edit_cells_of_rtype_brick() instead). - edit_custom_block() (use edit_custom_brick() instead). - delete_ctype_of_relation_block() (use delete_cells_of_rtype_brick() instead). - delete_relation_block() (use delete_rtype_brick() instead). - delete_instance_block() (use delete_instance_brick() instead). - delete_custom_block() (use delete_custom_brick() instead). - The module tests/test_blocks.py has been renamed test_bricks.py - The block CustomFieldsPortalBlock is deprecated. - The block CustomFieldsBlock & its instance custom_fields_block have been removed. - In the block GenericModelsBlock, these injected context variable are deprecated: fields, many_to_many, colspan. - The template files templatetags/block_ & custom_fields/ are deprecated. The template file "creme/creme_config/templates/creme_config/blocks_portal.html" is deprecated ; use bricks_portal.html instead. - The templatetags {% import_usersettings_blocks %} & {% do_usersettings_blocks_displayer %} are deprecated. - The variable urls.blocks_patterns is deprecated ; use urls.bricks_patterns instead. - registry.AppConfigRegistry: - register_block() is deprecated ; use register_brick() instead. - The property 'blocks' is deprecated ; use 'bricks' instead (beware it returns an iterator). - (internal) _blocks is renamed _bricks_classes. - registry._ConfigRegistry: - register_blocks() is deprecated ; use register_bricks() instead. - register_userblocks() is deprecated ; use register_user_bricks() instead. - register_bricks() & register_user_bricks(): registering brick instances is deprecated ; register brick classes instead. It means that in your creme_config_register.py, 'userblocks_to_register' should now contain classes (& not instances anymore). - The property 'userblocks' is deprecated ; use 'user_bricks' instead. - (internal) _block_registry is renamed _brick_registry. - (internal) _userblocks is renamed _user_brick_classes. - (internal) tests.test_bricks: some internal method renamed. - (internal) forms.bricks._BrickLocationsForm._save_locations(): argument 'blocks_partitions' is renamed 'bricks_partitions'.

    → <<cset a5ad7b5f181c>>

  22. Guillaume Englert reporter

    refs #106 #37 Bricks system for 'documents'.

    API breaking: - The method apps.DocumentsConfig.register_blocks() has been renamed register_bricks(). - The module documents.blocks is deprecated ; use documents.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 627eee690650>>

  23. Guillaume Englert reporter

    refs #106 Bricks system for 'assistants'.

    API breaking: - The method apps.AssistantsConfig.register_blocks() has been renamed register_bricks(). - The blocks use now template files which are in 'assistants/bricks/'. - The templates files 'assistants/block_*.html' are deprecated. - The module assistants.blocks is deprecated ; use assistants.bricks instead. - JavaScript: creme.assistants.validateEntity() is deprecated ; use the new brick action system instead.

    → <<cset b417c2dba6e4>>

  24. Guillaume Englert reporter

    refs #106 #23 Bricks system for 'persons'.

    API breaking: - The method apps.PersonsConfig.register_blocks() has been renamed register_bricks(). - The module persons.blocks is deprecated ; use persons.bricks instead. - The module persons.tests.test_blocks has been renamed test_bricks. - The templates files templatetags/blocks_* are deprecated. - (internal) The function persons.tests.test_bricks.find_node_by_attr() has been removed.

    → <<cset 6ece1e923762>>

  25. Guillaume Englert reporter

    refs #106 #18 Bricks system for 'activities'.

    API breaking: - The method AbstractActivity.count_lines_display_block() is deprecated. - The method apps.ActivitiesConfig.register_blocks() has been renamed register_bricks(). - The templatetag library "activities_tag" is deprecated. - The templates files creme/activities/templates/activities/templatetags/block_*.html are deprecated. - These modules are deprecated: - activities.blocks (use activities.bricks instead). - activities.views.blocks (use activities.views.bricks instead). - activities.forms.blocks (use activities.forms.bricks instead).

    → <<cset a0965e3efb3c>>

  26. Guillaume Englert reporter

    refs #106 #22 Bricks system for 'graphs'.

    API breaking: - The method apps.GraphsConfig.register_blocks() has been renamed register_bricks(). - The module graphs.blocks is deprecated ; use graphs.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 43307032c5b5>>

  27. Guillaume Englert reporter

    refs #106 #13 Bricks system for 'reports'.

    API breaking: - The method apps.ReportsConfig.register_blocks() has been renamed register_bricks(). - The view function reports.views.report.change_field_order() is deprecated ; use reorder_field() instead. - The module reports.blocks is deprecated ; use reports.bricks instead. - Templates files templatetags/blocks_* are deprecated. - JS: - creme.reports.changeOrder() is deprecated ; use the new bricks ordering system instead. - creme.reports.unlink_report() is deprecated ; use the new bricks action system instead. - creme.reports.setSelected() is deprecated. - creme.reports.doAjaxAction() is deprecated ; use bricks & actions instead. - creme.reports.openGraphEdition() is deprecated ; use bricks & actions instead.

    → <<cset 29e8899805ee>>

  28. Guillaume Englert reporter

    refs #106 #52 Bricks system for 'products'.

    API breaking: - The method apps.ProductsConfig.register_blocks() has been renamed register_bricks(). - The module products.blocks is deprecated ; use products.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset e13410faafa9>>

  29. Guillaume Englert reporter

    refs #106 #19 Bricks system for 'billing'.

    API breaking: - The method apps.BillingConfig.register_blocks() has been renamed register_bricks(). - The templates files templatetags/blocks_* are deprecated ; frags/generic_billing_line_frag.html too. - The detailed views do not inject a variable 'can_download' in the context any more. - In blocks: - they use now templates files in 'billing/bricks/' etc... - _ReceivedBillingDocumentsBlock & its child classes: _title & _title_plural use now a format with brackets (ie: %s => {count}). - The module billing.blocks is deprecated ; use billing.bricks instead. - JavaScript: - creme.billing.initBlockLines() has been renamed creme.billing.initLineBrick(). - creme.billing.multiSaveLines() is deprecated ; use the new brick action "billing-line-saveall" instead.

    → <<cset b6745b77007d>>

  30. Guillaume Englert reporter

    refs #106 #25 Bricks system for 'opportunities'.

    API breaking: - The method apps.OpportunitiesConfig.register_blocks() has been renamed register_bricks(). - The module opportunities.blocks is deprecated ; use opportunities.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 0deff77e5bc0>>

  31. Guillaume Englert reporter

    refs #106 #35 Bricks system for 'commercial'.

    API breaking: - The method apps.CommercialConfig.register_blocks() has been renamed register_bricks(). - The reloading views for blocks in views/strategy are deprecated: - reload_assets_matrix(). - reload_charms_matrix(). - reload_assets_charms_matrix(). - The module commercial.blocks is deprecated ; use commercial.bricks instead. - These templatetags are deprecated: - {% get_segments_for_category %}: use {% commercial_segments_for_category %} instead. - {% widget_segment_category %} (& its related template 'widget_category.html' too). - {% widget_asset_score %}: use {% commercial_widget_asset_score %} instead. - {% widget_charm_score %}: use {% commercial_widget_charm_score %} instead. - These templates files are deprecated: - templatetags/blocks_* - creme/commercial/templates/commercial/templatetags/widget_score.html - JavaScript: - creme.commercial.postCategory() is deprecated (use bricks actions instead). - creme.commercial.increaseObjectiveCounter() is deprecated (idem). - creme.commercial.postScore() is deprecated (use setScore() & bricks actions instead).

    → <<cset e266e0e06b1e>>

  32. Guillaume Englert reporter

    refs #106 #32 Bricks system for 'events'.

    API breaking: - The method apps.EventsConfig.register_blocks() has been renamed register_bricks(). - The module events.blocks is deprecated ; use events.bricks instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 110496581dd8>>

  33. Guillaume Englert reporter

    refs #106 #26 Bricks system for 'crudity'.

    API breaking: - The module crudity.blocks is deprecated ; use crudity.bricks instead. - The method CrudityInput.handle() returns a backend instance or None (instead of a boolean). So the handling methods (create() etc...) of child classes must return a backend/None. - These functions of crudity.views.actions are deprecated: - fetch(). - fetch(): use crudity_registry.fetch() instead. - reload_block(): use crudity.views.actions.reload_bricks() instead. - crudity.views.history.reload() is deprecated ; use crudity.views.history.reload_bricks() instead. - These templates files are deprecated: - creme/crudity/templates/templatetags/blocks* - creme/crudity/templates/crudity/frags/ajax/waiting_actions.html - creme/crudity/templates/crudity/waiting_actions.html

    → <<cset d2418cfe8ecf>>

  34. Guillaume Englert reporter

    refs #106 #6 Bricks system for 'emails'.

    API breaking: - The method apps.Emails.register_blocks() has been renamed register_bricks(). - The module emails.blocks is deprecated ; use emails.bricks instead. - These views are deprecated. - emails.views.crudity.reload_sync_blocks(): use reload_bricks() instead. - emails.views.sending.reload_block_mails(): use reload_mails_brick() instead. - These templates files are deprecated: - templatetags/blocks_* - creme/emails/templates/emails/frags/ajax/synchronize.html - MailsHistoryBrick: the context variable "rtypes" is deprecated ; use "rtype_ids" instead. - JavaScript: - creme.emails.allowExternalImages() is deprecated ; use the action "email-toggle-images" instead. - creme.emails.confirmResend() & creme.emails.resend() are deprecated ; use an action with the url "emails__resend_emails" instead.

    → <<cset 9a4ee1922e10>>

  35. Guillaume Englert reporter

    refs #106 #100 Bricks system for 'sms'.

    API breaking: - The method apps.SMSConfig.register_blocks() has been renamed register_bricks(). - The module sms.blocks is deprecated ; use sms.bricks instead. - The function sms.views.sending.reload_block_messages() is deprecated ; use reload_messages_brick() instead. - The templates files templatetags/blocks_* are deprecated.

    → <<cset 0391d18be206>>

  36. Guillaume Englert reporter

    refs #106 #51 Bricks system for 'projects'.

    API breaking: - The method apps.ProductsConfig.register_blocks() has been renamed register_bricks(). - The module projects.blocks is deprecated ; use projects.bricks instead. - The template file frag_task_delay_td.html is deprecated. - Templates files templatetags/blocks_* are deprecated.

    → <<cset 14c0087b8e86>>

  37. Guillaume Englert reporter

    refs #106 #41 Bricks system for 'tickets'.

    API breaking: - The method apps.TicketsConfig.register_blocks() has been renamed register_bricks(). - The module tickets.blocks is deprecated ; use tickets.bricks instead. - The template file templatetags/blocks_ticket.html is deprecated.

    → <<cset 2ea213190864>>

  38. Guillaume Englert reporter

    refs #106 #28 Bricks system for 'activesync'.

    API breaking: - The module activesync.blocks is deprecated ; use activesync.bricks instead. - The method apps.ActivesyncConfig.register_blocks() has been renamed register_bricks(). - The view activesync.views.sync.main_sync() is deprecated ; use sync_portal() instead. - These templates files are deprecated: - creme/activesync/templates/activesync/main_sync.html - creme/activesync/templates/activesync/frags/ajax/main_sync.html

    → <<cset a102e978ef82>>

  39. Guillaume Englert reporter

    refs #106 Rename some internal constants.

    API breaking: - (internal) SETTING_BLOCK_DEFAULT_STATE_IS_OPEN & SETTING_BLOCK_DEFAULT_STATE_SHOW_EMPTY_FIELDS are deprecated ; use SETTING_BRICK_DEFAULT_STATE_IS_OPEN & SETTING_BRICK_DEFAULT_STATE_SHOW_EMPTY_FIELDS instead.

    → <<cset f37feff37fcb>>

  40. Guillaume Englert reporter

    refs #106 Rename some internal constants.

    API breaking: - (internal) SETTING_BLOCK_DEFAULT_STATE_IS_OPEN & SETTING_BLOCK_DEFAULT_STATE_SHOW_EMPTY_FIELDS are deprecated ; use SETTING_BRICK_DEFAULT_STATE_IS_OPEN & SETTING_BRICK_DEFAULT_STATE_SHOW_EMPTY_FIELDS instead.

    → <<cset f37feff37fcb>>

  41. Guillaume Englert reporter

    refs #106 Deprecate bricks configuration for portals.

    API breaking: - In 'creme_core.gui.bricks' : - The attribute 'Brick.target_apps' is deprecated. - The method '_BlockRegistry.get_compatible_portal_blocks()' is deprecated. - In 'creme_config.views.bricks' : - The class-view 'PortalBricksWizard' is deprecated. - The function-views 'delete_portal()' & 'edit_portal()' are deprecated. - In 'creme_config.forms.bricks' : - _BlockPortalLocationsForm, BlockPortalLocationsAddForm & BlockPortalLocationsEditForm are deprecated. - _BrickLocationsForm._build_portal_locations_field().

    → <<cset b4c76ece6ca2>>

  42. Guillaume Englert reporter

    refs #106 Deprecate bricks configuration for portals.

    API breaking: - In 'creme_core.gui.bricks' : - The attribute 'Brick.target_apps' is deprecated. - The method '_BlockRegistry.get_compatible_portal_blocks()' is deprecated. - In 'creme_config.views.bricks' : - The class-view 'PortalBricksWizard' is deprecated. - The function-views 'delete_portal()' & 'edit_portal()' are deprecated. - In 'creme_config.forms.bricks' : - _BlockPortalLocationsForm, BlockPortalLocationsAddForm & BlockPortalLocationsEditForm are deprecated. - _BrickLocationsForm._build_portal_locations_field().

    → <<cset b4c76ece6ca2>>

  43. Guillaume Englert reporter

    refs #106 The configuration model for bricks on portals can now only configurate 'Home' locations.

    API breaking: - The field 'BlockPortalLocation.app_name' has been removed. - The method 'BlockPortalLocation.create_or_update()' has been removed.

    → <<cset 0e7c273d05bb>>

  44. Guillaume Englert reporter

    refs #106 The configuration model for bricks on portals can now only configurate 'Home' locations.

    API breaking: - The field 'BlockPortalLocation.app_name' has been removed. - The method 'BlockPortalLocation.create_or_update()' has been removed.

    → <<cset 0e7c273d05bb>>

  45. Guillaume Englert reporter

    refs #106 Some code renaming.

    API breaking: - These models have been renamed : - BlockDetailviewLocation => BrickDetailviewLocation - BlockPortalLocation => BrickPortalLocation - BrickMypageLocation => BrickMypageLocation - RelationBlockItem => RelationBrickItem - InstanceBlockConfigItem => InstanceBrickConfigItem - CustomBlockConfigItem => CustomBrickConfigItem - BlockState => BrickState - (internal) The signal with uid 'dispatch_uid='creme_core-blockmypagelocation._copy_default_config' is now 'dispatch_uid='creme_core-brickmypagelocation._copy_default_config'. - In 'creme_config.bricks', these Bricks have been renamed : - BlockDetailviewLocationsBrick => BrickDetailviewLocationsBrick - BlockHomeLocationsBrick => BrickHomeLocationsBrick - BlockDefaultMypageLocationsBrick => BrickDefaultMypageLocationsBrick - BlockMypageLocationsBrick => BrickMypageLocationsBrick - RelationBlocksConfigBrick => RelationBricksConfigBrick - InstanceBlocksConfigBrick => InstanceBricksConfigBrick - CustomBlocksConfigBrick => CustomBricksConfigBrick

    → <<cset 481cf84035ca>>

  46. Guillaume Englert reporter

    refs #106 Some code renaming.

    API breaking: - These models have been renamed : - BlockDetailviewLocation => BrickDetailviewLocation - BlockPortalLocation => BrickPortalLocation - BrickMypageLocation => BrickMypageLocation - RelationBlockItem => RelationBrickItem - InstanceBlockConfigItem => InstanceBrickConfigItem - CustomBlockConfigItem => CustomBrickConfigItem - BlockState => BrickState - (internal) The signal with uid 'dispatch_uid='creme_core-blockmypagelocation._copy_default_config' is now 'dispatch_uid='creme_core-brickmypagelocation._copy_default_config'. - In 'creme_config.bricks', these Bricks have been renamed : - BlockDetailviewLocationsBrick => BrickDetailviewLocationsBrick - BlockHomeLocationsBrick => BrickHomeLocationsBrick - BlockDefaultMypageLocationsBrick => BrickDefaultMypageLocationsBrick - BlockMypageLocationsBrick => BrickMypageLocationsBrick - RelationBlocksConfigBrick => RelationBricksConfigBrick - InstanceBlocksConfigBrick => InstanceBricksConfigBrick - CustomBlocksConfigBrick => CustomBricksConfigBrick

    → <<cset 481cf84035ca>>

  47. Guillaume Englert reporter

    refs #106 #21 Some code renaming in 'reports' (block=>brick).

    API breaking: - Some URLs changes (no problem with reverse()) : - "reports/graph/fetch_graph/..." => "reports/graph/fetch/..." - "reports/graph/fetch_from_instance_block/..." => "reports/graph/fetch/from_instance_brick/..." - "reports/graph/<graph_id>/block/add" => "reports/graph/<graph_id>/brick/add" - The function 'reports.views.graph.fetch_graph_from_instanceblock()' is deprecated ; use 'fetch_graph_from_instancebrick()' instead. - In models.AbstractReportGraph : - The method 'get_fetcher_from_instance_block()' is deprecated ; use 'get_fetcher_from_instance_brick()' instead. - The method 'create_instance_block_config_item()' is deprecated ; use 'create_instance_block_config_item()' instead. - The class 'InstanceBlockConfigItemError' is deprecated ; use 'InstanceBrickConfigItemError' instead. - bricks.ReportGraphBrick: - The argument of the constructor has been renamed ('instance_block_config' => 'instance_block_config'). - In the template context, the variable "instance_block_id" is deprecated ; use "instance_brick_id" instead.

    → <<cset ac8d135325c8>>

  48. Guillaume Englert reporter

    refs #106 #21 Some code renaming in 'reports' (block=>brick).

    API breaking: - Some URLs changes (no problem with reverse()) : - "reports/graph/fetch_graph/..." => "reports/graph/fetch/..." - "reports/graph/fetch_from_instance_block/..." => "reports/graph/fetch/from_instance_brick/..." - "reports/graph/<graph_id>/block/add" => "reports/graph/<graph_id>/brick/add" - The function 'reports.views.graph.fetch_graph_from_instanceblock()' is deprecated ; use 'fetch_graph_from_instancebrick()' instead. - In models.AbstractReportGraph : - The method 'get_fetcher_from_instance_block()' is deprecated ; use 'get_fetcher_from_instance_brick()' instead. - The method 'create_instance_block_config_item()' is deprecated ; use 'create_instance_block_config_item()' instead. - The class 'InstanceBlockConfigItemError' is deprecated ; use 'InstanceBrickConfigItemError' instead. - bricks.ReportGraphBrick: - The argument of the constructor has been renamed ('instance_block_config' => 'instance_block_config'). - In the template context, the variable "instance_block_id" is deprecated ; use "instance_brick_id" instead.

    → <<cset ac8d135325c8>>

  49. Log in to comment