Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix/content management archive page actions column overflow #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">
<a href="https://flutter-news-app-full-source-code.github.io/flutter-news-app-web-dashboard-full-source-code/"><img src="https://img.shields.io/badge/LIVE_DEMO-VIEW-orange?style=for-the-badge" alt="Live Demo: View"></a>
<a href="https://flutter-news-app-full-source-code.github.io/docs/web-dashboard/local-setup/"><img src="https://img.shields.io/badge/DOCUMENTATION-READ-slategray?style=for-the-badge" alt="Documentation: Read"></a>
<img src="https://img.shields.io/badge/coverage-_%25-green?style=for-the-badge" alt="coverage: 0%">
<img src="https://img.shields.io/badge/coverage-_%25-red?style=for-the-badge" alt="">
</p>
<p align="center">
<a href="LICENSE"><img src="https://img.shields.io/badge/TRIAL_LICENSE-VIEW_TERMS-blue?style=for-the-badge" alt="Trial License: View Terms"></a>
Expand Down
56 changes: 38 additions & 18 deletions lib/content_management/view/draft_headlines_page.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class DraftHeadlinesPage extends StatelessWidget {
DataColumn2(
label: Text(l10n.actions),
size: ColumnSize.S,
fixedWidth: 120,
),
],
source: _DraftHeadlinesDataSource(
Expand Down Expand Up @@ -211,6 +210,7 @@ class _DraftHeadlinesDataSource extends DataTableSource {
DataCell(
Row(
children: [
// Primary action: Publish button
IconButton(
icon: const Icon(Icons.publish),
tooltip: l10n.publish,
Expand All @@ -220,24 +220,44 @@ class _DraftHeadlinesDataSource extends DataTableSource {
);
},
),
IconButton(
icon: const Icon(Icons.edit),
tooltip: l10n.editHeadline,
onPressed: () {
context.goNamed(
Routes.editHeadlineName,
pathParameters: {'id': headline.id},
);
},
),
IconButton(
icon: const Icon(Icons.delete_forever),
tooltip: l10n.deleteForever,
onPressed: () {
context.read<DraftHeadlinesBloc>().add(
DeleteDraftHeadlineForeverRequested(headline.id),
);
// Secondary actions: Edit and Delete via PopupMenuButton
PopupMenuButton<String>(
icon: const Icon(Icons.more_vert),
tooltip: l10n.moreActions,
onSelected: (value) {
if (value == 'edit') {
context.goNamed(
Routes.editHeadlineName,
pathParameters: {'id': headline.id},
);
} else if (value == 'delete') {
context.read<DraftHeadlinesBloc>().add(
DeleteDraftHeadlineForeverRequested(headline.id),
);
}
},
itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: 'edit',
child: Row(
children: [
const Icon(Icons.edit),
const SizedBox(width: AppSpacing.sm),
Text(l10n.editHeadline),
],
),
),
PopupMenuItem<String>(
value: 'delete',
child: Row(
children: [
const Icon(Icons.delete_forever),
const SizedBox(width: AppSpacing.sm),
Text(l10n.deleteForever),
],
),
),
],
),
],
),
Expand Down
56 changes: 38 additions & 18 deletions lib/content_management/view/draft_sources_page.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class DraftSourcesPage extends StatelessWidget {
DataColumn2(
label: Text(l10n.actions),
size: ColumnSize.S,
fixedWidth: 120,
),
],
source: _DraftSourcesDataSource(
Expand Down Expand Up @@ -206,6 +205,7 @@ class _DraftSourcesDataSource extends DataTableSource {
DataCell(
Row(
children: [
// Primary action: Publish button
IconButton(
icon: const Icon(Icons.publish),
tooltip: l10n.publish,
Expand All @@ -215,24 +215,44 @@ class _DraftSourcesDataSource extends DataTableSource {
);
},
),
IconButton(
icon: const Icon(Icons.edit),
tooltip: l10n.editSource,
onPressed: () {
context.goNamed(
Routes.editSourceName,
pathParameters: {'id': source.id},
);
},
),
IconButton(
icon: const Icon(Icons.delete_forever),
tooltip: l10n.deleteForever,
onPressed: () {
context.read<DraftSourcesBloc>().add(
DeleteDraftSourceForeverRequested(source.id),
);
// Secondary actions: Edit and Delete via PopupMenuButton
PopupMenuButton<String>(
icon: const Icon(Icons.more_vert),
tooltip: l10n.moreActions,
onSelected: (value) {
if (value == 'edit') {
context.goNamed(
Routes.editSourceName,
pathParameters: {'id': source.id},
);
} else if (value == 'delete') {
context.read<DraftSourcesBloc>().add(
DeleteDraftSourceForeverRequested(source.id),
);
}
},
itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: 'edit',
child: Row(
children: [
const Icon(Icons.edit),
const SizedBox(width: AppSpacing.sm),
Text(l10n.editSource),
],
),
),
PopupMenuItem<String>(
value: 'delete',
child: Row(
children: [
const Icon(Icons.delete_forever),
const SizedBox(width: AppSpacing.sm),
Text(l10n.deleteForever),
],
),
),
],
),
],
),
Expand Down
56 changes: 38 additions & 18 deletions lib/content_management/view/draft_topics_page.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class DraftTopicsPage extends StatelessWidget {
DataColumn2(
label: Text(l10n.actions),
size: ColumnSize.S,
fixedWidth: 120,
),
],
source: _DraftTopicsDataSource(
Expand Down Expand Up @@ -206,6 +205,7 @@ class _DraftTopicsDataSource extends DataTableSource {
DataCell(
Row(
children: [
// Primary action: Publish button
IconButton(
icon: const Icon(Icons.publish),
tooltip: l10n.publish,
Expand All @@ -215,24 +215,44 @@ class _DraftTopicsDataSource extends DataTableSource {
);
},
),
IconButton(
icon: const Icon(Icons.edit),
tooltip: l10n.editTopic,
onPressed: () {
context.goNamed(
Routes.editTopicName,
pathParameters: {'id': topic.id},
);
},
),
IconButton(
icon: const Icon(Icons.delete_forever),
tooltip: l10n.deleteForever,
onPressed: () {
context.read<DraftTopicsBloc>().add(
DeleteDraftTopicForeverRequested(topic.id),
);
// Secondary actions: Edit and Delete via PopupMenuButton
PopupMenuButton<String>(
icon: const Icon(Icons.more_vert),
tooltip: l10n.moreActions,
onSelected: (value) {
if (value == 'edit') {
context.goNamed(
Routes.editTopicName,
pathParameters: {'id': topic.id},
);
} else if (value == 'delete') {
context.read<DraftTopicsBloc>().add(
DeleteDraftTopicForeverRequested(topic.id),
);
}
},
itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: 'edit',
child: Row(
children: [
const Icon(Icons.edit),
const SizedBox(width: AppSpacing.sm),
Text(l10n.editTopic),
],
),
),
PopupMenuItem<String>(
value: 'delete',
child: Row(
children: [
const Icon(Icons.delete_forever),
const SizedBox(width: AppSpacing.sm),
Text(l10n.deleteForever),
],
),
),
],
),
],
),
Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_localizations.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,12 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Enable In-Article Ads for {role}'**
String enableInArticleAdsForRoleLabel(String role);

/// Tooltip for the button that opens a menu with more actions for a table row.
///
/// In en, this message translates to:
/// **'More Actions'**
String get moreActions;
}

class _AppLocalizationsDelegate
Expand Down
3 changes: 3 additions & 0 deletions lib/l10n/app_localizations_ar.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1387,4 +1387,7 @@ class AppLocalizationsAr extends AppLocalizations {
String enableInArticleAdsForRoleLabel(String role) {
return 'تمكين الإعلانات داخل المقال لـ $role';
}

@override
String get moreActions => 'المزيد من الإجراءات';
}
3 changes: 3 additions & 0 deletions lib/l10n/app_localizations_en.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1392,4 +1392,7 @@ class AppLocalizationsEn extends AppLocalizations {
String enableInArticleAdsForRoleLabel(String role) {
return 'Enable In-Article Ads for $role';
}

@override
String get moreActions => 'More Actions';
}
4 changes: 4 additions & 0 deletions lib/l10n/arb/app_ar.arb
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1755,5 +1755,9 @@
"example": "مستخدم ضيف"
}
}
},
"moreActions": "المزيد من الإجراءات",
"@moreActions": {
"description": "تلميح الزر الذي يفتح قائمة تحتوي على المزيد من الإجراءات لصف في الجدول."
}
}
4 changes: 4 additions & 0 deletions lib/l10n/arb/app_en.arb
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1751,5 +1751,9 @@
"example": "Guest User"
}
}
},
"moreActions": "More Actions",
"@moreActions": {
"description": "Tooltip for the button that opens a menu with more actions for a table row."
}
}
Loading

AltStyle によって変換されたページ (->オリジナル) /