Git Product home page Git Product logo

create-bundle's Introduction

This repository is no longer maintained

Due to lack of interest, we had to decide to discontinue this repository. The CMF project focusses on the Routing component and RoutingBundle, which are still in active use by other projects.

This repository will no longer be upgraded and marked as abandoned, but will be kept available for legacy projects or if somebody wants to experiment with the CMF.

You can contact us in the #symfony_cmf channel of the Symfony devs slack.

Symfony Content Management Framework

Build Status Latest Stable Version Total Downloads

This bundle is part of the Symfony Content Management Framework (CMF) and licensed under the MIT License.

Note the main purpose of this repository is to offer a composer package that ties together various packages that will be used in most CMF projects. The bulk of the development is done in other repositories on the https://github.com/symfony-cmf organization.

The Symfony CMF project makes it easier for developers to add CMS functionality to applications built with the Symfony PHP framework. Key development principles for the provided set of bundles are scalability, usability, documentation and testing.

Requirements

Documentation

For the install guide and reference, see:

Contributing

Pull requests are welcome. Please see our CONTRIBUTING guide.

Thanks to everyone who has contributed already.

create-bundle's People

Contributors

adou600 avatar benoitpointet avatar burgov avatar colinfrei avatar damienflament avatar dantleech avatar dbu avatar electricmaxxx avatar elrafman avatar emmanuelvella avatar fabian avatar hason avatar jekill avatar jon-frankel avatar jonathonwalz avatar kingcrunch avatar kostiklv avatar lsmith77 avatar marekkalnik avatar petk avatar phiamo avatar podlebar avatar ralf57 avatar richardmiller-zz avatar rndstr avatar rudott avatar shieldo avatar uwej711 avatar wouterj avatar xabbuh 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

Watchers

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

create-bundle's Issues

Handle translations

Right now, in a multilanguage setup, create just edits the page in whatever locale it currently is. This is fine as long as a translation already exists. But if i requested the page in german and the content only exists in english, i will always edit the english version, i can not create the french translation.

It would be cool to have a widget to configure if i am updating the english text or creating the french translation at this point. We could then map that onto the locale field of the document. imo it makes no sense to offer all available locales, just the choice between the requested local and the locale we actually got.
another feature could be to delete the current translation, i.e. if created accidentally.

this might profit from bergie/create#59, but maybe it would help if create.js would have explicit built-in understanding of locales.

invalid sql query generated for "image search"

im using doctrine-phpcr.

if i trie to find an uploaded image, i get an 500 Error Code:

SELECT n0.id AS id, n0.path AS path, n0.parent AS parent, n0.local_name AS local_name, n0.namespace AS namespace, n0.workspace_name AS workspace_name, n0.identifier AS identifier, n0.type AS type, n0.props AS props, n0.depth AS depth, n0.sort_order AS sort_order, 

#this one seems invalid
n1.id AS nt:unstructured_id, n1.path AS nt:unstructured_path, n1.parent AS nt:unstructured_parent, 

n1.local_name AS nt:unstructured_local_name, n1.namespace AS nt:unstructured_namespace, n1.workspace_name AS nt:unstructured_workspace_name, n1.identifier AS nt:unstructured_identifier, n1.type AS nt:unstructured_type, n1.props AS nt:unstructured_props, n1.depth AS nt:unstructured_depth, n1.sort_order AS nt:unstructured_sort_order 
FROM phpcr_nodes n0 
WHERE n0.workspace_name = ? AND n0.type IN ('nt:unstructured', 'rep:root') AND (n0.path LIKE '/cms/content/static/%' AND (EXTRACTVALUE(n1.props, '//sv:property[@sv:name=\"phpcr:class\"]/sv:value[1]') = 'Symfony\\\\Cmf\\\\Bundle\\\\CreateBundle\\\\Document\\\\Image' AND EXTRACTVALUE(n1.props, '//sv:property[@sv:name=\"caption\"]/sv:value[1]') LIKE 'male%'))

Add button not showing for collection

Hello,

First, thanks for your amazing bunddle.
I'm having issues with using collections : they get displayed correctly and are editable, but they don't show any "Add" button.

I've got the following RDF mappings

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPage.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPage"
>
    <children>
        <collection rel="dcterms:hasPart" rev="dcterms:partOf" identifier="sections"/>
    </children>
