Browse Source

Evolution #601: Admin: re-création: integration de la recherche en ajax dans l'admin

Sevajol Bastien 12 years ago
parent
commit
31048ac2d9
31 changed files with 102 additions and 14 deletions
  1. 5 0
      app/Resources/AdmingeneratorGeneratorBundle/views/base_admin_assetic_less.html.twig
  2. 4 0
      app/config/routing.yml
  3. 5 5
      src/Muzich/AdminBundle/Resources/config/Admin_element-generator.yml
  4. 11 3
      src/Muzich/AdminBundle/Resources/config/Admin_element_tags_proposition-generator.yml
  5. 7 1
      src/Muzich/AdminBundle/Resources/config/Admin_event_archive-generator.yml
  6. 11 1
      src/Muzich/AdminBundle/Resources/config/Admin_follow_group-generator.yml
  7. 11 1
      src/Muzich/AdminBundle/Resources/config/Admin_follow_user-generator.yml
  8. 7 1
      src/Muzich/AdminBundle/Resources/config/Admin_group-generator.yml
  9. 11 1
      src/Muzich/AdminBundle/Resources/config/Admin_groups_tags_favorites-generator.yml
  10. 2 0
      src/Muzich/AdminBundle/Resources/config/Admin_presubscription-generator.yml
  11. 2 0
      src/Muzich/AdminBundle/Resources/config/Admin_registration_token-generator.yml
  12. 2 0
      src/Muzich/AdminBundle/Resources/config/Admin_tag-generator.yml
  13. 2 0
      src/Muzich/AdminBundle/Resources/config/Admin_user-generator.yml
  14. 11 1
      src/Muzich/AdminBundle/Resources/config/Admin_users_tags_favorites-generator.yml
  15. 5 0
      web/css/jquery-ui-1.10.1.autocomplete.min.css
  16. BIN
      web/js/images/animated-overlay.gif
  17. BIN
      web/js/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  18. BIN
      web/js/images/ui-bg_diagonals-thick_20_666666_40x40.png
  19. BIN
      web/js/images/ui-bg_flat_10_000000_40x100.png
  20. BIN
      web/js/images/ui-bg_glass_100_f6f6f6_1x400.png
  21. BIN
      web/js/images/ui-bg_glass_100_fdf5ce_1x400.png
  22. BIN
      web/js/images/ui-bg_glass_65_ffffff_1x400.png
  23. BIN
      web/js/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  24. BIN
      web/js/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  25. BIN
      web/js/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  26. BIN
      web/js/images/ui-icons_222222_256x240.png
  27. BIN
      web/js/images/ui-icons_228ef1_256x240.png
  28. BIN
      web/js/images/ui-icons_ef8c08_256x240.png
  29. BIN
      web/js/images/ui-icons_ffd27a_256x240.png
  30. BIN
      web/js/images/ui-icons_ffffff_256x240.png
  31. 6 0
      web/js/jquery-ui-1.10.1.autocomplete.min.js

+ 5 - 0
app/Resources/AdmingeneratorGeneratorBundle/views/base_admin_assetic_less.html.twig View File

43
         <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ asset('bundles/admingeneratorgenerator/ico/apple-touch-icon-72-precomposed.png') }}">
43
         <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ asset('bundles/admingeneratorgenerator/ico/apple-touch-icon-72-precomposed.png') }}">
44
         <link rel="apple-touch-icon-precomposed" href="{{ asset('bundles/admingeneratorgenerator/ico/apple-touch-icon-57-precomposed.png') }}">
44
         <link rel="apple-touch-icon-precomposed" href="{{ asset('bundles/admingeneratorgenerator/ico/apple-touch-icon-57-precomposed.png') }}">
45
     {% endblock %}
45
     {% endblock %}
46
+    
47
+    
48
+    <link rel="stylesheet" href="{{ asset('css/jquery-ui-1.10.1.autocomplete.min.css') }}" type="text/css" media="all" />
49
+    <script type="text/javascript" src="{{ asset('js/jquery-ui-1.10.1.autocomplete.min.js') }}"></script>
50
+    
46
   </head>
51
   </head>
47
 
52
 
48
   <body>
53
   <body>

+ 4 - 0
app/config/routing.yml View File

52
     resource: "@AdmingeneratorGeneratorBundle/Resources/config/routing.yml"
52
     resource: "@AdmingeneratorGeneratorBundle/Resources/config/routing.yml"
53
     prefix:   /
53
     prefix:   /
54
 
