This commit is contained in:
Hamid Reza Mohammadi 2024-05-04 11:51:52 +03:30
parent 4849a2d8b0
commit 2f27f25d8a
2 changed files with 18 additions and 6 deletions

View File

@ -3916,6 +3916,18 @@
<member name="M:RMuseum.Migrations.MatchPer.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Migrations.PaperSources">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.PaperSources.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.PaperSources.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.PaperSources.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Models.Accounting.DonationExpenditure">
<summary>
donation expenditures

View File

@ -348,7 +348,7 @@ namespace RMuseum.Services.Implementation
if (hasQuotes)
{
html = "<div class=\"related-images-frame\" id=\"related-poets\">";
html += "<div class=\"related-images-frame\" id=\"related-poets\">";
html += $"<div class=\"century\">{Environment.NewLine}";
html += $" مشق شعر <a role=\"button\" class=\"w3tooltip cursor-pointer\" onclick=\"switch_section('related-poets-section', 'related-poets-collapse-button')\"><i class=\"info-buttons collapse_circle_down\" id=\"related-poets-collapse-button\"></i><span class=\"w3tooltiptext\">جمع شود / باز شود</span></a>{Environment.NewLine}";
html += $"</div>{Environment.NewLine}";
@ -422,16 +422,16 @@ namespace RMuseum.Services.Implementation
foreach (var childPage in thisPoetsSimilars)
{
var childPoet = poets.Where(p => p.Id == childPage.PoetId).SingleOrDefault();
var childPoet = poets.Where(p => p.Id == childPage.SecondPoetId).SingleOrDefault();
if(childPoet != null)
{
var poetCat = await context.GanjoorCategories.AsNoTracking().Where(c => c.PoetId == childPoet.Id && c.ParentId == null).SingleAsync();
var poetImageUrl = $"https://api.ganjoor.net/api/ganjoor/poet/image{poetCat.FullUrl}.gif";
var childPoetCat = await context.GanjoorCategories.AsNoTracking().Where(c => c.PoetId == childPoet.Id && c.ParentId == null).SingleAsync();
var poetImageUrl = $"https://api.ganjoor.net/api/ganjoor/poet/image{childPoetCat.FullUrl}.gif";
html += $"<div class=\"poet\" id=\"page-{childPage.Id}\">{Environment.NewLine}";
html += $"<a href=\"{childPage.FullUrl}\">{Environment.NewLine}";
html += $"<img src=\"{poetImageUrl}\" alt=\"{childPoet.Nickname}\" />";
html += $"</a>{Environment.NewLine}";
html += $"<div class=\"caption\">{Environment.NewLine}<a href=\"{childPage.FullUrl}\">{childPage.Title}</a>{Environment.NewLine}</div>";
html += $"<div class=\"caption\">{Environment.NewLine}<a href=\"{childPage.FullUrl}\">{childPoet.Nickname}</a>{Environment.NewLine}</div>";
html += $"</div>{Environment.NewLine}";
}
}
@ -501,7 +501,7 @@ namespace RMuseum.Services.Implementation
html += $"<a href=\"{childPage.FullUrl}\">{Environment.NewLine}";
html += $"<img src=\"{poetImageUrl}\" alt=\"{childPoet.Nickname}\" />";
html += $"</a>{Environment.NewLine}";
html += $"<div class=\"caption\">{Environment.NewLine}<a href=\"{childPage.FullUrl}\">{childPage.Title}</a>{Environment.NewLine}</div>";
html += $"<div class=\"caption\">{Environment.NewLine}<a href=\"{childPage.FullUrl}\">{childPoet.Nickname}</a>{Environment.NewLine}</div>";
html += $"</div>{Environment.NewLine}";
}
}