</type>

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPage.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPageSection"
>
    <children>
        <collection rel="dcterms:hasPart" rev="dcterms:partOf" identifier="sections"/>
    </children>
</type>

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPageSection.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPageSection"
>
    <rev>dcterms:partOf</rev>
    <children>
        <property property="dcterms:title" identifier="title"/>
        <collection rel="dcterms:hasPart" rev="dcterms:partOf" identifier="sectionLines"/>
    </children>
</type>

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPageSectionLine.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPageSectionLine"
>
    <rev>dcterms:partOf</rev>
    <children>
        <property property="dcterms:contentLeft" identifier="contentLeft"/>
        <property property="dcterms:contentRight" identifier="contentRight"/>
    </children>
</type>

which I'm displaying with the following template :

{% for section in sections %}
        {% createphp section as="rdf" noautotag %}
        <section class="actualites content" {{ createphp_attributes(rdf) }}>
            <h1 {{ createphp_attributes( rdf.title ) }}>{{ createphp_content( rdf.title ) }}</h1>
            {% for line in section.getSectionLines() %}
                {% createphp line as="linerdf" noautotag %}
                 <ul class="floated-list clearfix" {{ createphp_attributes(linerdf) }}>
                    <li class="actualite-image">
                        <div {{ createphp_attributes( linerdf.contentLeft ) }}>{{ createphp_content( linerdf.contentLeft ) }}</div>
                    </li>
                    <li class="actualite-text">
                        <div {{ createphp_attributes( linerdf.contentRight ) }}>{{ createphp_content( linerdf.contentRight ) }}</div>
                    </li>
                </ul>
                {% endcreatephp %}
            {% endfor %}
        </section>
        {% endcreatephp %}
    {% endfor %}

It seems my collections are not recognized as such, (no rev rel tag in the html), am I doing something wrong ?

Many thanks,

Thomas

add child button in create toolbar

once #44 is done, we could provide a workflow button "Add page" in the header to add a child document (typically to a page) that would work even if the child collection is not displayed.

  • select from available types
  • check if needs a menu entry
  • ask for url fragment / url

ORM implementation

I'm using symfony2 without cmf part (that's why I don't use phpcr-odm, but orm).
But I want that frontend editing functionality. I've successfuly installed CreateBundle, and it works fine about text editing, but I don't see any way to use file uploading for me whithout changing ORM to PHPCR-ODM!
In my old admin part I used trsteel_ckeditor with fmelfinder, and it was great.

Also how can I configure ckeditor, implemented by CreateBundle?

Provide integration for ckeditor

createjs would also support ckeditor, but we do not have a template and init javascript for it. we would need to provide an adapter for the image upload feature and possible other things.

for custom editors, see #23

Assets routes

When installing the standard edition of symfony cmf and finishing installation everything went great exept for the assets urls of the create bundle. here is what my browser console :

GET http://localhost/CMF/standard-edition/web/app_dev.php/css/06935bc_create-ui_2.css 500 (Internal Server Error) demo:12
GET http://localhost/CMF/standard-edition/web/app_dev.php/css/06935bc_font-awesome_3.css 500 (Internal Server Error) demo:13
GET http://localhost/CMF/standard-edition/web/app_dev.php/css/06935bc_midgardnotif_4.css 500 (Internal Server Error) demo:14
GET http://localhost/CMF/standard-edition/web/app_dev.php/css/06935bc_tags_1.css 500 (Internal Server Error) demo:11
'Attr.nodeValue' is deprecated. Please use 'value' instead. create_vie_6.js:5069
'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach). create_rangy-core_5.js:140

How should I fix it?

Fix validation of required options

Some configuration settings are required, these get a ->isRequired() call in the Config tree and the isset function should be used in the CreateExtension.

Currently, when not configuring anything for the CreateBundle, the result is a PHP notice and a DI exception:

