Giter VIP home page Giter VIP logo

sonatadoctrinephpcradminbundle's Introduction

SonataDoctrinePhpcrAdminBundle

Symfony Sonata / Integrate Doctrine PHPCR into the SonataAdminBundle

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Branch Github Actions Code Coverage Documentation
2.x Test Coverage Status Documentation Status
3.x Test Coverage Status Documentation Status

WARNING: This repository is abandoned

There is no active support on it.

Feel free to ask if you want to help to keep this project up to date.

Documentation

Check out the documentation on the official website.

Support

For general support and questions, please use StackOverflow.

If you think you found a bug or you have a feature idea to propose, feel free to open an issue after looking at the contributing guide.

License

This package is available under the MIT license.

sonatadoctrinephpcradminbundle's People

Contributors

apiciuspoulet avatar core23 avatar covex-nn avatar dantleech avatar dbu avatar dicorato avatar eiannone avatar electricmaxxx avatar emmanuelvella avatar fabian avatar franmomu avatar greg0ire avatar jakuza avatar jordisala1991 avatar kingcrunch avatar lsmith77 avatar lucasgranberg avatar nacmartin avatar oskarstark avatar petk avatar pulzarraider avatar rande avatar sjopet avatar sonataci avatar soullivaneuh avatar syeo66 avatar tiagojsag avatar uwej711 avatar vincentlanglet avatar wouterj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonatadoctrinephpcradminbundle's Issues

error with list view: '[' not allowed in name

after updating the sandbox, i get this error

HTTP 400: '[' not allowed in name 

the reason is probably that we fixed the query builder to itself add the [] around names with : in them and we probably still add them manually in the admin bundle somehwere. however, i did not find where...

the rest (tree, new, edit) all work, just the list is affected.

latest form changes break tree widget

i created a symfony-update branch in cmf-sandbox with the latest (as of 11.07.2012) symfony. there seems to be something in the form layer that breaks. i get an exception about object expected when i try to load an editing form that uses the tree widget (menu and simple page admins)

@uwej711 would be great if you can have a look at this...

Documentation

Is the documentation ready ?

I can generate the documentation for this bundle if you want. Just let me now.

Support Versionable Documents

expose the API for versioning:

  • create new version
  • see list of versions
  • load old version
  • restore content to an old version
  • optionally completely delete an old version

To control what is currently published, we should maintain a separate tree. Publishing would copy the selected version from the editing tree to the publication tree. (Looking up a specific label on each request is an expensive overhead and error prone, and could mess up with search.). JCR-based CMS like magnolia even support copying the jcr subtree from one system to another, to support different servers for editing and publishing.

We probably need to fix versioned documents children mappings for this to be fully usable.

Filter translation documents from tree

Is it possible to filter out translation documents? For documents using the "child" translation strategy the child documents for each language are displayed in the tree, fe. phpcr_locale:en <not editable>.

Or maybe this should be more general, so you could configure for a tree what to display. Related to this is that for a select tree you would like to limit the tree to fe. only pages. for the field to select a parent page.

PhpcrOdmTree fails with child annotation

I have a child annotation in my document, but no child is assigned (yet), but the method getDocumentChildren returns an array containing 'null' which leads to an exception in getChildren.

There should be a check for null in getDocumentChildren.

There is a second issue with that: the nodes are marked "not editable" since this are generated proxy classes not the real classes. The admin exists only for the real classes

fix for upstream change in SonataAdminBundle

travis tells:

PHP Fatal error:  Declaration of Mock_Admin_5b9e740d::setMenuFactory() must be compatible with that of Sonata\AdminBundle\Admin\AdminInterface::setMenuFactory() in /home/vagrant/.phpfarm/inst/php-5.3.8/pear/php/PHPUnit/Framework/MockObject/Generator.php(216) : eval()'d code on line 1

Guess the rigth type of data

And make filters, forms, etc. work with right datatypes. At the moment evertyhing is a string to simplify things.

documentation: type guessing

admin classes need the configureFormFields method. when i renamed the storage name for 'content' to 'body', but let the getter and setter at set/getContent, i noticed that i need to specify the type and before it was guessed. this should be documented a bit - and maybe there is even a way for me to specify the phpcr name to get the type from instead of the type itself?

protected function configureFormFields(FormMapper $formMapper)
{
    $formMapper
        ->with('General')
            ->add('path', 'text')
            ->add('title')
            ->add('name')
            ->add('content', 'text') // without 'text', the form can not be built if the node does not have a property $content
        ->end();
}

clean up TreeModelType form widget

this widget is used to select a phpcr node by path.

  • refactor to use a odm tree instead of the phpcr tree
  • support specifying allowed jstree-node-types
  • support reference properties, translating from document to a helpful string for the user and on storing back to the document.

