Bläddra i källkod

Customer Portal: simplified the contents of the home page (still requires icons and a review of the CSS)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4110 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 år sedan
förälder
incheckning
3c542f28dc

+ 0 - 23
datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml

@@ -1764,29 +1764,6 @@
 	<module_designs>
 		<module_design id="itop-portal">
 			<bricks>
-				<brick id="create-user-request" xsi:type="Combodo\iTop\Portal\Brick\CreateBrick">
-					<active _delta="redefine">false</active>
-				</brick>
-				<brick id="create-incident-itil" xsi:type="Combodo\iTop\Portal\Brick\CreateBrick" _delta="define">
-					<active>true</active>
-					<rank>
-						<default>3.5</default>
-					</rank>
-					<width>8</width>
-					<modal>true</modal>
-					<title>
-						<default>Portal:CreateNewIncidentItil</default>
-					</title>
-					<description>Un deux trois nous irons au bois, quatre cinq six cueillir des cerises. Sept huit neuf, das un panier neuf.</description>
-					<decoration_class>
-						<default>fa fa-plus fa-2x</default>
-					</decoration_class>
-					<class>Incident</class>
-					<!-- Class that will be created with the form -->
-					<rules>
-						<rule id="contact-to-userrequest"/>
-					</rules>
-				</brick>
 				<brick id="services">
 					<levels>
 						<level id="1">

+ 3 - 3
datamodels/2.x/itop-knownerror-mgmt/datamodel.itop-knownerror-mgmt.xml

@@ -605,13 +605,13 @@
         <brick id="faq" xsi:type="Combodo\iTop\Portal\Brick\BrowseBrick" _delta="define">
           <active>true</active>
           <rank>
-			  <default>7</default>
+			  <default>40</default>
 		  </rank>
-          <width>4</width>
+          <width>12</width>
 			<title>
 				<default>Brick:Portal:FAQ:Title</default>
 			</title>
-			<description>Un deux trois nous irons au bois, quatre cinq six cueillir des cerises. Sept huit neuf, das un panier neuf.</description>
+			<description>Brick:Portal:FAQ:Title+</description>
 			<decoration_class>
 				<default>fa fa-map fa-2x</default>
 			</decoration_class>

+ 4 - 3
datamodels/2.x/itop-knownerror-mgmt/en.dict.itop-knownerror-mgmt.php

@@ -179,12 +179,13 @@ Dict::Add('EN US', 'English', 'English', array(
 	'Menu:NewError+' => 'Creation of a new known error',
 	'Menu:SearchError' => 'Search for known errors',
 	'Menu:SearchError+' => 'Search for known errors',
-        'Menu:Problem:KnownErrors' => 'All known errors',
-        'Menu:Problem:KnownErrors+' => 'All known errors',
+	'Menu:Problem:KnownErrors' => 'All known errors',
+	'Menu:Problem:KnownErrors+' => 'All known errors',
 	'Menu:FAQCategory' => 'FAQ categories',
 	'Menu:FAQCategory+' => 'All FAQ categories',
 	'Menu:FAQ' => 'FAQs',
 	'Menu:FAQ+' => 'All FAQs',
 
+	'Brick:Portal:FAQ:Title' => 'Frequently Asked Questions',
+	'Brick:Portal:FAQ:Title+' => 'Search for the right answer within the knowledge base',
 ));
-?>

+ 4 - 3
datamodels/2.x/itop-knownerror-mgmt/fr.dict.itop-knownerror-mgmt.php

@@ -152,12 +152,13 @@ Dict::Add('FR FR', 'French', 'Français', array(
 	'Menu:NewError+' => 'Créer une erreur connue',
 	'Menu:SearchError' => 'Rechercher une erreur connue',
 	'Menu:SearchError+' => 'Rechercher une erreur connue',
-        'Menu:Problem:KnownErrors' => 'Toutes les erreurs connues',
-        'Menu:Problem:KnownErrors+' => 'Toutes les erreurs connues',
+	'Menu:Problem:KnownErrors' => 'Toutes les erreurs connues',
+	'Menu:Problem:KnownErrors+' => 'Toutes les erreurs connues',
 	'Menu:FAQCategory' => 'Catégories de FAQ',
 	'Menu:FAQCategory+' => 'Toutes les catégories de FAQ',
 	'Menu:FAQ' => 'FAQs',
 	'Menu:FAQ+' => 'Toutes les  FAQs',
 
+	'Brick:Portal:FAQ:Title' => 'Foire Aux Questions',
+	'Brick:Portal:FAQ:Title+' => 'Recherchez la réponse à vos questions dans la base de connaissances',
 ));