PHP Notice:  Undefined index: model_class in Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony-cmf\cre
ate-bundle\Symfony\Cmf\Bundle\CreateBundle\DependencyInjection\CmfCreateExtension.php on line 118
PHP Stack trace:
PHP   1. {main}() Wouter\web\sf-world\cmf\symfony-standard\app\console:0
PHP   2. Symfony\Component\Console\Application->run() Wouter\web\sf-world\cmf\symfony-standard\app\console:27
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:121
PHP   4. Symfony\Component\HttpKernel\Kernel->boot() Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:70
PHP   5. Symfony\Component\HttpKernel\Kernel->initializeContainer() Wouter\web\sf-world\cmf\symfony-standard\app\bootstrap.php.cache:2212
PHP   6. Symfony\Component\DependencyInjection\ContainerBuilder->compile() Wouter\web\sf-world\cmf\symfony-standard\app\bootstrap.php.cache:2433
PHP   7. Symfony\Component\DependencyInjection\Compiler\Compiler->compile() Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ContainerBuilder.php:623
PHP   8. Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process() Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\Compiler.php:118
PHP   9. Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process() Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass.php:39
PHP  10. Symfony\Cmf\Bundle\CreateBundle\DependencyInjection\CmfCreateExtension->load() Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass.php:50
PHP  11. Symfony\Cmf\Bundle\CreateBundle\DependencyInjection\CmfCreateExtension->loadPhpcr() Wouter\web\sf-world\cmf\symfony-standard\vendor\symfony-cmf\create-bundle\Symfony\Cmf\Bundle\CreateBundle\DependencyInjection\CmfCreateExtension.php:77

  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  The service "cmf_create.image.controller" has a dependency on a non-existent service "cmf_media.persistence.phpcr.manager".

[hallo] Drag n Drop for Images wont work

it is unable to drag n drop an image from the image-modal into the editable content...can anybody confirm this, or am i doing it wrong?

i am using the hallo-editor

rename vie to create in services and such

we should go through this bundle and refactor everything named "vie" to "create" to be consistent. vie is just one component, and most of the backend communication is finally backbone anyways.

add support for orm mapper

once the orm mapper has landed in createphp, we should support it in the bundle as well. we need a persistence-orm.xml file similar to persistence-phpcr.xml and the configuration options in the "persistence" tree.

the orm service will look something like

create_orm_mapper:
    class: Midgard...\DoctrineOrmMapper
    arguments: ['%cmf_create.map%', '@doctrine']

and CmfCreateExtension will have to be adjusted to wire things together correctly

create new pages

support creating new pages with the collection handling feature. we could provide a mixed collection with all pages that can be created under the current page. i wonder how we would handle metadata though, i.e. the route name

Provide means to configure ckeditor

The basic integration of ckeditor happened here: #33, it did not however exposed any configuration. It is using the default config.js file, which is fine and just works. If you want to include some plugin, however, the stuff become messy.

I think using assetic would be the key here.

Any opinions?

mixed collections to add mixed content

if we would expose the content schema to VIE, we could use the add button to add a selection of different contents into a collection (for example all kinds of blocks)

this probably mainly consists of doing openpsa/createphp#24 and then some glue code.

bring back image suggestions tab

see todo comment in init-create-hallo.js - there was a bug with hallo that prevented this from working, check where to fix and enable it again.

make rest controller more generic

PUT and DELETE methods in RestController are exactly the same. we should only have specific methods for the workflows and the post, and make the rest a generic route that does not care about the http method. Then pass that on to the rest service.

This is a precondition to allow registering custom workflows.

fine grained access control

we should allow to plug ACL into this. probably this needs some improvements on the createphp library too, the bundle should just bind symfony bindings for the feature to be built into createphp.

cant have two times schema:text

when trying to use a rdf mapping with schema:text also for titles, js errors get thown:

