Skip to content

Commit

Permalink
Point design 2020 03 26 (#562)
Browse files Browse the repository at this point in the history
* Fix icons for organisations.

* Fix icons (2)

* Add favicon

* Remove some unhelpful help
  • Loading branch information
niladic authored Mar 26, 2020
1 parent 1330359 commit f36fee5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 38 deletions.
3 changes: 2 additions & 1 deletion app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="icon" type="image/png" href="@routes.Assets.versioned("images/favicon.png")">
<title>Administration+ - @title</title>
@webJarsUtil.locate("material.min.css").css()
@webJarsUtil.locate("roboto-fontface.css").css()
Expand Down Expand Up @@ -122,7 +123,7 @@
<footer class="drawer-footer mdl-color--deep-purple-900">
<img src='@routes.Assets.versioned("images/contact_phone_104x104.png")' class="contact-phone-icon">

<p><span class="mdl-typography--subhead">Besoin d'aide ?</span> <br>
<p><span class="mdl-typography--subhead">Besoin daide ?</span> <br>
Contactez-nous: <br>
<br>
<a href="mailto:@Constants.supportEmail" class="mdl-color-text--cyan-600">@Constants.supportEmail</a> <br>
Expand Down
1 change: 0 additions & 1 deletion app/views/myApplications.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ <h4 class="mdl-cell mdl-cell--8-col mdl-cell--12-col-phone">Mes demandes</h4>
Créer une demande
</button>
}
<span>Besoin d'aide ? Contactez-nous sur <a href="mailto:@Constants.supportEmail?subject=Aidez-moi%20avec%20Administration+">@Constants.supportEmail</a></span>
</div>
<br>
<span>FILTRER PAR </span><input style="width: 400px; max-width: 100%" type="search" placeholder="Saisir nom, numéro, description, etc" id="search-input" onsearch="onSearch()" oninput="onSearch()"/><br>
Expand Down
93 changes: 57 additions & 36 deletions app/views/showApplication.scala.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
@import _root_.helper.Time
@import _root_.helper.MDLForms._


@(currentUser: User, currentUserRights: Authorization.UserRights)(groupsWithUsersThatCanBeInvited: List[(UserGroup,List[User])], application: Application, answerToAgentsForm: Form[_], openedTab: String, currentArea: Area, userSignature: Option[String], attachments: Iterable[String] = Nil)(implicit webJarsUtil: org.webjars.play.WebJarsUtil, flash: Flash, messagesProvider: MessagesProvider, request: RequestHeader)


@organisationIcon(creatorUserName: String) = {
@Map("A+" -> "aplus",
"Pôle Emploi".toUpperCase() -> "pe",
"MSA" -> "msa",
"CPAM" -> "cpam",
"CRAM" -> "cpam",
"CNAM" -> "cpam",
"CAF" -> "caf",
"CNAF" -> "caf",
"CNAV" -> "cnav",
"CARSAT" -> "cnav",
"DGFIP" -> "dgfip",
"DDFIP" -> "dgfip",
"DRFIP" -> "dgfip",
"Défenseur des droits".toUpperCase() -> "ddd"
).find(a => creatorUserName.toUpperCase.contains(a._1)) match {
case Some((_,icon)) => {
<img class="mdl-list__item-avatar" src="@routes.Assets.versioned("images/admin/"+icon+"-icon.png")">
}
case None => {
<i class="material-icons mdl-list__item-avatar">person</i>
}
}
}