-?>

+ 1 - 19
datamodels/2.x/itop-portal-base/portal/src/views/bricks/tile.html.twig

@@ -1,24 +1,6 @@
 {# itop-portal-base/portal/src/views/bricks/tile.html.twig #}
 {# Base brick tile layout #}
 
-{% if brick.GetId == 'create-user-request' %}
-	{% set sIcon = 'warning-sign-orange-100px.png' %}
-{% elseif brick.GetId == 'create-user-request-itil' %}
-	{% set sIcon = 'headset-mic-orange-100px.png' %}
-{% elseif brick.GetId == 'create-incident-itil' %}
-	{% set sIcon = 'warning-sign-orange-100px.png' %}
-{% elseif brick.GetId == 'ongoing-tickets-for-portal-user' %}
-	{% set sIcon = 'headset-mic-orange-100px.png' %}
-{% elseif brick.GetId == 'closed-tickets-for-portal-user' %}
-	{% set sIcon = 'laptop-cursor-orange-100px.png' %}
-{% elseif brick.GetId == 'services' %}
-	{% set sIcon = 'checklist-ok-orange-100px.png' %}
-{% elseif brick.GetId == 'faq' %}
-	{% set sIcon = 'puzzle-piece-orange-100px.png' %}
-{% else %}
-	{% set sIcon = '' %}
-{% endif %}
-
 <div class="col-xs-12 col-sm-{{ brick.GetWidth }}">
 	{% block pTileWrapper %}
 		<a href="{{ app.url_generator.generate(brick.GetRouteName, {sBrickId: brick.GetId}) }}{% if app['combodo.portal.instance.routes'][brick.GetRouteName]['hash'] is defined %}#{{ app['combodo.portal.instance.routes'][brick.GetRouteName]['hash'] }}{% endif %}"
@@ -32,7 +14,7 @@
 			<div clss="tile_body">
 				<div class="tile_title">{{ brick.GetTitleHome|dict_s }}</div>
 				{% if brick.HasDescription %}
-					<div class="tile_description">{{ brick.GetDescription }}</div>
+					<div class="tile_description">{{ brick.GetDescription|dict_s }}</div>
 				{% endif %}
 			</div>
 		</a>

+ 0 - 25
datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml

@@ -1858,31 +1858,6 @@
 	</menus>
 	<module_designs>
 		<module_design id="itop-portal">
-			<bricks>
-				<brick id="create-user-request" xsi:type="Combodo\iTop\Portal\Brick\CreateBrick">
-					<active _delta="redefine">false</active>
-				</brick>
-				<brick id="create-user-request-itil" xsi:type="Combodo\iTop\Portal\Brick\CreateBrick" _delta="define">
-					<active>true</active>
-					<rank>
-						<default>3</default>
-					</rank>
-					<width>8</width>
-					<modal>true</modal>
-					<title>
-						<default>Portal:CreateNewRequestItil</default>
-					</title>
-					<description>Un deux trois nous irons au bois, quatre cinq six cueillir des cerises. Sept huit neuf, das un panier neuf.</description>
-					<decoration_class>
-						<default>fa fa-plus fa-2x</default>
-					</decoration_class>
-					<class>UserRequest</class>
-					<!-- Class that will be created with the form -->
-					<rules>
-						<rule id="contact-to-userrequest"/>
-					</rules>
-				</brick>
-			</bricks>
 			<classes>
 				<class id="ServiceSubcategory">
 					<scopes>

+ 82 - 112
datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml

@@ -1016,49 +1016,93 @@
             </twig>
           </form>
         </brick>
-        <brick id="create-user-request" xsi:type="Combodo\iTop\Portal\Brick\CreateBrick">
+        <brick id="services" xsi:type="Combodo\iTop\Portal\Brick\BrowseBrick">
           <active>true</active>
-		  <!-- Optionnal tag : Bricks will be order as declared in the XML by default -->
+          <width>6</width>
           <rank>
-			  <default>2</default>
-			  <!-- <home>2</home> -->
-			  <!-- <navigation_menu>2</navigation_menu> -->
-		  </rank>
-          <width>8</width>
-          <modal>true</modal>
+            <default>10</default>
+          </rank>
           <title>
-			  <default>Portal:CreateNewRequest</default>
-			  <!-- <home>Portal:CreateNewRequest</home> -->
-			  <!-- <navigation_menu>Portal:CreateNewRequest</navigation_menu> -->
-		  </title>
-		  <!-- Optional tag : Shows a description in the brick home tile -->
-		  <description>Un deux trois nous irons au bois, quatre cinq six cueillir des cerises. Sept huit neuf, das un panier neuf.</description>
-		  <!-- Optional tag : Brick is visible by default -->
-		  <visible>
-			  <home>true</home>
-			  <navigation_menu>true</navigation_menu>
-		  </visible>
-		  <decoration_class>
-			  <default>fa fa-plus fa-2x</default>
-			  <!-- <home>fa fa-plus</home> -->
-			  <!-- <navigation_menu>fa fa-plus</navigation_menu> -->
-		  </decoration_class>
-          <class>UserRequest</class>
-          <!-- Class that will be created with the form -->
-          <rules>
-            <rule id="contact-to-userrequest"/>
-          </rules>
+            <default>Portal:CreateNewRequest</default>
+          </title>
+          <description>Portal:CreateNewRequest+</description>
+          <decoration_class>
+            <default>fa fa-map fa-2x</default>
+          </decoration_class>
+          <!-- <fields  /> Optional tag to add attributes to the table by their code, can be specified for each level -->
+          <levels>
+            <level id="1">
+              <class>ServiceFamily</class>
+              <levels>
+                <!-- Level IDs must be numeric -->
+                <level id="1">
+                  <!-- Can be either a class tag with the class name or an oql tag with the query -->
+                  <class>Service</class>
+                  <!-- Attribute code of the above class that point to the upper level class -->
+                  <parent_att>servicefamily_id</parent_att>
+                  <!-- Attribute code to use to display the object name, default is 'name'. -->
+                  <name_att/>
+                  <!-- Description text from attribute of above class [from the OQL] -->
+                  <tooltip_att>description</tooltip_att>
+                  <!-- Title of the level, will be display in lists and others browse modes -->
+                  <title>Service</title>
+                  <!-- Optional tag to add attributes to the table by their code, can be specified for each level -->
+                  <!-- <fields  /> -->
+                  <!-- Can be empty on intermediate levels, default is drilldown -->
+                  <actions>
+                    <action id="drilldown" xsi:type="drilldown"/>
+                  </actions>
+                  <levels>
+                    <level id="1">
+                      <!-- Note : We could have used just a class tag and putted the OQL in the scope for everybody -->
+                      <oql><![CDATA[SELECT ServiceSubcategory WHERE ServiceSubcategory.status != 'obsolete']]></oql>
+                      <parent_att>service_id</parent_att>
+                      <name_att/>
+                      <tooltip_att>description</tooltip_att>
+                      <title>Sous-Service</title>
+                      <actions>
+                        <action id="view" xsi:type="view"/>
+                        <action id="create_from_this" xsi:type="create_from_this">
+                          <!-- Can be either a class tag containing the class of the object to create, or a static method taking the origin object as a parameter and that will return a object of the desired class -->
+                          <!-- (eg. \Ticket::FromServiceSubcategory($oOrigin) that should return either a UserRequest or Incident regarding the request type) -->
+                          <class>UserRequest</class>
+                          <!-- Optional tag that can be used on any action type -->
+                          <!--<title>Créer un ticket</title>-->
+                          <!--<icon_class>glyphicon glyphicon-plus</icon_class>-->
+                          <rules>
+                            <rule id="contact-to-userrequest"/>
+                            <rule id="servicesubcategory-to-userrequest"/>
+                          </rules>
+                        </action>
+                      </actions>
+                      <levels/>
+                    </level>
+                  </levels>
+                </level>
+              </levels>
+            </level>
+          </levels>
+
+          <browse_modes>
+            <availables>
+              <mode id="list"/>
+              <mode id="tree"/>
+            </availables>
+            <default>tree</default>
+          </browse_modes>
+          <data_loading>auto</data_loading>
+          <!-- lazy|full|auto. Let the consultant choose if the list/tree data are load progressivly at each page/level or in one-shot or if it is up to the system regarding the "lazy_loading_threshold" parameter -->
         </brick>
         <brick id="ongoing-tickets-for-portal-user" xsi:type="Combodo\iTop\Portal\Brick\ManageBrick">
           <active>true</active>
           <rank>
-			  <default>4</default>
+			  <default>20</default>
 		  </rank>
-          <width>4</width>
+          <width>6</width>
           <title>
 			  <default>Portal:ShowOngoing</default>
 		  </title>
-		  <description>Un deux trois nous irons au bois, quatre cinq six cueillir des cerises. Sept huit neuf, das un panier neuf.</description>
+		  <description>Portal:ShowOngoing+</description>
 		  <decoration_class>
 			  <default>fa fa-pencil-square fa-2x</default>
 		  </decoration_class>
@@ -1102,13 +1146,16 @@
         <brick id="closed-tickets-for-portal-user" xsi:type="Combodo\iTop\Portal\Brick\ManageBrick">
           <active>true</active>
           <rank>
-			  <default>5</default>
+			  <menu>50</menu>
 		  </rank>
-          <width>4</width>
+          <visible>
+            <home>false</home>
+          </visible>
+          <width>12</width>
           <title>
 			  <default>Portal:ShowClosed</default>
 		  </title>
-		  <description>Un deux trois nous irons au bois, quatre cinq six cueillir des cerises. Sept huit neuf, das un panier neuf.</description>
+		  <description>Portal:ShowClosed+</description>
 		  <decoration_class>
 			  <default>fa fa-pencil-square fa-2x</default>
 		  </decoration_class>
@@ -1126,83 +1173,6 @@
           </fields>
           <data_loading>auto</data_loading>
         </brick>
-        <brick id="services" xsi:type="Combodo\iTop\Portal\Brick\BrowseBrick">
-          <active>true</active>
-          <width>4</width>
-          <rank>
-			  <default>6</default>
-		  </rank>
-          <title>
-			  <default>Brick:Portal:Services:Title</default>
-		  </title>
-		  <description>Un deux trois nous irons au bois, quatre cinq six cueillir des cerises. Sept huit neuf, das un panier neuf.</description>
-		  <decoration_class>
-			  <default>fa fa-map fa-2x</default>
-		  </decoration_class>
-          <!-- <fields  /> Optional tag to add attributes to the table by their code, can be specified for each level -->
-          <levels>
-            <level id="1">
-              <class>ServiceFamily</class>
-              <levels>
-                <!-- Level IDs must be numeric -->
-                <level id="1">
-                  <!-- Can be either a class tag with the class name or an oql tag with the query -->
-                  <class>Service</class>
-                  <!-- Attribute code of the above class that point to the upper level class -->
-                  <parent_att>servicefamily_id</parent_att>
-                  <!-- Attribute code to use to display the object name, default is 'name'. -->
-                  <name_att/>
-                  <!-- Description text from attribute of above class [from the OQL] -->
-                  <tooltip_att>description</tooltip_att>
-                  <!-- Title of the level, will be display in lists and others browse modes -->
-                  <title>Service</title>
-                  <!-- Optional tag to add attributes to the table by their code, can be specified for each level -->
-                  <!-- <fields  /> -->
-                  <!-- Can be empty on intermediate levels, default is drilldown -->
-                  <actions>
-                    <action id="drilldown" xsi:type="drilldown"/>
-                  </actions>
-                  <levels>
-                    <level id="1">
-                      <!-- Note : We could have used just a class tag and putted the OQL in the scope for everybody -->
-                      <oql><![CDATA[SELECT ServiceSubcategory WHERE ServiceSubcategory.status != 'obsolete']]></oql>
-                      <parent_att>service_id</parent_att>
-                      <name_att/>
-                      <tooltip_att>description</tooltip_att>
-                      <title>Sous-Service</title>
-                      <actions>
-                        <action id="view" xsi:type="view"/>
-                        <action id="create_from_this" xsi:type="create_from_this">
-                          <!-- Can be either a class tag containing the class of the object to create, or a static method taking the origin object as a parameter and that will return a object of the desired class -->
-                          <!-- (eg. \Ticket::FromServiceSubcategory($oOrigin) that should return either a UserRequest or Incident regarding the request type) -->
-                          <class>UserRequest</class>
-                          <!-- Optional tag that can be used on any action type -->
-                          <!--<title>Créer un ticket</title>-->
-						  <!--<icon_class>glyphicon glyphicon-plus</icon_class>-->
-                          <rules>
-                            <rule id="contact-to-userrequest"/>
-                            <rule id="servicesubcategory-to-userrequest"/>
-                          </rules>
-                        </action>
-                      </actions>
-                      <levels/>
-                    </level>
-                  </levels>
-                </level>
-              </levels>
-            </level>
-          </levels>
-
-          <browse_modes>
-            <availables>
-              <mode id="list"/>
-              <mode id="tree"/>
-            </availables>
-            <default>tree</default>
-          </browse_modes>
-          <data_loading>auto</data_loading>
-          <!-- lazy|full|auto. Let the consultant choose if the list/tree data are load progressivly at each page/level or in one-shot or if it is up to the system regarding the "lazy_loading_threshold" parameter -->
-        </brick>
       </bricks>
       <forms>
         <form id="servicesubcategory">

+ 0 - 4
datamodels/2.x/itop-tickets/en.dict.itop-tickets.php

@@ -240,8 +240,4 @@ Dict::Add('EN US', 'English', 'English', array(
 	'portal:itop-portal' => 'Standard portal', // This is the portal name that will be displayed in portal dispatcher (eg. URL in menus)
 	'Page:DefaultTitle' => 'iTop - User portal',
 	'Brick:Portal:UserProfile:Title' => 'My profile',
-	'Brick:Portal:CreateUserRequest:Title' => 'Create a request',
-	'Brick:Portal:ManageTickets:Title' => 'My requests',
-	'Brick:Portal:Services:Title' => 'Service catalog',
-	'Brick:Portal:FAQ:Title' => 'FAQ',
 ));

+ 0 - 4
datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php

@@ -225,8 +225,4 @@ Dict::Add('FR FR', 'French', 'Français', array(
 	'portal:itop-portal' => 'Portail standard', // This is the portal name that will be displayed in portal dispatcher (eg. URL in menus)
 	'Page:DefaultTitle' => 'iTop - Portail utilisateur',
 	'Brick:Portal:UserProfile:Title' => 'Mon profil',
-	'Brick:Portal:CreateUserRequest:Title' => 'Créer un ticket',
-	'Brick:Portal:ManageTickets:Title' => 'Mes tickets',
-	'Brick:Portal:Services:Title' => 'Catalogue de services',
-	'Brick:Portal:FAQ:Title' => 'FAQ',
 ));

+ 2 - 0
dictionaries/dictionary.itop.ui.php

@@ -1006,8 +1006,10 @@ When associated with a trigger, each action is given an "order" number, specifyi
 	'Portal:WelcomeUserOrg' => 'Welcome %1$s, from %2$s',
 	'Portal:TitleDetailsFor_Request' => 'Details for request',
 	'Portal:ShowOngoing' => 'Show open requests',
+	'Portal:ShowOngoing+' => 'Requests being processed',
 	'Portal:ShowClosed' => 'Show closed requests',
 	'Portal:CreateNewRequest' => 'Create a new request',
+	'Portal:CreateNewRequest+' => 'Select a service and submit your request',
 	'Portal:CreateNewRequestItil' => 'Create a new request',
 	'Portal:CreateNewIncidentItil' => 'Create a new incident report',
 	'Portal:ChangeMyPassword' => 'Change my password',

+ 2 - 0
dictionaries/fr.dictionary.itop.ui.php

@@ -869,8 +869,10 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
 	'Portal:WelcomeUserOrg' => 'Bienvenue %1$s (%2$s)',
 	'Portal:TitleDetailsFor_Request' => 'Détail de la requête',
 	'Portal:ShowOngoing' => 'Requêtes en cours',
+	'Portal:ShowOngoing+' => 'Liste des requêtes en cours de traitement',
 	'Portal:ShowClosed' => 'Requêtes fermées',
 	'Portal:CreateNewRequest' => 'Créer une nouvelle requête',
+	'Portal:CreateNewRequest+' => 'Sélectionnez un service et soumettez votre requête',
 	'Portal:CreateNewRequestItil' => 'Créer une nouvelle requête',
 	'Portal:CreateNewIncidentItil' => 'Indiquer une panne',
 	'Portal:ChangeMyPassword' => 'Changer mon mot de passe',