Federica 1 year ago
parent
commit
3727d4342b

+ 12 - 0
src/app/components/lemmatized-entity-ref/lemmatized-entity-ref.component.scss

@@ -46,4 +46,16 @@
 
 .lemmaHighlight {
   background: rgba(0, 0, 0, 0.177) !important;
+}
+
+.ne-container.lem .ne-occurrence {
+  border-radius: 4px;
+  padding: 4px 6px;
+  background: rgba(255, 255, 255, 0.5);
+  margin-right: 3px;
+  font-size: 0.7rem;
+  margin-bottom: 3px;
+  display: inline-block !important;
+  cursor: pointer;
+  line-height: 0.9rem;
 }

+ 1 - 1
src/app/components/lemmatized-entity/lemmatized-entity-occurrence/lemmatized-entity-occurrence.component.html

@@ -11,7 +11,7 @@
     </span>
     <ng-template #popContent>
         <div *ngFor="let ref of refByDoc.refs">
-            <evt-content-viewer [content]="ref"></evt-content-viewer>
+            <evt-content-viewer *ngIf="refByDoc.docLabel!==ref" [content]="ref"></evt-content-viewer>
         </div>
     </ng-template>
 </span>

+ 12 - 0
src/app/components/lemmatized-entity/lemmatized-entity.component.html

@@ -56,6 +56,18 @@
                     </div>
                 </ng-template>
             </li>
+            <li [ngbNavItem]="'link_'+data.id">
+                <a ngbNavLink class="ui-font">{{'Link' | translate}}</a>
+                <ng-template ngbNavContent>
+                    <div class="ne-detail-content">
+                        <span (click)="openlinkLem()" class="edition-font" [class.pointer]="linkLem">Link alla voce su TLIO</span>
+                            <a *ngIf="linkLem" [href]="linkLem" target="_blank"
+                                class="ml-2 edition-home-link">
+                                <evt-icon [iconInfo]="{icon: 'external-link-alt', iconSet: 'fas' }"></evt-icon>
+                            </a>
+                    </div>
+                </ng-template>
+            </li>
         </ul>
         <div [ngbNavOutlet]="lemDetails"></div>
     </div>

+ 11 - 0
src/app/components/lemmatized-entity/lemmatized-entity.component.ts

@@ -5,6 +5,7 @@ import { map, shareReplay } from 'rxjs/operators';
 import { LemmatizedEntity } from '../../models/evt-models';
 import { register } from '../../services/component-register.service';
 import { EVTModelService } from '../../services/evt-model.service';