Uncaught The editor instance "editor5" is already attached to the provided element. ckeditor_ckeditor_1.js:283
CKEDITOR.inline ckeditor_ckeditor_1.js:283
jQuery.widget.enable create_create_11.js:3069
(anonymous function) create_jquery-ui_2.js:401
jQuery.widget._init create_create_11.js:2942
(anonymous function) create_jquery-ui_2.js:401
(anonymous function) create_jquery-ui_2.js:505
jQuery.extend.each create_jquery_1.js:648
jQuery.fn.jQuery.each create_jquery_1.js:270
$.fn.(anonymous function) create_jquery-ui_2.js:502
jQuery.widget.enablePropertyEditor create_create_11.js:901
(anonymous function) create_jquery-ui_2.js:401
jQuery.widget._enablePropertyEditor create_create_11.js:791
(anonymous function) create_jquery-ui_2.js:401
(anonymous function) create_create_11.js:721
jQuery.extend.each create_jquery_1.js:648
jQuery.fn.jQuery.each create_jquery_1.js:270
jQuery.widget.findEditablePredicateElements create_create_11.js:707
(anonymous function) create_jquery-ui_2.js:401
jQuery.widget.enable create_create_11.js:720
(anonymous function) create_jquery-ui_2.js:401
jQuery.widget._doSetState create_create_11.js:696
(anonymous function) create_jquery-ui_2.js:401
jQuery.widget.setState create_create_11.js:668
(anonymous function) create_jquery-ui_2.js:401
jQuery.widget._init create_create_11.js:629
(anonymous function) create_jquery-ui_2.js:401
(anonymous function) create_jquery-ui_2.js:505
jQuery.extend.each create_jquery_1.js:648
jQuery.fn.jQuery.each create_jquery_1.js:270
$.fn.(anonymous function) create_jquery-ui_2.js:502
(anonymous function) create_create_11.js:476
jQuery.extend.each create_jquery_1.js:648
jQuery.fn.jQuery.each create_jquery_1.js:270
jQuery.widget._enableEdit create_create_11.js:442
(anonymous function) create_jquery-ui_2.js:401
jQuery.widget.setState create_create_11.js:209
(anonymous function) create_jquery-ui_2.js:401
(anonymous function) create_create_11.js:366
jQuery.event.dispatch create_jquery_1.js:3074
elemData.handle

is this a known limitation?

Editor configurations

Right now we only have a default and a title configuration for the hallo editor. Would be nice to have a way to configure any editors and assign them to any numbers of rdf fields. Note that here, editor means anything to edit an editable field, not just one of the supported WYSIWYG editors.

integration with sonata admin

if we have a sonata admin in place, would be cool to integrate with that. one generic way could be to have a controller that accepts the id of any item, show a button in the create toolbar "Edit in Backend" and then have that backend controller try to create an edit url for that "thing", e.g. by loading it from phpcr-odm and redirecting to the corresponding sonata admin class. that should work with orm as well.

if we have anything that is not handled in sonata, we would need a way to identify if the button should be shown or not. maybe the js should just query the backend and show that button if the backend provides the editing url, otherwise not even show the button.

Missing css and js files in Resources/public/vendor

Hi,

I'm trying to install Symfony CMF and I got an exception that a lot of files missing in folder Resources/public/vendor
Called in :

  • /vendor/symfony-cmf/create-bundle/Symfony/Cmf/Bundle/CreateBundle/Resources/views/includecssfiles.html.twig
  • /vendor/symfony-cmf/create-bundle/Symfony/Cmf/Bundle/CreateBundle/Resources/views/includejsfiles-create.html.twig
  • /vendor/symfony-cmf/create-bundle/Symfony/Cmf/Bundle/CreateBundle/Resources/views/includejsfiles-ckeditor.html.twig

I checked in Resources/public/vendor in master branch and its empty.

Thanks

hallo toolbar location

toolbar location incorrectly calculated (shifted a bit to the right) => figure out if its our fault, fix it wherever appropriate. for now, the miscalculation is compensated by a negative margin in the css.

Install deps using Component Installer (i.e. w/composer)

The package below basically lets you specify js dependencies in composer.json and install them to a specified directory.

https://github.com/RobLoach/component-installer

Works pretty well for the TreeUiBundle, and doesn't require anything additional beyond adding the JS package to "require":

https://github.com/dantleech/TreeUiBundle/blob/master/composer.json

Use bower to install deps

It may be a good idea to use the SpBowerBundle to manage dependencies. Create.js is already declared in bower repositories, so we could use it to avoid using submodules.

Symfony 2.1 and missing "canBeEnabled"

Minimum required Symfony version is 2.1 but with the #80 canBeEnabled method of TreeBuilder introduced which comes with the Symfony 2.2.

I need to use the bundle on Symfony 2.1, could be great if a rollback can happen without BC break.

Can't close edit popup after image upload box closes

ubuntu 12.04 chromium

On the page http://cmf.liip.ch/en, if I click on edit in the top right and then click on the "Bienvenue dans la démo d" text block, a popup appears.
Then I click on the images option in the top left corner and another popup appears.
As soon as I now click somewhere outside of the images popup the popup disappears; which can be expected, but it has now become very hard to close the first popup.

document image handler

would be great if you can add a few more lines to the readme on how to handle the image uploads and what the bundle does or doesn't do.

create page option in 404 page

follow up of #11

would be cool to offer to create a new page when you get a 404 page. we could look at the parent route and its content to see if there are any collections that could be added to, to know the available types.

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.