54
 
55
+shtumi_useful:
56
+    resource: '@ShtumiUsefulBundle/Resources/config/routing.xml'
57
+    prefix:   /system/search/
58
+
55
 ########## ADMIN
59
 ########## ADMIN
56
 MuzichAdminBundle_admin_muzich_admin_bundle_admin_element:
60
 MuzichAdminBundle_admin_muzich_admin_bundle_admin_element:
57
     resource: "@MuzichAdminBundle/Controller/Admin_element/"
61
     resource: "@MuzichAdminBundle/Controller/Admin_element/"

+ 5 - 5
src/Muzich/AdminBundle/Resources/config/Admin_element-generator.yml View File

6
   bundle_name: AdminBundle
6
   bundle_name: AdminBundle
7
   fields:
7
   fields:
8
     owner:
8
     owner:
9
-      label: Owner name
10
-      sort_on: owner.name
11
-      getter: owner.name
12
-      addFormOptions:
13
-        property: name
9
+      formType: shtumi_ajax_autocomplete
10
+      formOptions:
11
+        entity_alias: users
14
 
12
 
15
 builders:
13
 builders:
16
   list:
14
   list:
37
         "Relations" : [owner, group]
35
         "Relations" : [owner, group]
38
         "System" : [need_tags]
36
         "System" : [need_tags]
39
       actions:
37
       actions:
38
+        save: ~
40
         list: ~
39
         list: ~
41
   edit:
40
   edit:
42
     params:
41
     params:
46
         "Relations" : [owner, group]
45
         "Relations" : [owner, group]
47
         "System" : [need_tags]
46
         "System" : [need_tags]
48
       actions:
47
       actions:
48
+        save: ~
49
         list: ~
49
         list: ~
50
   show:
50
   show:
51
     params:
51
     params:

+ 11 - 3
src/Muzich/AdminBundle/Resources/config/Admin_element_tags_proposition-generator.yml View File

3
   model: Muzich\CoreBundle\Entity\ElementTagsProposition
3
   model: Muzich\CoreBundle\Entity\ElementTagsProposition
4
   namespace_prefix: Muzich
4
   namespace_prefix: Muzich
5
   bundle_name: AdminBundle
5
   bundle_name: AdminBundle
6
-  fields: ~
6
+  fields:
7
+    element:
8
+      formType: shtumi_ajax_autocomplete
9
+      formOptions:
10
+        entity_alias: elements
11
+    user:
12
+      formType: shtumi_ajax_autocomplete
13
+      formOptions:
14
+        entity_alias: users
7
 
15
 
8
 builders:
16
 builders:
9
   list:
17
   list:
10
     params:
18
     params:
11
       title: List for elements tags propositions
19
       title: List for elements tags propositions
12
       display: [ id, element, user, tags ]
20
       display: [ id, element, user, tags ]
13
-      actions:
14
-        new: ~
15
       object_actions:
21
       object_actions:
16
         show: ~
22
         show: ~
17
         edit: ~
23
         edit: ~
24
       title: New object for AdminBundle
30
       title: New object for AdminBundle
25
       display: [ element, user, tags ]
31
       display: [ element, user, tags ]
26
       actions:
32
       actions:
33
+        save: ~
27
         list: ~
34
         list: ~
28
   edit:
35
   edit:
29
     params:
36
     params:
30
       title: "You're editing tags propotions for \"%object%\"|{ %object%: ElementTagsProposition.element.name }|"
37
       title: "You're editing tags propotions for \"%object%\"|{ %object%: ElementTagsProposition.element.name }|"
31
       display: [ element, user, tags ]
38
       display: [ element, user, tags ]
32
       actions:
39
       actions:
40
+        save: ~
33
         list: ~
41
         list: ~
34
   show:
42
   show:
35
     params:
43
     params:

+ 7 - 1
src/Muzich/AdminBundle/Resources/config/Admin_event_archive-generator.yml View File

3
   model: Muzich\CoreBundle\Entity\EventArchive
3
   model: Muzich\CoreBundle\Entity\EventArchive
4
   namespace_prefix: Muzich
4
   namespace_prefix: Muzich
5
   bundle_name: AdminBundle
5
   bundle_name: AdminBundle
6
-  fields: ~
6
+  fields:
7
+    user:
8
+      formType: shtumi_ajax_autocomplete
9
+      formOptions:
10
+        entity_alias: users
7
 
11
 
8
 builders:
12
 builders:
9
   list:
13
   list:
23
       title: New Event archive