this form widget could go into the phpcr-bundle to be available regardless of whether the adminbundle is used or not.

smarter paging

with jackrabbit we do not have the ability to generate a count efficiently for larger data sets. so we should make a simple flag in the base admin class to say that we expect a large dataset. in this case the paging should switch to just offering prev/next buttons.

Correction for tree.html.twig for Symfony 2.2.0

In order to work with Symfony 2.2.0 (and new twig version), you should change the following line in /Resources/views/tree.html.twig for the block to work correctly ;

change

{% render 'sonata.admin.doctrine_phpcr.tree_controller:treeAction' with { 'root': id, 'selected': selected } %}

with

{% render( controller('sonata.admin.doctrine_phpcr.tree_controller:treeAction',{ 'root': id, 'selected': selected })) %}

double slashes in form actions

we have fixed the double slashes in the page urls, but it seems we still have the double slashes in the form action urls.

New controller for tree view

At the moment the admin class and controllers are tied to a specific kind of document.

In order to have a tree containing different types of documents we need a new controller for the tree view.

That controller should:

  • Have RESTful routes for create, edit, delete, update nodes...
  • Provide the right urls for CRUD
  • Has routing that match what FOSJsRoutingBundle sends to the server

Write installation notes

There is a tiny doc explaining how to activate the bundle, but we need docs explaining how to set up a working environment to try this out with the symfony-cmf sandbox, explain that this won't work with doctrine2 versions prior to this fix doctrine/orm#154

Empty text fields should store null when saved

As the ORM does. Currently, when a empty text field is saved, the field gets populated with an empty string in the database.

I don't know what component is responsible of this behaviour.

Handle child documents inline

There should be a way of handling child documents in Node Form..

assuming you have a structure like this:

Articles
 - Article 1
 - Article 2
 -- Images
 --- Image 1
 --- Image 2
 - Article 3

It should be possible to identify those child-documents and render them as a list (or tree view?).
I don't hink that there should be something like a form for it.. it should just show the User that there are Subnode which can be edited too.

A lillte more visual: http://cl.ly/1M1s0p1R1n0r331a1M0d :)

fix doctrine_phpcr_type_tree_model to be usable multiple times again

on the menu items, we use two trees, one for the parent, the other for the linked content. since the last update, the parent tree is showing the content as well. the sonata admin class looks correct to me, but the rendered html configures the tree to look in /cms/content

the problem is visible for example on
http://cmf.lo/app_dev.php/de/admin/bundle/menu/menunode/cms/menu/main/edit

on the demo sandbox http://cmf.liip.ch/en/admin/bundle/menu/multilangmenuitem/cms/menu/main/edit it is still correct

@uwej711 not sure if your PR broke it - but whatever, do you think you can fix it?

Support selecting documents for reference fields

ReferenceOne/ReferenceMany are field types. select target documents. Similar to #23 this needs an injected application specific strategy to determine what targets are valid.

Note that there is also the Referrers, which are the backlinks from referenced documents. We might display that for completeness, but editing is probably a bit weird (the info is only stored on the source document of the reference, never at the target. so to remove a referrer, you would actually edit the other document. might be useful from a user perspective though)

handling of inheritance (or more generally mixed collections)

as of doctrine/phpcr-odm#218 we have inheritance in search queries, which results in mixed collections being shown.

ie. the MenuNode list now shows MultilangMenuNode nodes since the later extends from the former.

for the add button SonataAdminBundle already supports subcollections:
https://github.com/sonata-project/sandbox/blob/2.1/src/Sonata/Bundle/DemoBundle/Resources/config/admin.xml#L14

however SonataAdminBundle does not yet support dynamically choosing which edit form to load.

i think it would be kind of cool to be able to take this to the extreme by simply having a single list for any document. in a way this would be a competing or complementary interface to what we offer with the https://github.com/symfony-cmf/phpcrbrowser (which @danleech is working to replace with a Symfony2 implementation). at this point we would no longer really be talking about inheritance, but mixed collections. for such mixed collections we would likely need to offer a "search in any property" or something like that .. but that is another story.

/cc @rande @dbu

show child documents

we should show the children documents of a document, also allowing to reorder children.

relates to #17 (editing children inline) which would be an extended case of this feature.

Support adding referenced/referring document inline

There are situations where selecting a referenced document as described in #24 is not convenient for the user. Think of the content page that is referenced by a menu document and a route document. It would be good to enter all 3 documents in one interface.

Write more unit and functional tests

Ideally, we reach 100% conscious decision: that is, all code is either tested or has the phpunit comments that it does not make sense to test it.

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.