Skip to content
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

Revert "No Jira: Rename tools to content and update the readme" #704

Merged
merged 1 commit into from
Feb 28, 2024
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# MobileContentAdmin [![Build Status](https://travis-ci.org/CruGlobal/mobile-content-admin.svg?branch=master)](https://travis-ci.org/CruGlobal/mobile-content-admin) [![codecov](https://codecov.io/gh/CruGlobal/mobile-content-admin/branch/master/graph/badge.svg)](https://codecov.io/gh/CruGlobal/mobile-content-admin)


This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.2.7.

## Development server

Run `yarn start` for a dev server. Navigate to `http://localhost:8080/`. The app will automatically reload if you change any of the source files.
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `yarn build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Running unit tests

Run `yarn test` to execute the unit tests via [Karma](https://karma-runner.github.io).
If you want to only run a single test on a file, change the file's root `describe` to `fdescribe` and Jamsine will only test that file.
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `yarn e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.

## Further help
Expand Down
14 changes: 7 additions & 7 deletions src/app/components/resources/resources.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="card mb-2">
<div class="card-header">
<span class="h3">Content</span>
<span class="h3">Tools</span>
<div class="float-right">
<button (click)="openCreateModal()" class="btn btn-secondary mx-1">
<i class="fa fa-plus"></i> Add New Content
<i class="fa fa-plus"></i> Add New Tool
</button>
<button
type="button"
Expand Down Expand Up @@ -160,7 +160,7 @@ <h6 class="dropdown-header">OTHER</h6>
ngbDropdownToggle
style="font-style: italic"
>
{{ sortOrder == 'content' ? 'Content Order' : 'Alphabetical' }}
{{ sortOrder == 'tool' ? 'Tool Order' : 'Alphabetical' }}
</button>
<div
class="dropdown-menu"
Expand All @@ -170,16 +170,16 @@ <h6 class="dropdown-header">OTHER</h6>
<button
(click)="updateSort('alphabetical')"
class="filter-dropdown-button btn-sm"
[ngClass]="sortOrder != 'content' ? 'bg-secondary text-light' : ''"
[ngClass]="sortOrder != 'tool' ? 'bg-secondary text-light' : ''"
>
Alphabetical
</button>
<button
(click)="updateSort('content')"
(click)="updateSort('tool')"
class="filter-dropdown-button"
[ngClass]="sortOrder == 'content' ? 'bg-secondary text-light' : ''"
[ngClass]="sortOrder == 'tool' ? 'bg-secondary text-light' : ''"
>
Content Order
Tool Order
</button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/resources/resources.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ export class ResourcesComponent implements OnInit {
})
: this.unfilteredResources;

if (this.sortOrder === 'content') {
if (this.sortOrder === 'tool') {
this.resources.sort(
(a, b) =>
(a['attr-default-order'] || 1000) - (b['attr-default-order'] || 1000),
(a['attr-default-order'] || 100) - (b['attr-default-order'] || 100),
);
}
}
Expand Down
Loading