27
       title: New Event archive
24
       display: [ type, user, count]
28
       display: [ type, user, count]
25
       actions:
29
       actions:
30
+        save: ~
26
         list: ~
31
         list: ~
27
   edit:
32
   edit:
28
     params:
33
     params:
29
       title: "You're editing event archive for \"%object%\"|{ %object%: EventArchive.user.username }|"
34
       title: "You're editing event archive for \"%object%\"|{ %object%: EventArchive.user.username }|"
30
       display: [ type, user, count]
35
       display: [ type, user, count]
31
       actions:
36
       actions:
37
+        save: ~
32
         list: ~
38
         list: ~
33
   show:
39
   show:
34
     params:
40
     params:

+ 11 - 1
src/Muzich/AdminBundle/Resources/config/Admin_follow_group-generator.yml View File

3
   model: Muzich\CoreBundle\Entity\FollowGroup
3
   model: Muzich\CoreBundle\Entity\FollowGroup
4
   namespace_prefix: Muzich
4
   namespace_prefix: Muzich
5
   bundle_name: AdminBundle
5
   bundle_name: AdminBundle
6
-  fields: ~
6
+  fields:
7
+    follower:
8
+      formType: shtumi_ajax_autocomplete
9
+      formOptions:
10
+        entity_alias: users
11
+    group:
12
+      formType: shtumi_ajax_autocomplete
13
+      formOptions:
14
+        entity_alias: groups
7
 
15
 
8
 builders:
16
 builders:
9
   list:
17
   list:
24
       title: New object for Group Follow
32
       title: New object for Group Follow
25
       display: [ follower, group ]
33
       display: [ follower, group ]
26
       actions:
34
       actions:
35
+        save: ~
27
         list: ~
36
         list: ~
28
   edit:
37
   edit:
29
     params:
38
     params:
30
       title: "You're editing the object \"%object%\"|{ %object%: FollowGroup.group.name }|"
39
       title: "You're editing the object \"%object%\"|{ %object%: FollowGroup.group.name }|"
31
       display: [ follower, group ]
40
       display: [ follower, group ]
32
       actions:
41
       actions:
42
+        save: ~
33
         list: ~
43
         list: ~
34
   show:
44
   show:
35
     params:
45
     params:

+ 11 - 1
src/Muzich/AdminBundle/Resources/config/Admin_follow_user-generator.yml View File

3
   model: Muzich\CoreBundle\Entity\FollowUser
3
   model: Muzich\CoreBundle\Entity\FollowUser
4
   namespace_prefix: Muzich
4
   namespace_prefix: Muzich
5
   bundle_name: AdminBundle
5
   bundle_name: AdminBundle
6
-  fields: ~
6
+  fields:
7
+    follower:
8
+      formType: shtumi_ajax_autocomplete
9
+      formOptions:
10
+        entity_alias: users
11
+    followed:
12
+      formType: shtumi_ajax_autocomplete
13
+      formOptions:
14
+        entity_alias: users
7
 
15
 
8
 builders:
16
 builders:
9
   list:
17
   list:
24
       title: New object for User Follow
32
       title: New object for User Follow
25
       display: [ follower, followed ]
33
       display: [ follower, followed ]
26
       actions:
34
       actions:
35
+        save: ~
27
         list: ~
36
         list: ~
28
   edit:
37
   edit:
29
     params:
38
     params:
30
       title: "You're editing following for the object \"%object%\"|{ %object%: FollowUser.followed.username }|"
39
       title: "You're editing following for the object \"%object%\"|{ %object%: FollowUser.followed.username }|"
31
       display: [ follower, followed ]
40
       display: [ follower, followed ]
32
       actions:
41
       actions:
42
+        save: ~
33
         list: ~
43
         list: ~
34
   show:
44
   show:
35
     params:
45
     params:

+ 7 - 1
src/Muzich/AdminBundle/Resources/config/Admin_group-generator.yml View File

3
   model: Muzich\CoreBundle\Entity\Group
3
   model: Muzich\CoreBundle\Entity\Group
4
   namespace_prefix: Muzich
4
   namespace_prefix: Muzich
5
   bundle_name: AdminBundle
5
   bundle_name: AdminBundle
6
-  fields: ~
6
+  fields:
7
+    owner:
8
+      formType: shtumi_ajax_autocomplete
9
+      formOptions:
10
+        entity_alias: users
7
 
11
 
8
 builders:
12
 builders:
9
   list:
13
   list:
