mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-10-31 02:04:53 +00:00 
			
		
		
		
	Add a notice when the user does not belong to any group.
This commit is contained in:
		| @@ -11,6 +11,11 @@ | |||||||
|     padding-top: 50px; |     padding-top: 50px; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .groups-main-page .no-group-notice { | ||||||
|  |     margin-top: 10px; | ||||||
|  |     text-align: center; | ||||||
|  | } | ||||||
|  |  | ||||||
| .groups-main-page .group-item { | .groups-main-page .group-item { | ||||||
|     text-align: justify; |     text-align: justify; | ||||||
|     margin-top: 10px; |     margin-top: 10px; | ||||||
|   | |||||||
| @@ -86,14 +86,25 @@ ComunicWeb.pages.groups.pages.main = { | |||||||
|      */ |      */ | ||||||
|     _display_list: function(target, list){ |     _display_list: function(target, list){ | ||||||
|          |          | ||||||
|  |         var has_group = false; | ||||||
|  |  | ||||||
|         for (const i in list) { |         for (const i in list) { | ||||||
|             if (list.hasOwnProperty(i)) { |             if (list.hasOwnProperty(i)) { | ||||||
|                 const group = list[i]; |                 const group = list[i]; | ||||||
|                  |                 has_group = true; | ||||||
|                 ComunicWeb.pages.groups.pages.main._display_group(group, target); |                 ComunicWeb.pages.groups.pages.main._display_group(group, target); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         //Check if the user does not belong to any groups | ||||||
|  |         if(!has_group){ | ||||||
|  |             createElem2({ | ||||||
|  |                 appendTo: target,  | ||||||
|  |                 type: "div", | ||||||
|  |                 class: "no-group-notice", | ||||||
|  |                 innerHTML:"You do not belong to any group yet." | ||||||
|  |             }); | ||||||
|  |         } | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pierre HUBERT
					Pierre HUBERT