+import { normalizeUrl } from '../../utils/js-utils';
 
 @register(LemmatizedEntity)
 @Component({
@@ -35,6 +36,10 @@ export class LemmatizedEntityComponent implements OnInit {
     return '';
   }
 
+  get linkLem() { 
+    return normalizeUrl('http://tlio.ovi.cnr.it/TLIO/'); 
+  }
+
   constructor(
     private evtModelService: EVTModelService,
   ) {
@@ -56,4 +61,10 @@ export class LemmatizedEntityComponent implements OnInit {
     event.stopPropagation();
   }
 
+  openlinkLem() {
+    if (this.linkLem) {
+      window.open(this.linkLem, '_blank');
+    }
+  }
+
 }

+ 31 - 10
src/assets/config/edition_config.json

@@ -1,7 +1,7 @@
 {
 	"editionTitle": "Edizione Digitale - Carteggio Datini",
 	"badge": "alpha",
-	"editionHome": "http://restore.ovi.cnr.it/mockup",
+	"editionHome": "http://restore.ovi.cnr.it/beta",
 	"showLists": true,
 	"availableEditionLevels": [
 		{
@@ -52,22 +52,43 @@
 	],
 	"lemsSelectItems": [
 		{
-			"label": "Lemmatized Entities",
+			"label": "Categorie lessicali",
 			"lemitems": [
+				
 				{
-					"value": "w",
-					"label": "parola",
-					"color": "#ffcdd2"
+					"value": "w[type='s.m.']",
+					"label": "Sostantivo maschile",
+					"color": "rgb(139, 98, 236)"
 				},
 				{
-					"value": "w[type='lem']",
-					"label": "lem",
+					"value": "w[type='s.m.']",
+					"label": "Sostantivo femminile",
 					"color": "rgb(139, 98, 236)"
 				},
 				{
-					"value": "lem",
-					"label": "lem",
-					"color": "#A5D6A7"
+					"value": "w[type='agg.']",
+					"label": "Aggettivo",
+					"color": "rgb(139, 98, 236)"
+				},
+				{
+					"value": "w[type='avv.']",
+					"label": "Avverbio",
+					"color": "rgb(139, 98, 236)"
+				},
+				{
+					"value": "w[type='n.p.']",
+					"label": "Nome proprio",
+					"color": "rgb(139, 98, 236)"
+				},
+				{
+					"value": "w[type='v.']",
+					"label": "Verbo",
+					"color": "rgb(139, 98, 236)"
+				},
+				{
+					"value": "w",
+					"label": "Forma generica",
+					"color": "#ffcdd2"
 				}
 			]
 		}

+ 2 - 2
src/assets/config/ui_config.json

@@ -1,6 +1,6 @@
 {
 	"localization": true,
-	"defaultLocalization": "en",
+	"defaultLocalization": "it",
 	"availableLanguages": [
 		{
 			"code": "en",
@@ -16,5 +16,5 @@
 	"enableNavBar": true,
 	"initNavBarOpened": true,
 	"thumbnailsButton": true,
-	"viscollButton": true
+	"viscollButton": false
 }

+ 1 - 1
src/assets/data/lettere/99b.xml

@@ -30,7 +30,7 @@
       <body>
          <div xml:id="div" n="DATINI">
             
-         <div><p><pb n="99b c. 1" xml:id="99b_1" facs="99b_1.jpg" /> A dì 24 di <w type="1" ref="#3045">gienaio</w> 1390<lb />
+         <div><p><pb n="99b c. 1" xml:id="99b_" facs="a58_1.jpg" /> A dì 24 di <w type="1" ref="#3045">gienaio</w> 1390<lb />
                Per <persName type="0" ref="#1196">Benauto di Secolo</persName> da <placeName type="0" ref="#1525">Capraia</placeName> vi mando questo dì <w type="3" ref="#1246">botti</w> 10 e uno <w type="3" ref="#1533">charatello</w> di<lb />
                vostro <w type="7" ref="#6580">sevo</w> date per <w type="3" ref="#1246">botte</w> <w type="5" ref="#6733">soldi</w> 35 per sua <w type="4" ref="#7430">vetura</w> rendete <w type="2" ref="#6474">scharichatura</w> e <w type="4" ref="#2739">fondachato</w><lb />
                <w type="5" ref="#6733">soldi</w> dieci per <w type="3" ref="#1246">botte</w>. Cristo vi guardi.<lb />

File diff suppressed because it is too large
+ 0 - 232
src/assets/data/main.xml


+ 2 - 1
src/assets/i18n/en.json

@@ -177,5 +177,6 @@
     "moreInfoAboutApp": "More info about the apparatus entry",
     "omit": "omit.",
     "wit": "Wit:",
-    "xml": "XML"
+    "xml": "XML",
+    "Link": "External resources related"
 }

+ 3 - 2
src/assets/i18n/it.json

@@ -28,7 +28,7 @@
     "noLemOccurrences": "Nessuna occorrenza del lemma",
     "relations": "Relazioni",
     "selectItems": "Seleziona elementi",
-    "selectLemsItems": "Seleziona elementi linguistici",
+    "selectLemsItems": "Seleziona categorie lessicali",
     "persons": "Persone",
     "places": "Luoghi",
     "organizations": "Organizzazioni",
@@ -176,5 +176,6 @@
     "moreInfoAboutApp": "Maggiori informazioni per l'entrata d'apparato",
     "omit": "omit.",
     "wit": "Wit:",
-    "xml": "XML"
+    "xml": "XML",
+    "link": "Risorse esterne collegate"
 }

+ 29 - 0
src/styles.scss

@@ -190,6 +190,8 @@ body {
 
 }
 
+// add by FS to manage in scss specific files
+
 ul.lem-details.nav li.nav-item a.ui-font.nav-link {
     color: #000 !important;
 }
@@ -202,3 +204,30 @@ evt-lemmatized-entity.ng-star-inserted div.ne-detail-content.ng-star-inserted {
     background-color: #f7f7f7;
 }
 
+.ne-occurrence {
+    border-radius: 4px;
+    padding: 4px 6px;
+    background: rgba(255, 255, 255, 0.5);
+    margin-right: 3px;
+    font-size: .7rem;
+    margin-bottom: 3px;
+    display: inline-block !important;
+    cursor: pointer;
+    line-height: 0.9rem;
+
+    .ne-occurrence-count {
+      top: -1px;
+      position: relative;
+      margin-left: 5px;
+      border: 1px solid transparent;
+    }
+
+    &:hover {
+      background: rgba(255, 255, 255, 0.8) !important;
+
+      .ne-occurrence-count {
+        border: 1px solid #ccc;
+      }
+    }
+
+}

Some files were not shown because too many files changed in this diff