24
       title: New Group
28
       title: New Group
25
       display: [name, owner, description, open]
29
       display: [name, owner, description, open]
26
       actions:
30
       actions:
31
+        save: ~
27
         list: ~
32
         list: ~
28
   edit:
33
   edit:
29
     params:
34
     params:
30
       title: "You're editing the object \"%object%\"|{ %object%: Group.name }|"
35
       title: "You're editing the object \"%object%\"|{ %object%: Group.name }|"
31
       display: [name, owner, description, open]
36
       display: [name, owner, description, open]
32
       actions:
37
       actions:
38
+        save: ~
33
         list: ~
39
         list: ~
34
   show:
40
   show:
35
     params:
41
     params:

+ 11 - 1
src/Muzich/AdminBundle/Resources/config/Admin_groups_tags_favorites-generator.yml View File

3
   model: Muzich\CoreBundle\Entity\GroupsTagsFavorites
3
   model: Muzich\CoreBundle\Entity\GroupsTagsFavorites
4
   namespace_prefix: Muzich
4
   namespace_prefix: Muzich
5
   bundle_name: AdminBundle
5
   bundle_name: AdminBundle
6
-  fields: ~
6
+  fields:
7
+    group:
8
+      formType: shtumi_ajax_autocomplete
9
+      formOptions:
10
+        entity_alias: groups
11
+    tag:
12
+      formType: shtumi_ajax_autocomplete
13
+      formOptions:
14
+        entity_alias: tags
7
 
15
 
8
 builders:
16
 builders:
9
   list:
17
   list:
23
       title: New Group tag favorite
31
       title: New Group tag favorite
24
       display: [ group, tag ]
32
       display: [ group, tag ]
25
       actions:
33
       actions:
34
+        save: ~
26
         list: ~
35
         list: ~
27
   edit:
36
   edit:
28
     params:
37
     params:
29
       title: "You're editing the object \"%object%\"|{ %object%: GroupsTagsFavorites.group.name }|"
38
       title: "You're editing the object \"%object%\"|{ %object%: GroupsTagsFavorites.group.name }|"
30
       display: [ group, tag ]
39
       display: [ group, tag ]
31
       actions:
40
       actions:
41
+        save: ~
32
         list: ~
42
         list: ~
33
   show:
43
   show:
34
     params:
44
     params:

+ 2 - 0
src/Muzich/AdminBundle/Resources/config/Admin_presubscription-generator.yml View File

23
       title: New Presubscription
23
       title: New Presubscription
24
       display: [ email ]
24
       display: [ email ]
25
       actions:
25
       actions:
26
+        save: ~
26
         list: ~
27
         list: ~
27
   edit:
28
   edit:
28
     params:
29
     params:
29
       title: "You're editing the object \"%object%\"|{ %object%: Presubscription.email }|"
30
       title: "You're editing the object \"%object%\"|{ %object%: Presubscription.email }|"
30
       display: [ email ]
31
       display: [ email ]
31
       actions:
32
       actions:
33
+        save: ~
32
         list: ~
34
         list: ~
33
   show:
35
   show:
34
     params:
36
     params:

+ 2 - 0
src/Muzich/AdminBundle/Resources/config/Admin_registration_token-generator.yml View File

23
       title: New Registration Token
23
       title: New Registration Token
24
       display: [ token, count, count_max ]
24
       display: [ token, count, count_max ]
25
       actions:
25
       actions:
26
+        save: ~
26
         list: ~
27
         list: ~
27
   edit:
28
   edit:
28
     params:
29
     params:
29
       title: "You're editing the object \"%object%\"|{ %object%: RegistrationToken.token }|"
30
       title: "You're editing the object \"%object%\"|{ %object%: RegistrationToken.token }|"
30
       display: [ token, count, count_max ]
31
       display: [ token, count, count_max ]
31
       actions:
32
       actions:
33
+        save: ~
32
         list: ~
34
         list: ~
33
   show:
35
   show:
34
     params:
36
     params:

+ 2 - 0
src/Muzich/AdminBundle/Resources/config/Admin_tag-generator.yml View File

27
       display:
27
       display:
28
         "General" : [ name ]
28
         "General" : [ name ]
29
       actions:
29
       actions:
30
+        save: ~
30
         list: ~
31
         list: ~
31
   edit:
32
   edit:
32
     params:
33
     params:
34
       display:
35
       display:
35
         "General" : [ name ]
36
         "General" : [ name ]
36
       actions:
37
       actions:
