func (VS *Server) syncToHTML(c *gin.Context, s Synchronization) SynchronizationHTML {
	var sync SynchronizationHTML
	sync.ID = s.ID
	y, m, d := time.Unix(s.Date, 0).Date()
	sync.Date = time.Unix(s.Date, 0).Weekday().String() + ", " + strconv.Itoa(d) + " of " + m.String() + " of " + strconv.Itoa(y)
	sync.VillageEmitterName = VS.getVillageByID(c, s.IDVillageEmitter, "h_view", "syncToHTML", "sync.Village = VS.getVillageByID").Name
	sync.VillageReceiverName = VS.getVillageByID(c, s.IDVillageReceiver, "h_view", "syncToHTML", "sync.Village = VS.getVillageByID").Name
	sync.Admin = VS.getUserByID(c, s.IDAdmin, "h_view", "syncToHTML", "sync.Admin = VS.getUserByID").Name
	sync.Path = "/local/syncs/exports/" + sync.VillageReceiverName + "/" + "To-" + sync.VillageReceiverName + "-" + sync.ID.Hex() + ".zip"
	sync.IDVillageEmitter = s.IDVillageEmitter
	sync.IDVillageReceiver = s.IDVillageReceiver
	sync.IsDone = s.IsDone
	return sync
}
// This method takes a Synchronization and returns a of SynchronizationHTML
// so we can represent the information as human readable in the website.
This method takes a Synchronization and returns a of SynchronizationHTML
so we can represent the information as human readable in the website.
// This method takes a Synchronization and returns a of SynchronizationHTML // so we can represent the information as human readable in the website .
func (VS *Server) syncToHTML(c *gin.Context, s Synchronization) SynchronizationHTML {
	var sync SynchronizationHTML
	sync.ID = s.ID
	y, m, d := time.Unix(s.Date, 0).Date()
	sync.Date = time.Unix(s.Date, 0).Weekday().String() + ", " + strconv.Itoa(d) + " of " + m.String() + " of " + strconv.Itoa(y)
	sync.VillageEmitterName = VS.getVillageByID(c, s.IDVillageEmitter, "h_view", "syncToHTML", "sync.Village = VS.getVillageByID").Name
	sync.VillageReceiverName = VS.getVillageByID(c, s.IDVillageReceiver, "h_view", "syncToHTML", "sync.Village = VS.getVillageByID").Name
	sync.Admin = VS.getUserByID(c, s.IDAdmin, "h_view", "syncToHTML", "sync.Admin = VS.getUserByID").Name
	sync.Path = "/local/syncs/exports/" + sync.VillageReceiverName + "/" + "To-" + sync.VillageReceiverName + "-" + sync.ID.Hex() + ".zip"
	sync.IDVillageEmitter = s.IDVillageEmitter
	sync.IDVillageReceiver = s.IDVillageReceiver
	sync.IsDone = s.IsDone
	return sync
}
func ( VS * Server ) syncToHTML ( c * gin . Context , s Synchronization ) SynchronizationHTML { var sync SynchronizationHTML sync . ID = s . ID y , m , d := time . Unix ( s . Date , 0 ) . Date ( ) sync . Date = time . Unix ( s . Date , 0 ) . Weekday ( ) . String ( ) + " " + strconv . Itoa ( d ) + " " + m . String ( ) + " " + strconv . Itoa ( y ) sync . VillageEmitterName = VS . getVillageByID ( c , s . IDVillageEmitter , " " , " " , " " ) . Name sync . VillageReceiverName = VS . getVillageByID ( c , s . IDVillageReceiver , " " , " " , " " ) . Name sync . Admin = VS . getUserByID ( c , s . IDAdmin , " " , " " , " " ) . Name sync . Path = " " + sync . VillageReceiverName + " " + " " + sync . VillageReceiverName + " " + sync . ID . Hex ( ) + " " sync . IDVillageEmitter = s . IDVillageEmitter sync . IDVillageReceiver = s . IDVillageReceiver sync . IsDone = s . IsDone return sync }
This method takes a Synchronization and returns a of SynchronizationHTML
so we can represent the information as human readable in the website.
This method takes a Synchronization and returns a of SynchronizationHTML so we can represent the information as human readable in the website .