@main(currentUser, currentUserRights)(s"Demande de ${application.creatorUserName} - ${Area.fromId(application.area).get.name}") {
<style>
.mdl-list__item-primary-content {
Expand Down Expand Up @@ -170,13 +198,13 @@ <h2 class="mdl-card__title-text">@application.subject</h2>
</button>
</div>
</div>
<div class="mdl-card__supporting-text mdl-card--border do-not-print">
@if(currentUser.admin) {
<span style="font-weight: bold; color:red" class="do-not-print">Reférence interne pour les administrateurs: @application.internalId</span>
} else {
<span class="do-not-print"><i class="material-icons" style="vertical-align: middle;">help_outline</i> Besoin d'aide ? Contactez-nous sur <a href="mailto:@Constants.supportEmail?subject=Aidez-moi%20avec%20Administration+">@Constants.supportEmail</a></span>
}
</div>
@if(currentUser.admin) {
<div class="mdl-card__supporting-text mdl-card--border do-not-print">
<span style="font-weight: bold; color:red" class="do-not-print">
Reférence interne pour les administrateurs: @application.internalId
</span>
</div>
}
<div class="mdl-card__supporting-text mdl-card--border vertical-align--middle">
<i class="material-icons icon--light">chat_bubble</i> <span class="application__anwsers"><b>@application.answers.length</b> messages </span> |
<span class="application__age">Créée il y a @application.ageString (@Time.formatPatternFr(application.creationDate, "dd MMM YYYY - HH:mm")) </span> |
Expand Down Expand Up @@ -219,32 +247,28 @@ <h2 class="mdl-card__title-text">@application.subject</h2>
<div class="mdl-list mdl-cell mdl-cell--12-col">
Créée par
<div class="mdl-list__item">
<span class="mdl-list__item-primary-content">@Map("A+" -> "aplus", "Pôle Emploi".toUpperCase() -> "pe", "MSA" -> "msa", "CPAM" -> "cpam", "CRAM" -> "cpam", "CNAM" -> "cpam", "CAF" -> "caf", "CNAV" -> "cnav", "CARSAT" -> "cnav", "DGFIP" -> "dgfip", "DDFIP" -> "dgfip", "DRFIP" -> "dgfip", "Défenseur des droits".toUpperCase() -> "ddd").find(a => application.creatorUserName.toUpperCase.contains(a._1)) match {
case Some((_,icon)) => {<img class="mdl-list__item-avatar" src="@routes.Assets.versioned("images/admin/"+icon+"-icon.png")"> }
case None => {<i class="material-icons mdl-list__item-avatar">person</i> }
}
<div class="mdl-list__item-primary-content">
@organisationIcon(application.creatorUserName)
<span>@application.creatorUserName</span>
</span>
</div>
</div>
Participants à la discussion
@for((userId, userName) <- application.invitedUsers) {
<div class="mdl-list__item">
<span class="mdl-list__item-primary-content">@Map("A+" -> "aplus", "Pôle Emploi".toUpperCase() -> "pe", "MSA" -> "msa", "CPAM" -> "cpam", "CRAM" -> "cpam", "CPAM" -> "cpam", "CNAM" -> "cpam", "CAF" -> "caf", "CNAV" -> "cnav", "CARSAT" -> "cnav", "DGFIP" -> "dgfip", "DDFIP" -> "dgfip", "DRFIP" -> "dgfip", "Défenseur des droits".toUpperCase() -> "ddd").find(a => userName.toUpperCase.contains(a._1)) match {
case Some((_,icon)) => {<img class="mdl-list__item-avatar" src="@routes.Assets.versioned("images/admin/"+icon+"-icon.png")"> }
case None => {<i class="material-icons mdl-list__item-avatar">person</i> }
}
<span>@userName</span>
<span class="mdl-list__item-secondary-content">
@if(application.seenByUserIds.contains(userId)){
<div id="seen-@userId" class="vertical-align--middle">
<i class="material-icons icon--light">remove_red_eye</i>
</div>
<div class="mdl-tooltip" for="seen-@userId">
Consultée par l'utilisateur
</div>
}
</span>
</span>
<div class="mdl-list__item-primary-content">
@organisationIcon(userName)
<span>@userName</span>
</div>
<div class="mdl-list__item-secondary-content">
@if(application.seenByUserIds.contains(userId)){
<div id="seen-@userId" class="vertical-align--middle">
<i class="material-icons icon--light">remove_red_eye</i>
</div>
<div class="mdl-tooltip" for="seen-@userId">
Consultée par l'utilisateur
</div>
}
</div>
</div>
}
@if(application.canHaveExpertsInvitedBy(currentUser) && application.closed == false && application.expertInvited == false) {
Expand Down Expand Up @@ -297,19 +321,16 @@ <h2 class="mdl-card__title-text">@application.subject</h2>
}
<div class="mdl-list">
<div class="mdl-list__item">
<span class="mdl-list__item-primary-content">
@Map("A\\+" -> "aplus", "Pôle Emploi" -> "pe", "CPAM" -> "cpam", "CAF" -> "caf", "CNAV" -> "cnav", "DGFIP" -> "dgfip", "Défenseur des droits" -> "ddd").find(a => answer.creatorUserName.contains(a._1)) match {
case Some((_,icon)) =><img class="mdl-list__item-avatar" src="@routes.Assets.versioned("images/admin/"+icon+"-icon.png")"> }
case None => { <i class="material-icons mdl-list__item-avatar">person</i> }
}
<div class="mdl-list__item-primary-content">
@organisationIcon(answer.creatorUserName)
<span>@answer.creatorUserName</span>@if(currentUser.admin){ <span style="font-weight: bold; color:red" class="do-not-print"> <a href="@routes.UserController.editUser(answer.creatorUserID)"> Voir fiche utilisateur</a></span>}
<span class="mdl-list__item-sub-title"></span>
</span>
<span class="mdl-list__item-secondary-content">
</div>
<div class="mdl-list__item-secondary-content">
<div id="date-@answer.id" class="vertical-align--middle">
<span class="application__age">Il y a @answer.ageString (@Time.formatPatternFr(answer.creationDate, "dd MMM YYYY - HH:mm"))</span>
</div>
</span>
</div>
</div>
</div>

Expand Down
Binary file added public/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f36fee5

Please sign in to comment.