38
+        save: ~
37
         list: ~
39
         list: ~
38
   show:
40
   show:
39
     params:
41
     params:

+ 2 - 0
src/Muzich/AdminBundle/Resources/config/Admin_user-generator.yml View File

29
         "Moderation": [ bad_report_count, moderated_element_count, moderated_tag_count, moderated_comment_count ]
29
         "Moderation": [ bad_report_count, moderated_element_count, moderated_tag_count, moderated_comment_count ]
30
         "System": [ cgu_accepted, mail_newsletter, mail_partner, enabled ]
30
         "System": [ cgu_accepted, mail_newsletter, mail_partner, enabled ]
31
       actions:
31
       actions:
32
+        save: ~
32
         list: ~
33
         list: ~
33
   edit:
34
   edit:
34
     params:
35
     params:
39
         "Moderation": [ bad_report_count, moderated_element_count, moderated_tag_count, moderated_comment_count ]
40
         "Moderation": [ bad_report_count, moderated_element_count, moderated_tag_count, moderated_comment_count ]
40
         "System": [ cgu_accepted, mail_newsletter, mail_partner, enabled ]
41
         "System": [ cgu_accepted, mail_newsletter, mail_partner, enabled ]
41
       actions:
42
       actions:
43
+        save: ~
42
         list: ~
44
         list: ~
43
   show:
45
   show:
44
     params:
46
     params:

+ 11 - 1
src/Muzich/AdminBundle/Resources/config/Admin_users_tags_favorites-generator.yml View File

3
   model: Muzich\CoreBundle\Entity\UsersTagsFavorites
3
   model: Muzich\CoreBundle\Entity\UsersTagsFavorites
4
   namespace_prefix: Muzich
4
   namespace_prefix: Muzich
5
   bundle_name: AdminBundle
5
   bundle_name: AdminBundle
6
-  fields: ~
6
+  fields:
7
+    user:
8
+      formType: shtumi_ajax_autocomplete
9
+      formOptions:
10
+        entity_alias: users
11
+    tag:
12
+      formType: shtumi_ajax_autocomplete
13
+      formOptions:
14
+        entity_alias: tags
7
 
15
 
8
 builders:
16
 builders:
9
   list:
17
   list:
23
       title: New User tag favorite
31
       title: New User tag favorite
24
       display: [ user, tag ]
32
       display: [ user, tag ]
25
       actions:
33
       actions:
34
+        save: ~
26
         list: ~
35
         list: ~
27
   edit:
36
   edit:
28
     params:
37
     params:
29
       title: "You're editing an tag favorite \"%object%\"|{ %object%: UsersTagsFavorites.user.username }|"
38
       title: "You're editing an tag favorite \"%object%\"|{ %object%: UsersTagsFavorites.user.username }|"
30
       display: [ user, tag ]
39
       display: [ user, tag ]
31
       actions:
40
       actions:
41
+        save: ~
32
         list: ~
42
         list: ~
33
   show:
43
   show:
34
     params:
44
     params:

File diff suppressed because it is too large
+ 5 - 0
web/css/jquery-ui-1.10.1.autocomplete.min.css


BIN
web/js/images/animated-overlay.gif View File


BIN
web/js/images/ui-bg_diagonals-thick_18_b81900_40x40.png View File


BIN
web/js/images/ui-bg_diagonals-thick_20_666666_40x40.png View File


BIN
web/js/images/ui-bg_flat_10_000000_40x100.png View File


BIN
web/js/images/ui-bg_glass_100_f6f6f6_1x400.png View File


BIN
web/js/images/ui-bg_glass_100_fdf5ce_1x400.png View File


BIN
web/js/images/ui-bg_glass_65_ffffff_1x400.png View File


BIN
web/js/images/ui-bg_gloss-wave_35_f6a828_500x100.png View File


BIN
web/js/images/ui-bg_highlight-soft_100_eeeeee_1x100.png View File


BIN
web/js/images/ui-bg_highlight-soft_75_ffe45c_1x100.png View File


BIN
web/js/images/ui-icons_222222_256x240.png View File


BIN
web/js/images/ui-icons_228ef1_256x240.png View File


BIN
web/js/images/ui-icons_ef8c08_256x240.png View File


BIN
web/js/images/ui-icons_ffd27a_256x240.png View File


BIN
web/js/images/ui-icons_ffffff_256x240.png View File


File diff suppressed because it is too large
+ 6 - 0
web/js/jquery-ui-1.10.1.autocomplete.min.js