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,6 +43,11 @@
43 43
         <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ asset('bundles/admingeneratorgenerator/ico/apple-touch-icon-72-precomposed.png') }}">
44 44
         <link rel="apple-touch-icon-precomposed" href="{{ asset('bundles/admingeneratorgenerator/ico/apple-touch-icon-57-precomposed.png') }}">
45 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 51
   </head>
47 52
 
48 53
   <body>

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

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

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

@@ -6,11 +6,9 @@ params:
6 6
   bundle_name: AdminBundle
7 7
   fields:
8 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 13
 builders:
16 14
   list:
@@ -37,6 +35,7 @@ builders:
37 35
         "Relations" : [owner, group]
38 36
         "System" : [need_tags]
39 37
       actions:
38
+        save: ~
40 39
         list: ~
41 40
   edit:
42 41
     params:
@@ -46,6 +45,7 @@ builders:
46 45
         "Relations" : [owner, group]
47 46
         "System" : [need_tags]
48 47
       actions:
48
+        save: ~
49 49
         list: ~
50 50
   show:
51 51
     params:

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

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

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

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

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

@@ -3,7 +3,15 @@ params:
3 3
   model: Muzich\CoreBundle\Entity\FollowGroup
4 4
   namespace_prefix: Muzich
5 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 16
 builders:
9 17
   list:
@@ -24,12 +32,14 @@ builders:
24 32
       title: New object for Group Follow
25 33
       display: [ follower, group ]
26 34
       actions:
35
+        save: ~
27 36
         list: ~
28 37
   edit:
29 38
     params:
30 39
       title: "You're editing the object \"%object%\"|{ %object%: FollowGroup.group.name }|"
31 40
       display: [ follower, group ]
32 41
       actions:
42
+        save: ~
33 43
         list: ~
34 44
   show:
35 45
     params:

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

@@ -3,7 +3,15 @@ params:
3 3
   model: Muzich\CoreBundle\Entity\FollowUser
4 4
   namespace_prefix: Muzich
5 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 16
 builders:
9 17
   list:
@@ -24,12 +32,14 @@ builders:
24 32
       title: New object for User Follow
25 33
       display: [ follower, followed ]
26 34
       actions:
35
+        save: ~
27 36
         list: ~
28 37
   edit:
29 38
     params:
30 39
       title: "You're editing following for the object \"%object%\"|{ %object%: FollowUser.followed.username }|"
31 40
       display: [ follower, followed ]
32 41
       actions:
42
+        save: ~
33 43
         list: ~
34 44
   show:
35 45
     params:

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

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

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

@@ -3,7 +3,15 @@ params:
3 3
   model: Muzich\CoreBundle\Entity\GroupsTagsFavorites
4 4
   namespace_prefix: Muzich
5 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 16
 builders:
9 17
   list:
@@ -23,12 +31,14 @@ builders:
23 31
       title: New Group tag favorite
24 32
       display: [ group, tag ]
25 33
       actions:
34
+        save: ~
26 35
         list: ~
27 36
   edit:
28 37
     params:
29 38
       title: "You're editing the object \"%object%\"|{ %object%: GroupsTagsFavorites.group.name }|"
30 39
       display: [ group, tag ]
31 40
       actions:
41
+        save: ~
32 42
         list: ~
33 43
   show:
34 44
     params:

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

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

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

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

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

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

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

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

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

@@ -3,7 +3,15 @@ params:
3 3
   model: Muzich\CoreBundle\Entity\UsersTagsFavorites
4 4
   namespace_prefix: Muzich
5 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 16
 builders:
9 17
   list:
@@ -23,12 +31,14 @@ builders:
23 31
       title: New User tag favorite
24 32
       display: [ user, tag ]
25 33
       actions:
34
+        save: ~
26 35
         list: ~
27 36
   edit:
28 37
     params:
29 38
       title: "You're editing an tag favorite \"%object%\"|{ %object%: UsersTagsFavorites.user.username }|"
30 39
       display: [ user, tag ]
31 40
       actions:
41
+        save: ~
32 42
         list: ~
33 43
   show:
34 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