123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- {% extends 'SonataAdminBundle:CRUD:base_edit.html.twig' %}
- {% block parentForm %}
- <div class="alert alert-info">
- {{ 'workflow_edit_create_alert'|trans({}, 'WorkflowBundle') }} <br />
- - {{ 'Workflow Documentation'|trans({}, 'WorkflowBundle') }} <a target="_blank" href="http://symfony.com/blog/new-in-symfony-3-2-workflow-component">http://symfony.com/blog/new-in-symfony-3-2-workflow-component</a><br />
- - {{ 'YAML Documentation'|trans({}, 'WorkflowBundle') }} <a target="_blank" href="http://docs.ansible.com/ansible/YAMLSyntax.html">http://docs.ansible.com/ansible/YAMLSyntax.html</a>
- </div>
- {{ parent() }}
- {#https://github.com/ryanburnette/textarea-as-ace-editor#}
- {#https://ace.c9.io/#}
- {#https://ace.c9.io/build/kitchen-sink.html#}
- <script src="{{ asset('bundles/baseadmin') }}/ace_editor/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
- <script src="{{ asset('bundles/baseadmin') }}/ace_editor/textarea-as-ace-editor.js" type="text/javascript" charset="utf-8"></script>
- <style type="text/css" media="screen">
- .ace_editor {
- height: 250px!important;
- }
-
- .form-actions.stuck {
- z-index: 99999!important;
- }
- </style>
-
- <script type="text/javascript">
- $( document ).ready(function() {
- $("textarea").asAceEditor();
- editor = $('textarea').data('ace-editor');
- editor.setTheme("ace/theme/github");
- editor.getSession().setMode("ace/mode/yaml");
- //editor.setReadOnly(true);
- editor.setFontSize(14);
- editor.setShowInvisibles(true);
- editor.getSession().setTabSize(2);
- editor.getSession().setUseSoftTabs(true);
- editor.getSession().setUseWrapMode(true);
-
-
- {% if admin.parameters.workflow_name is defined %}
- //lastDiv = $("#sonata-ba-field-container-{{ admin.uniqid }}_template").after();
- editor = $( ".ace_editor" );
- editor.parent("div").append($("#gojs").html());
- $("#gojs").remove();
- {% endif %}
-
- });
- </script>
- {% if admin.parameters.workflow_name is defined %}
- <div id="gojs" style="display:none">
- {% include 'WorkflowBundle:Workflow:show_workflow_graph_gojs.html.twig' with {'object': admin.parameters.workflow_subject, 'name': admin.parameters.workflow_name } %}
- <div>
- {% endif %}
-
- {% endblock %}
|