Code Monkey home page Code Monkey logo

content_lock's Introduction

This repository was created to port the module to Drupal 8 in a big pull request #1. Since that was merged and further development is happening in drupal.org we are no longer using this repo, and I will delete it soon.

content_lock's People

Contributors

binki avatar eugenmayer avatar juanolalla avatar pandaskii avatar

Watchers

 avatar

Forkers

martincollar

content_lock's Issues

Support any entity type without module dependencies

As @dawehner explained in https://www.drupal.org/node/2606858#comment-11817124, and @chrfritsch pointed out in https://www.drupal.org/node/2606858#comment-11831036, there is no reason for not supporting any entity type, instead of specifically supporting and so for duplicating the code for node, taxonomy_term and block content entity types. The module should not have a hard dependency on the block_content module, neither with any other specific entity type module.

As a follow up we could move this logic into a new handler type on entity types, so you can implement your own logic if needed. inline_entity_form does something similar.

Config changes required for the new D8 Strict Schema

@jazzdrive3 proposes the following config changes. These are required for the new Strict Schema testing that is enabled by default for Drupal 8 tests.

New file in config/schema: content_lock.views.schema.yml
views.filter.content_lock_filter:
type: views.filter.boolean
label: 'Is Locked'
mapping:
value:
type: string
label: 'Value'

And then in config/optional/views.view.locked_content.yml, change line 227 to be
value: '1'

Add an "Unlock" button to cancel locking after editing

After using the site with content lock for a few days, it's become clear that a cancel button is needed. Consider this scenario:

  • User visits a node (locking it from other editors)
  • User decides they aren't ready to work on it.
  • User clicks the back button or the 'View' tab.
  • In this case, the content is locked. The only way for the content to unlock is to save the node, which isn't always the desired action. You may wish to leave the node without changing it, and end the lock.

For this reason it appears we need a cancel button on nodes where the user has a lock, so they can clear the lock without saving.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.