Skip to content

Commit

Permalink
Revert "Rename tools to content and update the readme (#703)"
Browse files Browse the repository at this point in the history
This reverts commit a7c975e.
  • Loading branch information
dr-bizz authored Feb 28, 2024
1 parent a7c975e commit 4da3df9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
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

0 comments on commit 4da3df9

Please sign in to comment.