diff --git a/dbrepo-ui-new/app/__init__.py b/dbrepo-ui-new/app/__init__.py index 7d4782dfa5fb54759f245b02c6674e518c3a0129..777fe774d70ef57971c4d7f81a21ebb3d060eda0 100644 --- a/dbrepo-ui-new/app/__init__.py +++ b/dbrepo-ui-new/app/__init__.py @@ -30,18 +30,4 @@ def create_app(): app.register_blueprint(records_bp) - - - @app.route('/debug-locale') - def debug_locale(): - return f"Current locale: {get_locale()}" - - @app.route("/test-translation") - def test_translation(): - translations_dir = current_app.config.get("BABEL_TRANSLATION_DIRECTORIES", "translations") - print(translations_dir) - print(get_locale()) - - return _("test") - return app \ No newline at end of file diff --git a/dbrepo-ui-new/app/config.py b/dbrepo-ui-new/app/config.py index aa72742d8f05c23ed79aee37f29affe15ea080dd..a4d58d4f215563c397386c9f82debe224e358f78 100644 --- a/dbrepo-ui-new/app/config.py +++ b/dbrepo-ui-new/app/config.py @@ -1,5 +1,3 @@ -BABEL_DEFAULT_LOCALE = 'en' - DETAIL_SIDE_BAR_TEMPLATES = [ "/records/details/side_bar/identifiers.html", "/records/details/side_bar/identifier.html", diff --git a/dbrepo-ui-new/app/records_ui/__init__.py b/dbrepo-ui-new/app/records_ui/__init__.py index c83ab037926fc8a12ec67b988bbe04d61e75e14e..a009b8b5b5f821c1a515dfaffbb0ae866f947729 100644 --- a/dbrepo-ui-new/app/records_ui/__init__.py +++ b/dbrepo-ui-new/app/records_ui/__init__.py @@ -28,7 +28,6 @@ def show_view_record(database_id, view_id): view_data = repo.get_view_data(database_id=database_id, view_id=view_id).to_dict(orient='records') database = repo.get_database(database_id=database_id) - return render_template('view_records/detail.html', database=database, metadata=view, data=view_data, type="view") diff --git a/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/database.html b/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/database.html index 48c5a376d081d3c45a13ec7fd3234f9ae8979c06..2d9c40817e45b60ae54373be659a08f1d7b57a1a 100644 --- a/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/database.html +++ b/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/database.html @@ -8,7 +8,7 @@ <br> <div class="label">Creation</div> - <div class="value">2024-09-16 09:47:52 (UTC)</div> + <div class="value">{{ database.identifiers[0].publication_day }}.{{ database.identifiers[0].publication_month }}.{{ database.identifiers[0].publication_year }}</div> </section> \ No newline at end of file diff --git a/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/metadata.html b/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/metadata.html index 4175c17cf0cef354729ba863927912b56749df04..0898c8669d671be1a78c7078e3d50f6ff77c395f 100644 --- a/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/metadata.html +++ b/dbrepo-ui-new/app/records_ui/templates/view_records/details/side_bar/metadata.html @@ -1,17 +1,12 @@ <section id="database_info" aria-label="database_info" class="info-box"> <h3>Metadata</h3> - <div class="label">Size</div> - <div class="value">4.73 MB</div> - <br> <div class="label">Columns</div> - <div class="value">3</div> + <div class="value">{{ metadata.columns|length }}</div> <br> <div class="label">Rows</div> - <div class="value">20330</div> + <div class="value">{{ data|length }}</div> <br> - <div class="label">Creation</div> - <div class="value">2024-09-16 09:47:52 (UTC)</div> </section> \ No newline at end of file